8 changed files with 421 additions and 0 deletions
@ -0,0 +1,114 @@ |
|||
package com.kms.stat.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.jianwei.common.core.controller.BaseController; |
|||
import com.jianwei.common.core.domain.SearchParam; |
|||
import com.jianwei.common.utils.poi.ExcelUtil; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
|
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.PutMapping; |
|||
import org.springframework.web.bind.annotation.DeleteMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.jianwei.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.jianwei.common.annotation.Log; |
|||
import com.jianwei.common.core.domain.AjaxResult; |
|||
import com.jianwei.common.enums.BusinessType; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsProject; |
|||
import com.kms.stat.service.BsSgcYxjdStatisticsProjectService; |
|||
|
|||
|
|||
/** |
|||
* 项目统计信息Controller |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/stat/project") |
|||
@Api(tags = "项目统计信息") |
|||
public class BsSgcYxjdStatisticsProjectController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcYxjdStatisticsProjectService bsSgcYxjdStatisticsProjectService; |
|||
|
|||
/** |
|||
* 查询项目统计信息列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("项目统计信息列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcYxjdStatisticsProject> sp) |
|||
{ |
|||
return bsSgcYxjdStatisticsProjectService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 导出项目统计信息列表 |
|||
*/ |
|||
@Log(title = "项目统计信息导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("项目统计信息导出") |
|||
public AjaxResult export(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject) |
|||
{ |
|||
List<BsSgcYxjdStatisticsProject> list = bsSgcYxjdStatisticsProjectService.listByIds(bsSgcYxjdStatisticsProject.getIds()); |
|||
ExcelUtil<BsSgcYxjdStatisticsProject> util = new ExcelUtil<>(BsSgcYxjdStatisticsProject.class); |
|||
return util.exportExcel(list, "project"); |
|||
} |
|||
|
|||
/** |
|||
* 获取项目统计信息详细信息 |
|||
*/ |
|||
@ApiOperation(" 项目统计信息详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcYxjdStatisticsProjectService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增项目统计信息 |
|||
*/ |
|||
@Log(title = "项目统计信息新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("项目统计信息新增") |
|||
public AjaxResult add(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcYxjdStatisticsProject); |
|||
return toAjax(bsSgcYxjdStatisticsProjectService.save(bsSgcYxjdStatisticsProject)); |
|||
} |
|||
|
|||
/** |
|||
* 修改项目统计信息 |
|||
*/ |
|||
@ApiOperation("项目统计信息修改") |
|||
@Log(title = "项目统计信息修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcYxjdStatisticsProject bsSgcYxjdStatisticsProject) |
|||
{ |
|||
return toAjax(bsSgcYxjdStatisticsProjectService.updateById(bsSgcYxjdStatisticsProject)); |
|||
} |
|||
|
|||
/** |
|||
* 删除项目统计信息 |
|||
*/ |
|||
@ApiOperation("项目统计信息删除") |
|||
@Log(title = "项目统计信息删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcYxjdStatisticsProjectService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,114 @@ |
|||
package com.kms.stat.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.jianwei.common.core.controller.BaseController; |
|||
import com.jianwei.common.core.domain.SearchParam; |
|||
import com.jianwei.common.utils.poi.ExcelUtil; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
|
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.PutMapping; |
|||
import org.springframework.web.bind.annotation.DeleteMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.jianwei.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.jianwei.common.annotation.Log; |
|||
import com.jianwei.common.core.domain.AjaxResult; |
|||
import com.jianwei.common.enums.BusinessType; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate; |
|||
import com.kms.stat.service.BsSgcYxjdStatisticsTemplateService; |
|||
|
|||
|
|||
/** |
|||
* 统计模板Controller |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/stat/template") |
|||
@Api(tags = "统计模板") |
|||
public class BsSgcYxjdStatisticsTemplateController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcYxjdStatisticsTemplateService bsSgcYxjdStatisticsTemplateService; |
|||
|
|||
/** |
|||
* 查询统计模板列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("统计模板列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcYxjdStatisticsTemplate> sp) |
|||
{ |
|||
return bsSgcYxjdStatisticsTemplateService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 导出统计模板列表 |
|||
*/ |
|||
@Log(title = "统计模板导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("统计模板导出") |
|||
public AjaxResult export(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate) |
|||
{ |
|||
List<BsSgcYxjdStatisticsTemplate> list = bsSgcYxjdStatisticsTemplateService.listByIds(bsSgcYxjdStatisticsTemplate.getIds()); |
|||
ExcelUtil<BsSgcYxjdStatisticsTemplate> util = new ExcelUtil<>(BsSgcYxjdStatisticsTemplate.class); |
|||
return util.exportExcel(list, "template"); |
|||
} |
|||
|
|||
/** |
|||
* 获取统计模板详细信息 |
|||
*/ |
|||
@ApiOperation(" 统计模板详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcYxjdStatisticsTemplateService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增统计模板 |
|||
*/ |
|||
@Log(title = "统计模板新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("统计模板新增") |
|||
public AjaxResult add(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcYxjdStatisticsTemplate); |
|||
return toAjax(bsSgcYxjdStatisticsTemplateService.save(bsSgcYxjdStatisticsTemplate)); |
|||
} |
|||
|
|||
/** |
|||
* 修改统计模板 |
|||
*/ |
|||
@ApiOperation("统计模板修改") |
|||
@Log(title = "统计模板修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcYxjdStatisticsTemplate bsSgcYxjdStatisticsTemplate) |
|||
{ |
|||
return toAjax(bsSgcYxjdStatisticsTemplateService.updateById(bsSgcYxjdStatisticsTemplate)); |
|||
} |
|||
|
|||
/** |
|||
* 删除统计模板 |
|||
*/ |
|||
@ApiOperation("统计模板删除") |
|||
@Log(title = "统计模板删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcYxjdStatisticsTemplateService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.kms.stat.domain; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.jianwei.common.annotation.Excel; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
import com.jianwei.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 项目统计信息对象 bs_sgc_yxjd_statistics_project |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@TableName("bs_sgc_yxjd_statistics_project") |
|||
@Data |
|||
@ApiModel("项目统计信息") |
|||
public class BsSgcYxjdStatisticsProject extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 统计名称 */ |
|||
@Excel(name = "统计名称") |
|||
@ApiModelProperty("统计名称") |
|||
private String taskName; |
|||
|
|||
/** 模板名称 */ |
|||
@Excel(name = "模板名称") |
|||
@ApiModelProperty("模板名称") |
|||
private String templateId; |
|||
|
|||
/** 项目类型 */ |
|||
@Excel(name = "项目类型") |
|||
@ApiModelProperty("项目类型") |
|||
private String proType; |
|||
|
|||
/** 项目行政区划 */ |
|||
@Excel(name = "项目行政区划") |
|||
@ApiModelProperty("项目行政区划") |
|||
private String proXzqh; |
|||
|
|||
/** 工程等级 */ |
|||
@Excel(name = "工程等级") |
|||
@ApiModelProperty("工程等级") |
|||
private String proGrade; |
|||
|
|||
/** 是否重大项目 */ |
|||
@Excel(name = "是否重大项目") |
|||
@ApiModelProperty("是否重大项目") |
|||
private String majorPro; |
|||
|
|||
/** 是否为安全度汛重点工程 */ |
|||
@Excel(name = "是否为安全度汛重点工程") |
|||
@ApiModelProperty("是否为安全度汛重点工程") |
|||
private String floodPro; |
|||
|
|||
/** 创建人 */ |
|||
@Excel(name = "创建人") |
|||
@ApiModelProperty("创建人") |
|||
private String createUid; |
|||
|
|||
/** 更新人 */ |
|||
@Excel(name = "更新人") |
|||
@ApiModelProperty("更新人") |
|||
private String updateUid; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.kms.stat.domain; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.jianwei.common.annotation.Excel; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
import com.jianwei.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 统计模板对象 bs_sgc_yxjd_statistics_template |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@TableName("bs_sgc_yxjd_statistics_template") |
|||
@Data |
|||
@ApiModel("统计模板") |
|||
public class BsSgcYxjdStatisticsTemplate extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 模板名称 */ |
|||
@Excel(name = "模板名称") |
|||
@ApiModelProperty("模板名称") |
|||
|
|||
private String templateName; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "模板名称") |
|||
@ApiModelProperty("模板名称") |
|||
private String typeIds; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "模板名称") |
|||
@ApiModelProperty("模板名称") |
|||
private String typeNames; |
|||
|
|||
/** 创建人 */ |
|||
@Excel(name = "创建人") |
|||
@ApiModelProperty("创建人") |
|||
private String createUid; |
|||
|
|||
/** 更新人 */ |
|||
@Excel(name = "更新人") |
|||
@ApiModelProperty("更新人") |
|||
private String updateUid; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.kms.stat.mapper; |
|||
|
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsProject; |
|||
|
|||
/** |
|||
* 项目统计信息Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcYxjdStatisticsProjectMapper extends BaseMapper<BsSgcYxjdStatisticsProject> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.kms.stat.mapper; |
|||
|
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate; |
|||
|
|||
/** |
|||
* 统计模板Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcYxjdStatisticsTemplateMapper extends BaseMapper<BsSgcYxjdStatisticsTemplate> { |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.stat.service; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
import com.jianwei.common.core.service.BaseService; |
|||
import com.kms.stat.mapper.BsSgcYxjdStatisticsProjectMapper; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsProject; |
|||
|
|||
/** |
|||
* 项目统计信息Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@Service |
|||
public class BsSgcYxjdStatisticsProjectService extends BaseService<BsSgcYxjdStatisticsProjectMapper, BsSgcYxjdStatisticsProject>{ |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.stat.service; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
import com.jianwei.common.core.service.BaseService; |
|||
import com.kms.stat.mapper.BsSgcYxjdStatisticsTemplateMapper; |
|||
import com.kms.stat.domain.BsSgcYxjdStatisticsTemplate; |
|||
|
|||
/** |
|||
* 统计模板Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2025-04-09 |
|||
*/ |
|||
@Service |
|||
public class BsSgcYxjdStatisticsTemplateService extends BaseService<BsSgcYxjdStatisticsTemplateMapper, BsSgcYxjdStatisticsTemplate>{ |
|||
|
|||
} |
Loading…
Reference in new issue