Merge remote-tracking branch 'origin/master' into master
正在显示
31 个修改的文件
包含
359 行增加
和
71 行删除
... | @@ -66,17 +66,27 @@ public class AjhWasteGasController { | ... | @@ -66,17 +66,27 @@ public class AjhWasteGasController { |
66 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 66 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
67 | HttpServletRequest req) { | 67 | HttpServletRequest req) { |
68 | Result<IPage<AjhWasteGas>> result = new Result<IPage<AjhWasteGas>>(); | 68 | Result<IPage<AjhWasteGas>> result = new Result<IPage<AjhWasteGas>>(); |
69 | String departIds = null; | 69 | /*String departIds = null; |
70 | if(StringUtils.isNotEmpty(ajhWasteGas.getDepartId())){ | 70 | if(StringUtils.isNotEmpty(ajhWasteGas.getDepartId())){ |
71 | departIds = commonSqlService.getChildDepartId(ajhWasteGas.getDepartId()); | 71 | departIds = commonSqlService.getChildDepartId(ajhWasteGas.getDepartId()); |
72 | ajhWasteGas.setDepartId(null); | 72 | ajhWasteGas.setDepartId(null); |
73 | } | 73 | }*/ |
74 | QueryWrapper<AjhWasteGas> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteGas, req.getParameterMap()); | 74 | QueryWrapper<AjhWasteGas> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteGas, req.getParameterMap()); |
75 | Page<AjhWasteGas> page = new Page<AjhWasteGas>(pageNo, pageSize); | 75 | Page<AjhWasteGas> page = new Page<AjhWasteGas>(pageNo, pageSize); |
76 | 76 | ||
77 | if(StringUtils.isNotEmpty(departIds)){ | 77 | /*if(StringUtils.isNotEmpty(departIds)){ |
78 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 78 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
79 | }*/ | ||
80 | //时间字段查询 | ||
81 | String startDate = req.getParameter("startDate"); | ||
82 | if(StringUtils.isNotEmpty(startDate)){ | ||
83 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
84 | } | ||
85 | String endDate = req.getParameter("endDate"); | ||
86 | if(StringUtils.isNotEmpty(startDate)){ | ||
87 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
79 | } | 88 | } |
89 | |||
80 | IPage<AjhWasteGas> pageList = ajhWasteGasService.page(page, queryWrapper); | 90 | IPage<AjhWasteGas> pageList = ajhWasteGasService.page(page, queryWrapper); |
81 | result.setSuccess(true); | 91 | result.setSuccess(true); |
82 | result.setResult(pageList); | 92 | result.setResult(pageList); | ... | ... |
... | @@ -81,14 +81,25 @@ public class AjhWasteNoiseController { | ... | @@ -81,14 +81,25 @@ public class AjhWasteNoiseController { |
81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhWasteNoise>> result = new Result<IPage<AjhWasteNoise>>(); | 83 | Result<IPage<AjhWasteNoise>> result = new Result<IPage<AjhWasteNoise>>(); |
84 | String departIds = null; | 84 | /* String departIds = BaseContextHandler.getDeparts(); |
85 | if(StringUtils.isNotEmpty(ajhWasteNoise.getDepartId())){ | 85 | if(StringUtils.isNotEmpty(ajhWasteNoise.getDepartId())){ |
86 | departIds = commonSqlService.getChildDepartId(ajhWasteNoise.getDepartId()); | 86 | departIds = commonSqlService.getChildDepartId(ajhWasteNoise.getDepartId()); |
87 | ajhWasteNoise.setDepartId(null); | 87 | ajhWasteNoise.setDepartId(null); |
88 | } | 88 | }*/ |
89 | QueryWrapper<AjhWasteNoise> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteNoise, req.getParameterMap()); | 89 | QueryWrapper<AjhWasteNoise> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteNoise, req.getParameterMap()); |
90 | Page<AjhWasteNoise> page = new Page<AjhWasteNoise>(pageNo, pageSize); | 90 | Page<AjhWasteNoise> page = new Page<AjhWasteNoise>(pageNo, pageSize); |
91 | /*if(StringUtils.isNotEmpty(departIds)){ | ||
91 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 92 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
93 | }*/ | ||
94 | |||
95 | String startDate = req.getParameter("startDate"); | ||
96 | if(StringUtils.isNotEmpty(startDate)){ | ||
97 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
98 | } | ||
99 | String endDate = req.getParameter("endDate"); | ||
100 | if(StringUtils.isNotEmpty(startDate)){ | ||
101 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
102 | } | ||
92 | IPage<AjhWasteNoise> pageList = ajhWasteNoiseService.page(page, queryWrapper); | 103 | IPage<AjhWasteNoise> pageList = ajhWasteNoiseService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 104 | result.setSuccess(true); |
94 | result.setResult(pageList); | 105 | result.setResult(pageList); | ... | ... |
... | @@ -81,14 +81,25 @@ public class AjhWasteSolidContractController { | ... | @@ -81,14 +81,25 @@ public class AjhWasteSolidContractController { |
81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhWasteSolidContract>> result = new Result<IPage<AjhWasteSolidContract>>(); | 83 | Result<IPage<AjhWasteSolidContract>> result = new Result<IPage<AjhWasteSolidContract>>(); |
84 | String departIds = null; | 84 | /*String departIds = BaseContextHandler.getDeparts(); |
85 | if(StringUtils.isNotEmpty(ajhWasteSolidContract.getDepartId())){ | 85 | if(StringUtils.isNotEmpty(ajhWasteSolidContract.getDepartId())){ |
86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidContract.getDepartId()); | 86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidContract.getDepartId()); |
87 | ajhWasteSolidContract.setDepartId(null); | 87 | ajhWasteSolidContract.setDepartId(null); |
88 | } | 88 | }*/ |
89 | QueryWrapper<AjhWasteSolidContract> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidContract, req.getParameterMap()); | 89 | QueryWrapper<AjhWasteSolidContract> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidContract, req.getParameterMap()); |
90 | Page<AjhWasteSolidContract> page = new Page<AjhWasteSolidContract>(pageNo, pageSize); | 90 | Page<AjhWasteSolidContract> page = new Page<AjhWasteSolidContract>(pageNo, pageSize); |
91 | /*if(StringUtils.isNotEmpty(departIds)){ | ||
91 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 92 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
93 | }*/ | ||
94 | |||
95 | String startDate = req.getParameter("startDate"); | ||
96 | if(StringUtils.isNotEmpty(startDate)){ | ||
97 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
98 | } | ||
99 | String endDate = req.getParameter("endDate"); | ||
100 | if(StringUtils.isNotEmpty(startDate)){ | ||
101 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
102 | } | ||
92 | IPage<AjhWasteSolidContract> pageList = ajhWasteSolidContractService.page(page, queryWrapper); | 103 | IPage<AjhWasteSolidContract> pageList = ajhWasteSolidContractService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 104 | result.setSuccess(true); |
94 | result.setResult(pageList); | 105 | result.setResult(pageList); | ... | ... |
... | @@ -81,14 +81,24 @@ public class AjhWasteSolidPermitController { | ... | @@ -81,14 +81,24 @@ public class AjhWasteSolidPermitController { |
81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhWasteSolidPermit>> result = new Result<IPage<AjhWasteSolidPermit>>(); | 83 | Result<IPage<AjhWasteSolidPermit>> result = new Result<IPage<AjhWasteSolidPermit>>(); |
84 | String departIds = null; | 84 | /*String departIds = BaseContextHandler.getDeparts(); |
85 | if(StringUtils.isNotEmpty(ajhWasteSolidPermit.getDepartId())){ | 85 | if(StringUtils.isNotEmpty(ajhWasteSolidPermit.getDepartId())){ |
86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidPermit.getDepartId()); | 86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidPermit.getDepartId()); |
87 | ajhWasteSolidPermit.setDepartId(null); | 87 | ajhWasteSolidPermit.setDepartId(null); |
88 | } | 88 | }*/ |
89 | QueryWrapper<AjhWasteSolidPermit> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidPermit, req.getParameterMap()); | 89 | QueryWrapper<AjhWasteSolidPermit> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidPermit, req.getParameterMap()); |
90 | Page<AjhWasteSolidPermit> page = new Page<AjhWasteSolidPermit>(pageNo, pageSize); | 90 | Page<AjhWasteSolidPermit> page = new Page<AjhWasteSolidPermit>(pageNo, pageSize); |
91 | /*if(StringUtils.isNotEmpty(departIds)){ | ||
91 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 92 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
93 | }*/ | ||
94 | String startDate = req.getParameter("startDate"); | ||
95 | if(StringUtils.isNotEmpty(startDate)){ | ||
96 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
97 | } | ||
98 | String endDate = req.getParameter("endDate"); | ||
99 | if(StringUtils.isNotEmpty(startDate)){ | ||
100 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
101 | } | ||
92 | IPage<AjhWasteSolidPermit> pageList = ajhWasteSolidPermitService.page(page, queryWrapper); | 102 | IPage<AjhWasteSolidPermit> pageList = ajhWasteSolidPermitService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 103 | result.setSuccess(true); |
94 | result.setResult(pageList); | 104 | result.setResult(pageList); | ... | ... |
... | @@ -81,14 +81,24 @@ public class AjhWasteSolidReportController { | ... | @@ -81,14 +81,24 @@ public class AjhWasteSolidReportController { |
81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhWasteSolidReport>> result = new Result<IPage<AjhWasteSolidReport>>(); | 83 | Result<IPage<AjhWasteSolidReport>> result = new Result<IPage<AjhWasteSolidReport>>(); |
84 | String departIds = null; | 84 | /*String departIds = BaseContextHandler.getDeparts(); |
85 | if(StringUtils.isNotEmpty(ajhWasteSolidReport.getDepartId())){ | 85 | if(StringUtils.isNotEmpty(ajhWasteSolidReport.getDepartId())){ |
86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidReport.getDepartId()); | 86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidReport.getDepartId()); |
87 | ajhWasteSolidReport.setDepartId(null); | 87 | ajhWasteSolidReport.setDepartId(null); |
88 | } | 88 | }*/ |
89 | QueryWrapper<AjhWasteSolidReport> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidReport, req.getParameterMap()); | 89 | QueryWrapper<AjhWasteSolidReport> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidReport, req.getParameterMap()); |
90 | Page<AjhWasteSolidReport> page = new Page<AjhWasteSolidReport>(pageNo, pageSize); | 90 | Page<AjhWasteSolidReport> page = new Page<AjhWasteSolidReport>(pageNo, pageSize); |
91 | /*if(StringUtils.isNotEmpty(departIds)){ | ||
91 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 92 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
93 | }*/ | ||
94 | String startDate = req.getParameter("startDate"); | ||
95 | if(StringUtils.isNotEmpty(startDate)){ | ||
96 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
97 | } | ||
98 | String endDate = req.getParameter("endDate"); | ||
99 | if(StringUtils.isNotEmpty(startDate)){ | ||
100 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
101 | } | ||
92 | IPage<AjhWasteSolidReport> pageList = ajhWasteSolidReportService.page(page, queryWrapper); | 102 | IPage<AjhWasteSolidReport> pageList = ajhWasteSolidReportService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 103 | result.setSuccess(true); |
94 | result.setResult(pageList); | 104 | result.setResult(pageList); | ... | ... |
... | @@ -81,14 +81,24 @@ public class AjhWasteSolidTransportController { | ... | @@ -81,14 +81,24 @@ public class AjhWasteSolidTransportController { |
81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhWasteSolidTransport>> result = new Result<IPage<AjhWasteSolidTransport>>(); | 83 | Result<IPage<AjhWasteSolidTransport>> result = new Result<IPage<AjhWasteSolidTransport>>(); |
84 | String departIds = null; | 84 | /*String departIds = BaseContextHandler.getDeparts(); |
85 | if(StringUtils.isNotEmpty(ajhWasteSolidTransport.getDepartId())){ | 85 | if(StringUtils.isNotEmpty(ajhWasteSolidTransport.getDepartId())){ |
86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidTransport.getDepartId()); | 86 | departIds = commonSqlService.getChildDepartId(ajhWasteSolidTransport.getDepartId()); |
87 | ajhWasteSolidTransport.setDepartId(null); | 87 | ajhWasteSolidTransport.setDepartId(null); |
88 | } | 88 | }*/ |
89 | QueryWrapper<AjhWasteSolidTransport> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidTransport, req.getParameterMap()); | 89 | QueryWrapper<AjhWasteSolidTransport> queryWrapper = QueryGenerator.initQueryWrapper(ajhWasteSolidTransport, req.getParameterMap()); |
90 | Page<AjhWasteSolidTransport> page = new Page<AjhWasteSolidTransport>(pageNo, pageSize); | 90 | Page<AjhWasteSolidTransport> page = new Page<AjhWasteSolidTransport>(pageNo, pageSize); |
91 | /*if(StringUtils.isNotEmpty(departIds)){ | ||
91 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); | 92 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
93 | }*/ | ||
94 | String startDate = req.getParameter("startDate"); | ||
95 | if(StringUtils.isNotEmpty(startDate)){ | ||
96 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
97 | } | ||
98 | String endDate = req.getParameter("endDate"); | ||
99 | if(StringUtils.isNotEmpty(startDate)){ | ||
100 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
101 | } | ||
92 | IPage<AjhWasteSolidTransport> pageList = ajhWasteSolidTransportService.page(page, queryWrapper); | 102 | IPage<AjhWasteSolidTransport> pageList = ajhWasteSolidTransportService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 103 | result.setSuccess(true); |
94 | result.setResult(pageList); | 104 | result.setResult(pageList); | ... | ... |
... | @@ -77,16 +77,23 @@ public class LeaderInspectionRecordController { | ... | @@ -77,16 +77,23 @@ public class LeaderInspectionRecordController { |
77 | HttpServletRequest req) { | 77 | HttpServletRequest req) { |
78 | Result<IPage<LeaderInspectionRecord>> result = new Result<IPage<LeaderInspectionRecord>>(); | 78 | Result<IPage<LeaderInspectionRecord>> result = new Result<IPage<LeaderInspectionRecord>>(); |
79 | 79 | ||
80 | String departIds = null; | 80 | /*String departIds = BaseContextHandler.getDeparts(); |
81 | if (StringUtils.isEmpty(leaderInspectionRecord.getDepartId())) { | 81 | if (StringUtils.isNotEmpty(leaderInspectionRecord.getDepartId())) { |
82 | departIds = BaseContextHandler.getDeparts(); | ||
83 | }else{ | ||
84 | departIds = departService.getChildDepartId(leaderInspectionRecord.getDepartId()); | 82 | departIds = departService.getChildDepartId(leaderInspectionRecord.getDepartId()); |
85 | leaderInspectionRecord.setDepartId(null); | 83 | leaderInspectionRecord.setDepartId(null); |
86 | } | 84 | }*/ |
87 | QueryWrapper<LeaderInspectionRecord> queryWrapper = QueryGenerator.initQueryWrapper(leaderInspectionRecord, req.getParameterMap()); | 85 | QueryWrapper<LeaderInspectionRecord> queryWrapper = QueryGenerator.initQueryWrapper(leaderInspectionRecord, req.getParameterMap()); |
88 | Page<LeaderInspectionRecord> page = new Page<LeaderInspectionRecord>(pageNo, pageSize); | 86 | Page<LeaderInspectionRecord> page = new Page<LeaderInspectionRecord>(pageNo, pageSize); |
89 | queryWrapper.in("depart_id" , departIds) ; | 87 | /*queryWrapper.in("depart_id" , departIds) ;*/ |
88 | |||
89 | String startDate = req.getParameter("startDate"); | ||
90 | if(StringUtils.isNotEmpty(startDate)){ | ||
91 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | ||
92 | } | ||
93 | String endDate = req.getParameter("endDate"); | ||
94 | if(StringUtils.isNotEmpty(startDate)){ | ||
95 | queryWrapper.le("create_time",endDate+" 23:59:59"); | ||
96 | } | ||
90 | IPage<LeaderInspectionRecord> pageList = leaderInspectionRecordService.page(page, queryWrapper); | 97 | IPage<LeaderInspectionRecord> pageList = leaderInspectionRecordService.page(page, queryWrapper); |
91 | result.setSuccess(true); | 98 | result.setSuccess(true); |
92 | result.setResult(pageList); | 99 | result.setResult(pageList); | ... | ... |
... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType; | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType; |
6 | import com.baomidou.mybatisplus.annotation.TableId; | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
7 | import com.baomidou.mybatisplus.annotation.TableName; | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
8 | import com.baomidou.mybatisplus.annotation.TableField; | 8 | import com.baomidou.mybatisplus.annotation.TableField; |
9 | import com.skua.core.aspect.annotation.Dict; | ||
9 | import io.swagger.annotations.ApiModel; | 10 | import io.swagger.annotations.ApiModel; |
10 | import io.swagger.annotations.ApiModelProperty; | 11 | import io.swagger.annotations.ApiModelProperty; |
11 | import lombok.Data; | 12 | import lombok.Data; |
... | @@ -29,17 +30,18 @@ public class AjhWasteSolidContract { | ... | @@ -29,17 +30,18 @@ public class AjhWasteSolidContract { |
29 | @TableId(type = IdType.ID_WORKER_STR) | 30 | @TableId(type = IdType.ID_WORKER_STR) |
30 | @ApiModelProperty(value = "报警ID 主键") | 31 | @ApiModelProperty(value = "报警ID 主键") |
31 | private String id; | 32 | private String id; |
32 | /**处理单位*/ | 33 | |
33 | @Excel(name = "处理单位", width = 15) | 34 | @Excel(name = "水厂编号", width = 15) |
34 | @ApiModelProperty(value = "处理单位") | 35 | @ApiModelProperty(value = "水厂编号") |
35 | private String departId; | 36 | private String departId; |
36 | /**水厂名称*/ | 37 | /**水厂名称*/ |
37 | @Excel(name = "水厂名称", width = 15) | 38 | @Excel(name = "水厂名称", width = 15) |
38 | @ApiModelProperty(value = "水厂名称") | 39 | @ApiModelProperty(value = "水厂名称") |
39 | private String departName; | 40 | private String departName; |
40 | /**处理单位*/ | 41 | |
41 | @Excel(name = "处理单位", width = 15) | 42 | @Excel(name = "处理单位", width = 15) |
42 | @ApiModelProperty(value = "处理单位") | 43 | @ApiModelProperty(value = "处理单位") |
44 | @Dict(dictTable = "ajh_safe_handle_point", dicCode="id", dicText = "company_name") | ||
43 | private String handleDepartName; | 45 | private String handleDepartName; |
44 | /**合同签订时间*/ | 46 | /**合同签订时间*/ |
45 | @Excel(name = "合同签订时间", width = 15) | 47 | @Excel(name = "合同签订时间", width = 15) |
... | @@ -65,6 +67,9 @@ public class AjhWasteSolidContract { | ... | @@ -65,6 +67,9 @@ public class AjhWasteSolidContract { |
65 | @Excel(name = "联系电话", width = 15) | 67 | @Excel(name = "联系电话", width = 15) |
66 | @ApiModelProperty(value = "联系电话") | 68 | @ApiModelProperty(value = "联系电话") |
67 | private String contactsPhone; | 69 | private String contactsPhone; |
70 | |||
71 | @ApiModelProperty(value = "合同文件") | ||
72 | private String contractFile; | ||
68 | /**创建人id*/ | 73 | /**创建人id*/ |
69 | @Excel(name = "创建人id", width = 15) | 74 | @Excel(name = "创建人id", width = 15) |
70 | @ApiModelProperty(value = "创建人id") | 75 | @ApiModelProperty(value = "创建人id") | ... | ... |
... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType; | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType; |
6 | import com.baomidou.mybatisplus.annotation.TableId; | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
7 | import com.baomidou.mybatisplus.annotation.TableName; | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
8 | import com.baomidou.mybatisplus.annotation.TableField; | 8 | import com.baomidou.mybatisplus.annotation.TableField; |
9 | import com.skua.core.aspect.annotation.Dict; | ||
9 | import io.swagger.annotations.ApiModel; | 10 | import io.swagger.annotations.ApiModel; |
10 | import io.swagger.annotations.ApiModelProperty; | 11 | import io.swagger.annotations.ApiModelProperty; |
11 | import lombok.Data; | 12 | import lombok.Data; |
... | @@ -29,17 +30,19 @@ public class AjhWasteSolidTransport { | ... | @@ -29,17 +30,19 @@ public class AjhWasteSolidTransport { |
29 | @TableId(type = IdType.ID_WORKER_STR) | 30 | @TableId(type = IdType.ID_WORKER_STR) |
30 | @ApiModelProperty(value = "报警ID 主键") | 31 | @ApiModelProperty(value = "报警ID 主键") |
31 | private String id; | 32 | private String id; |
32 | /**处理单位*/ | 33 | |
33 | @Excel(name = "处理单位", width = 15) | 34 | @Excel(name = "水厂编号", width = 15) |
34 | @ApiModelProperty(value = "处理单位") | 35 | @ApiModelProperty(value = "水厂编号") |
36 | |||
35 | private String departId; | 37 | private String departId; |
36 | /**水厂名称*/ | 38 | /**水厂名称*/ |
37 | @Excel(name = "水厂名称", width = 15) | 39 | @Excel(name = "水厂名称", width = 15) |
38 | @ApiModelProperty(value = "水厂名称") | 40 | @ApiModelProperty(value = "水厂名称") |
39 | private String departName; | 41 | private String departName; |
40 | /**处理单位*/ | 42 | |
41 | @Excel(name = "处理单位", width = 15) | 43 | @Excel(name = "处理单位", width = 15) |
42 | @ApiModelProperty(value = "处理单位") | 44 | @ApiModelProperty(value = "处理单位") |
45 | @Dict(dictTable = "ajh_safe_handle_point", dicCode="id", dicText = "company_name") | ||
43 | private String handleDepartName; | 46 | private String handleDepartName; |
44 | /**车牌号*/ | 47 | /**车牌号*/ |
45 | @Excel(name = "车牌号", width = 15) | 48 | @Excel(name = "车牌号", width = 15) | ... | ... |
... | @@ -23,6 +23,7 @@ import java.util.Date; | ... | @@ -23,6 +23,7 @@ import java.util.Date; |
23 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 23 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
24 | import com.baomidou.mybatisplus.core.metadata.IPage; | 24 | import com.baomidou.mybatisplus.core.metadata.IPage; |
25 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 25 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
26 | import com.skua.modules.erp.service.IDistributMaterialService; | ||
26 | import com.skua.modules.erp.service.IPurchaseMaterialService; | 27 | import com.skua.modules.erp.service.IPurchaseMaterialService; |
27 | import com.skua.modules.erp.vo.DistributContractVO; | 28 | import com.skua.modules.erp.vo.DistributContractVO; |
28 | import com.skua.modules.erp.vo.PurchaseContractVO; | 29 | import com.skua.modules.erp.vo.PurchaseContractVO; |
... | @@ -53,6 +54,8 @@ public class DistributContractController { | ... | @@ -53,6 +54,8 @@ public class DistributContractController { |
53 | @Autowired | 54 | @Autowired |
54 | private IDistributContractService distributContractService; | 55 | private IDistributContractService distributContractService; |
55 | @Autowired | 56 | @Autowired |
57 | private IDistributMaterialService distributMaterialService; | ||
58 | @Autowired | ||
56 | private IPurchaseMaterialService purchaseMaterialService ; | 59 | private IPurchaseMaterialService purchaseMaterialService ; |
57 | 60 | ||
58 | @AutoLog(value = "erp分销合同-分页列表查询") | 61 | @AutoLog(value = "erp分销合同-分页列表查询") |
... | @@ -66,9 +69,9 @@ public class DistributContractController { | ... | @@ -66,9 +69,9 @@ public class DistributContractController { |
66 | QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap()); | 69 | QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap()); |
67 | Page<DistributContract> page = new Page<DistributContract>(pageNo, pageSize); | 70 | Page<DistributContract> page = new Page<DistributContract>(pageNo, pageSize); |
68 | //启用状态:=0 | 71 | //启用状态:=0 |
69 | if(StringUtils.isEmpty(distributContract.getUseFlag())){ | 72 | /*if(StringUtils.isEmpty(distributContract.getUseFlag())){ |
70 | queryWrapper.eq("use_flag","0"); | 73 | queryWrapper.eq("use_flag","0"); |
71 | } | 74 | }*/ |
72 | IPage<DistributContract> pageList = distributContractService.page(page, queryWrapper); | 75 | IPage<DistributContract> pageList = distributContractService.page(page, queryWrapper); |
73 | result.setSuccess(true); | 76 | result.setSuccess(true); |
74 | result.setResult(pageList); | 77 | result.setResult(pageList); |
... | @@ -84,15 +87,16 @@ public class DistributContractController { | ... | @@ -84,15 +87,16 @@ public class DistributContractController { |
84 | Result<List<DistributContract>> result = new Result<List<DistributContract>>(); | 87 | Result<List<DistributContract>> result = new Result<List<DistributContract>>(); |
85 | QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap()); | 88 | QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap()); |
86 | // 需要添加条件判断 | 89 | // 需要添加条件判断 |
87 | String use_flag = "0"; | 90 | //String use_flag = "0"; |
88 | queryWrapper.ge("end_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));// 生效时间 《 当前时间 《 失效时间 | 91 | queryWrapper.ge("end_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));// 生效时间 《 当前时间 《 失效时间 |
89 | queryWrapper.le("start_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")); | 92 | queryWrapper.le("start_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")); |
90 | 93 | ||
91 | //启用状态:=0 | 94 | //启用状态:=0 |
92 | if(StringUtils.isNotEmpty(distributContract.getUseFlag())){ | 95 | /*if(StringUtils.isNotEmpty(distributContract.getUseFlag())){ |
93 | use_flag = distributContract.getUseFlag(); | 96 | use_flag = distributContract.getUseFlag(); |
94 | } | 97 | } |
95 | queryWrapper.eq("use_flag",use_flag); | 98 | queryWrapper.eq("use_flag",use_flag);*/ |
99 | |||
96 | List<DistributContract> dataList = distributContractService.list(queryWrapper); | 100 | List<DistributContract> dataList = distributContractService.list(queryWrapper); |
97 | result.setSuccess(true); | 101 | result.setSuccess(true); |
98 | result.setResult(dataList); | 102 | result.setResult(dataList); |
... | @@ -109,6 +113,7 @@ public class DistributContractController { | ... | @@ -109,6 +113,7 @@ public class DistributContractController { |
109 | result.error500(errMsg); | 113 | result.error500(errMsg); |
110 | }else{ | 114 | }else{ |
111 | distributContractService.saveDistributContractVO(distributContract); | 115 | distributContractService.saveDistributContractVO(distributContract); |
116 | distributMaterialService.changePurchaseContract( distributContract.getId() ,distributContract.getUseFlag() ) ; | ||
112 | result.success("添加成功!"); | 117 | result.success("添加成功!"); |
113 | } | 118 | } |
114 | } catch (Exception e) { | 119 | } catch (Exception e) { |
... | @@ -132,6 +137,7 @@ public class DistributContractController { | ... | @@ -132,6 +137,7 @@ public class DistributContractController { |
132 | result.error500(errMsg); | 137 | result.error500(errMsg); |
133 | }else{ | 138 | }else{ |
134 | distributContractService.updateDistributContractVO(distributContract); | 139 | distributContractService.updateDistributContractVO(distributContract); |
140 | distributMaterialService.changePurchaseContract( distributContract.getId() ,distributContract.getUseFlag() ) ; | ||
135 | result.success("修改成功!"); | 141 | result.success("修改成功!"); |
136 | } | 142 | } |
137 | } | 143 | } | ... | ... |
... | @@ -235,10 +235,7 @@ public class MaterialINController { | ... | @@ -235,10 +235,7 @@ public class MaterialINController { |
235 | public Result<MaterialIN> add(@RequestBody MaterialIN materialIN) { | 235 | public Result<MaterialIN> add(@RequestBody MaterialIN materialIN) { |
236 | Result<MaterialIN> result = new Result<MaterialIN>(); | 236 | Result<MaterialIN> result = new Result<MaterialIN>(); |
237 | try { | 237 | try { |
238 | materialINService.save(materialIN); | 238 | materialINService.saveMaterialIN(materialIN); |
239 | MaterialAcceptanceForm materialAcceptanceForm = new MaterialAcceptanceForm(); | ||
240 | materialAcceptanceForm.setId( materialIN.getId() ) ; | ||
241 | materialAcceptanceFormService.save(materialAcceptanceForm); | ||
242 | result.success("添加成功!"); | 239 | result.success("添加成功!"); |
243 | } catch (Exception e) { | 240 | } catch (Exception e) { |
244 | log.error(e.getMessage(),e); | 241 | log.error(e.getMessage(),e); |
... | @@ -256,12 +253,9 @@ public class MaterialINController { | ... | @@ -256,12 +253,9 @@ public class MaterialINController { |
256 | if(materialINEntity==null) { | 253 | if(materialINEntity==null) { |
257 | result.error500("未找到对应实体"); | 254 | result.error500("未找到对应实体"); |
258 | }else { | 255 | }else { |
259 | boolean ok = materialINService.updateById(materialIN); | 256 | materialINService.updateMaterialIN(materialIN); |
260 | //TODO 返回false说明什么? | ||
261 | if(ok) { | ||
262 | result.success("修改成功!"); | 257 | result.success("修改成功!"); |
263 | } | 258 | } |
264 | } | ||
265 | return result; | 259 | return result; |
266 | } | 260 | } |
267 | 261 | ||
... | @@ -297,6 +291,7 @@ public class MaterialINController { | ... | @@ -297,6 +291,7 @@ public class MaterialINController { |
297 | @GetMapping(value = "/queryById") | 291 | @GetMapping(value = "/queryById") |
298 | public Result<MaterialIN> queryById(@RequestParam(name="id",required=true) String id) { | 292 | public Result<MaterialIN> queryById(@RequestParam(name="id",required=true) String id) { |
299 | Result<MaterialIN> result = new Result<MaterialIN>(); | 293 | Result<MaterialIN> result = new Result<MaterialIN>(); |
294 | |||
300 | MaterialIN materialIN = materialINService.getById(id); | 295 | MaterialIN materialIN = materialINService.getById(id); |
301 | 296 | ||
302 | EquipmentSparepartType sparepartType = sparepartTypeService.getById(materialIN.getSparepartType()); | 297 | EquipmentSparepartType sparepartType = sparepartTypeService.getById(materialIN.getSparepartType()); | ... | ... |
... | @@ -36,6 +36,7 @@ public class PurchaseContractController { | ... | @@ -36,6 +36,7 @@ public class PurchaseContractController { |
36 | @Autowired | 36 | @Autowired |
37 | private IERPPurchaseContractService purchaseContractService; | 37 | private IERPPurchaseContractService purchaseContractService; |
38 | 38 | ||
39 | |||
39 | @AutoLog(value = "erp统购合同-分页列表查询") | 40 | @AutoLog(value = "erp统购合同-分页列表查询") |
40 | @ApiOperation(value="erp统购合同-分页列表查询", notes="erp统购合同-分页列表查询") | 41 | @ApiOperation(value="erp统购合同-分页列表查询", notes="erp统购合同-分页列表查询") |
41 | @GetMapping(value = "/list") | 42 | @GetMapping(value = "/list") |
... | @@ -48,13 +49,13 @@ public class PurchaseContractController { | ... | @@ -48,13 +49,13 @@ public class PurchaseContractController { |
48 | Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize); | 49 | Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize); |
49 | 50 | ||
50 | // 需要添加条件判断 | 51 | // 需要添加条件判断 |
51 | if(StringUtils.isEmpty(purchaseContract.getStatus())){ | 52 | /*if(StringUtils.isEmpty(purchaseContract.getStatus())){ |
52 | queryWrapper.lt("status" , "3");// >0 | 53 | queryWrapper.lt("status" , "3");// >0 |
53 | } | 54 | }*/ |
54 | //启用状态:=0 | 55 | //启用状态:=0 |
55 | if(StringUtils.isEmpty(purchaseContract.getUseFlag())){ | 56 | /*if(StringUtils.isEmpty(purchaseContract.getUseFlag())){ |
56 | queryWrapper.eq("use_flag","0"); | 57 | queryWrapper.eq("use_flag","0"); |
57 | } | 58 | }*/ |
58 | // 需要添加条件判断 | 59 | // 需要添加条件判断 |
59 | IPage<ERPPurchaseContract> pageList = purchaseContractService.page(page, queryWrapper); | 60 | IPage<ERPPurchaseContract> pageList = purchaseContractService.page(page, queryWrapper); |
60 | result.setSuccess(true); | 61 | result.setSuccess(true); |
... | @@ -73,10 +74,10 @@ public class PurchaseContractController { | ... | @@ -73,10 +74,10 @@ public class PurchaseContractController { |
73 | Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize); | 74 | Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize); |
74 | 75 | ||
75 | // 需要添加条件判断 | 76 | // 需要添加条件判断 |
76 | /*if(StringUtils.isEmpty(purchaseContract.getStatus())){ | 77 | if(StringUtils.isEmpty(purchaseContract.getStatus())){ |
77 | queryWrapper.gt("status" , "0");// >0 | 78 | queryWrapper.gt("status" , "0");// >0 |
78 | queryWrapper.ne("status" , "2"); // 不等于2 | 79 | queryWrapper.ne("status" , "2"); // 不等于2 |
79 | }*/ | 80 | } |
80 | //启用状态:=0 | 81 | //启用状态:=0 |
81 | if(StringUtils.isEmpty(purchaseContract.getUseFlag())){ | 82 | if(StringUtils.isEmpty(purchaseContract.getUseFlag())){ |
82 | queryWrapper.eq("use_flag","0"); | 83 | queryWrapper.eq("use_flag","0"); |
... | @@ -227,6 +228,9 @@ public class PurchaseContractController { | ... | @@ -227,6 +228,9 @@ public class PurchaseContractController { |
227 | if(purchaseContract==null) { | 228 | if(purchaseContract==null) { |
228 | result.error500("未找到对应实体"); | 229 | result.error500("未找到对应实体"); |
229 | }else { | 230 | }else { |
231 | if("1".equals(purchaseContract.getUseFlag())){ | ||
232 | result.error500("合同状态是:[未启用],不能提交审核!"); | ||
233 | }else{ | ||
230 | purchaseContract.setStatus("1"); | 234 | purchaseContract.setStatus("1"); |
231 | purchaseContract.setApplyUser(BaseContextHandler.getUserId()); | 235 | purchaseContract.setApplyUser(BaseContextHandler.getUserId()); |
232 | purchaseContract.setApplyTime(DateUtils.now()); | 236 | purchaseContract.setApplyTime(DateUtils.now()); |
... | @@ -234,6 +238,8 @@ public class PurchaseContractController { | ... | @@ -234,6 +238,8 @@ public class PurchaseContractController { |
234 | result.setResult(purchaseContract); | 238 | result.setResult(purchaseContract); |
235 | result.setSuccess(true); | 239 | result.setSuccess(true); |
236 | } | 240 | } |
241 | |||
242 | } | ||
237 | return result; | 243 | return result; |
238 | } | 244 | } |
239 | @AutoLog(value = "erp统购合同-审批") | 245 | @AutoLog(value = "erp统购合同-审批") | ... | ... |
... | @@ -35,7 +35,5 @@ public interface DistributMaterialMapper extends BaseMapper<DistributMaterial> { | ... | @@ -35,7 +35,5 @@ public interface DistributMaterialMapper extends BaseMapper<DistributMaterial> { |
35 | * 变更合同 | 35 | * 变更合同 |
36 | * @param id | 36 | * @param id |
37 | */ | 37 | */ |
38 | void changePurchaseContract( @Param("contractId") String id); | 38 | void changePurchaseContract( @Param("contractId") String id ,@Param("delFlag") String delFlag); |
39 | |||
40 | |||
41 | } | 39 | } | ... | ... |
... | @@ -79,5 +79,5 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> { | ... | @@ -79,5 +79,5 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> { |
79 | * 变更合同 | 79 | * 变更合同 |
80 | * @param contractId | 80 | * @param contractId |
81 | */ | 81 | */ |
82 | void changePurchaseContract(@Param("contractId")String contractId); | 82 | void changePurchaseContract(@Param("contractId")String contractId ,@Param("delFlag")String delFlag ); |
83 | } | 83 | } | ... | ... |
... | @@ -32,7 +32,7 @@ | ... | @@ -32,7 +32,7 @@ |
32 | 32 | ||
33 | <!-- 变更合同--> | 33 | <!-- 变更合同--> |
34 | <update id="changePurchaseContract"> | 34 | <update id="changePurchaseContract"> |
35 | update erp_distribut_material set del_flag =1 where contract_id = #{contractId} | 35 | update erp_distribut_material set del_flag =#{delFlag} where contract_id = #{contractId} |
36 | </update> | 36 | </update> |
37 | 37 | ||
38 | 38 | ... | ... |
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | left join equipment_sparepart_supplies ss on m.sparepart_id = ss.id | 14 | left join equipment_sparepart_supplies ss on m.sparepart_id = ss.id |
15 | left join equipment_sparepart_type st on st.id = m.sparepart_type | 15 | left join equipment_sparepart_type st on st.id = m.sparepart_type |
16 | left join ajh_supplier_manage sm on sm.id = m.supplier_id | 16 | left join ajh_supplier_manage sm on sm.id = m.supplier_id |
17 | where m.contract_id = #{contractId} and m.del_flag = 0 | 17 | where m.contract_id = #{contractId} |
18 | </select> | 18 | </select> |
19 | 19 | ||
20 | 20 | ||
... | @@ -37,16 +37,20 @@ | ... | @@ -37,16 +37,20 @@ |
37 | 37 | ||
38 | <select id="queryMaterialByGoodCode" resultType="com.skua.modules.erp.entity.PurchaseMaterial"> | 38 | <select id="queryMaterialByGoodCode" resultType="com.skua.modules.erp.entity.PurchaseMaterial"> |
39 | select st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', pm.* | 39 | select st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', pm.* |
40 | from erp_purchase_material pm | 40 | from ( |
41 | select m.* from erp_purchase_material m , erp_purchase_contract c | ||
42 | where m.contract_id = c.id and c.status = 3 and c.use_flag = '0' | ||
43 | and m.good_code = #{goodCode} and m.depart_id = #{departId} | ||
44 | ) pm | ||
41 | left join equipment_sparepart_type st on st.id = pm.sparepart_type | 45 | left join equipment_sparepart_type st on st.id = pm.sparepart_type |
42 | left join ajh_supplier_manage sm on sm.id = pm.supplier_id | 46 | left join ajh_supplier_manage sm on sm.id = pm.supplier_id |
43 | where pm.good_code = #{goodCode} and pm.depart_id = #{departId} and pm.del_flag = 0 | 47 | |
44 | </select> | 48 | </select> |
45 | 49 | ||
46 | <!-- 校验货号是否唯一 --> | 50 | <!-- 校验货号是否唯一 --> |
47 | <select id="checkGoodCode" resultType="java.lang.Integer"> | 51 | <select id="checkGoodCode" resultType="java.lang.Integer"> |
48 | select count(1) from erp_purchase_material | 52 | select count(1) from erp_purchase_material |
49 | where del_flag = 0 and good_code = #{goodCode} | 53 | where good_code = #{goodCode} |
50 | <if test="id != null and id !=''">and id = #{id}</if> | 54 | <if test="id != null and id !=''">and id = #{id}</if> |
51 | </select> | 55 | </select> |
52 | <!-- 药剂入库查询结果:物料清单--> | 56 | <!-- 药剂入库查询结果:物料清单--> |
... | @@ -56,7 +60,7 @@ | ... | @@ -56,7 +60,7 @@ |
56 | from ( | 60 | from ( |
57 | select dc.contract_code 'distribut_contract_code', dc.id 'distribut_contract_id', dm.distribut_price ,dm.distribut_total_price,dm.material_num ,pm.* | 61 | select dc.contract_code 'distribut_contract_code', dc.id 'distribut_contract_id', dm.distribut_price ,dm.distribut_total_price,dm.material_num ,pm.* |
58 | from erp_distribut_contract dc , erp_distribut_material dm , erp_purchase_material pm | 62 | from erp_distribut_contract dc , erp_distribut_material dm , erp_purchase_material pm |
59 | where dc.id = dm.contract_id and dc.id = #{param.distributContractId } and dm.good_code = pm.good_code and pm.del_flag = 0 and dc.use_flag = '0' | 63 | where dc.id = dm.contract_id and dc.id = #{param.distributContractId } and dm.good_code = pm.good_code and pm.del_flag = '0' and dc.use_flag = '0' and dm.del_flag = '0' and dc.start_time > now() and dc.end_time < now() |
60 | <if test="param.sparepartCode != null and param.sparepartCode !=''">and pm.sparepart_code =#{param.sparepartCode}</if> | 64 | <if test="param.sparepartCode != null and param.sparepartCode !=''">and pm.sparepart_code =#{param.sparepartCode}</if> |
61 | <if test="param.sparepartType != null and param.sparepartType !=''">and pm.sparepart_type in (${param.sparepartType}) </if> | 65 | <if test="param.sparepartType != null and param.sparepartType !=''">and pm.sparepart_type in (${param.sparepartType}) </if> |
62 | <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%${param.sparepartName}%'</if> | 66 | <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%${param.sparepartName}%'</if> |
... | @@ -70,7 +74,7 @@ | ... | @@ -70,7 +74,7 @@ |
70 | </select> | 74 | </select> |
71 | <!-- 变更合同--> | 75 | <!-- 变更合同--> |
72 | <update id="changePurchaseContract"> | 76 | <update id="changePurchaseContract"> |
73 | update erp_purchase_material set del_flag=1 where contract_id =#{contractId} | 77 | update erp_purchase_material set del_flag=#{delFlag} where contract_id =#{contractId} |
74 | </update> | 78 | </update> |
75 | 79 | ||
76 | </mapper> | 80 | </mapper> | ... | ... |
... | @@ -8,4 +8,5 @@ import com.baomidou.mybatisplus.extension.service.IService; | ... | @@ -8,4 +8,5 @@ import com.baomidou.mybatisplus.extension.service.IService; |
8 | */ | 8 | */ |
9 | public interface IDistributMaterialService extends IService<DistributMaterial> { | 9 | public interface IDistributMaterialService extends IService<DistributMaterial> { |
10 | 10 | ||
11 | void changePurchaseContract(String id, String useFlag); | ||
11 | } | 12 | } | ... | ... |
... | @@ -34,5 +34,14 @@ public interface IMaterialINService extends IService<MaterialIN> { | ... | @@ -34,5 +34,14 @@ public interface IMaterialINService extends IService<MaterialIN> { |
34 | */ | 34 | */ |
35 | public IPage<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, MaterialIN materialIN) ; | 35 | public IPage<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, MaterialIN materialIN) ; |
36 | 36 | ||
37 | 37 | /*** | |
38 | * 药剂入库 | ||
39 | * @param materialIN | ||
40 | */ | ||
41 | String saveMaterialIN(MaterialIN materialIN); | ||
42 | /*** | ||
43 | * 药剂入库 | ||
44 | * @param materialIN | ||
45 | */ | ||
46 | String updateMaterialIN(MaterialIN materialIN); | ||
38 | } | 47 | } | ... | ... |
... | @@ -145,9 +145,11 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM | ... | @@ -145,9 +145,11 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM |
145 | @Transactional | 145 | @Transactional |
146 | public String changePurchaseContract(DistributContractVO distributContractVO){ | 146 | public String changePurchaseContract(DistributContractVO distributContractVO){ |
147 | // 变更合同 | 147 | // 变更合同 |
148 | baseMapper.changePurchaseContract( distributContractVO.getId() ); | 148 | String oldContractId = distributContractVO.getId(); |
149 | materialMapper.changePurchaseContract( distributContractVO.getId() ) ; | 149 | baseMapper.changePurchaseContract( oldContractId); |
150 | distributContractVO.setOldContractId(distributContractVO.getId());//保存变更前的的合同编号 | 150 | materialMapper.changePurchaseContract( oldContractId ,"1" ) ; |
151 | |||
152 | distributContractVO.setOldContractId(oldContractId);//保存变更前的的合同编号 | ||
151 | return this.updateDistributContractVO(distributContractVO); | 153 | return this.updateDistributContractVO(distributContractVO); |
152 | } | 154 | } |
153 | 155 | ... | ... |
... | @@ -13,4 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ... | @@ -13,4 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
13 | @Service | 13 | @Service |
14 | public class DistributMaterialServiceImpl extends ServiceImpl<DistributMaterialMapper, DistributMaterial> implements IDistributMaterialService { | 14 | public class DistributMaterialServiceImpl extends ServiceImpl<DistributMaterialMapper, DistributMaterial> implements IDistributMaterialService { |
15 | 15 | ||
16 | public void changePurchaseContract(String id, String useFlag){ | ||
17 | this.baseMapper.changePurchaseContract(id,useFlag); | ||
18 | } | ||
16 | } | 19 | } | ... | ... |
... | @@ -61,7 +61,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -61,7 +61,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
61 | } | 61 | } |
62 | }else{ | 62 | }else{ |
63 | count = purchaseMaterialMapper.checkContractCode(purchaseContractVO.getContractCode() ); | 63 | count = purchaseMaterialMapper.checkContractCode(purchaseContractVO.getContractCode() ); |
64 | if(count > 0 ){ | 64 | if(count > checkCount ){ |
65 | result = "合同编号["+purchaseContractVO.getContractCode()+"]重复"; | 65 | result = "合同编号["+purchaseContractVO.getContractCode()+"]重复"; |
66 | return result; | 66 | return result; |
67 | } | 67 | } |
... | @@ -151,6 +151,8 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -151,6 +151,8 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
151 | } | 151 | } |
152 | purchaseContractVO.setPurchaseMoney( purchaseMoney ); | 152 | purchaseContractVO.setPurchaseMoney( purchaseMoney ); |
153 | int count = this.baseMapper.updateById( purchaseContractVO ); | 153 | int count = this.baseMapper.updateById( purchaseContractVO ); |
154 | |||
155 | purchaseMaterialMapper.changePurchaseContract( purchaseContractVO.getId(),purchaseContractVO.getUseFlag()) ; | ||
154 | return count > 0 ? true :false; | 156 | return count > 0 ? true :false; |
155 | } | 157 | } |
156 | /*** | 158 | /*** |
... | @@ -159,11 +161,12 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -159,11 +161,12 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
159 | */ | 161 | */ |
160 | @Transactional | 162 | @Transactional |
161 | public void changePurchaseContract(PurchaseContractVO purchaseContractVO){ | 163 | public void changePurchaseContract(PurchaseContractVO purchaseContractVO){ |
164 | String oldContractId = purchaseContractVO.getId() ; | ||
162 | // 变更合同 | 165 | // 变更合同 |
163 | baseMapper.changePurchaseContract( purchaseContractVO.getId() ); | 166 | baseMapper.changePurchaseContract(oldContractId ); |
164 | purchaseMaterialMapper.changePurchaseContract( purchaseContractVO.getId() ) ; | 167 | purchaseMaterialMapper.changePurchaseContract( oldContractId,"1") ; |
165 | 168 | ||
166 | purchaseContractVO.setOldContractId(purchaseContractVO.getId()); | 169 | purchaseContractVO.setOldContractId(oldContractId); |
167 | purchaseContractVO.setId(null); | 170 | purchaseContractVO.setId(null); |
168 | this.baseMapper.insert( purchaseContractVO ); | 171 | this.baseMapper.insert( purchaseContractVO ); |
169 | //计算采购金额 | 172 | //计算采购金额 | ... | ... |
... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | import com.skua.core.context.BaseContextHandler; | 5 | import com.skua.core.context.BaseContextHandler; |
6 | import com.skua.core.context.SpringContextUtils; | 6 | import com.skua.core.context.SpringContextUtils; |
7 | import com.skua.modules.common.service.ICommonSqlService; | ||
7 | import com.skua.modules.equipment.dto.EquipmentInDTO; | 8 | import com.skua.modules.equipment.dto.EquipmentInDTO; |
8 | import com.skua.modules.equipment.dto.EquipmentOutDTO; | 9 | import com.skua.modules.equipment.dto.EquipmentOutDTO; |
9 | import com.skua.modules.equipment.entity.EquipmentIn; | 10 | import com.skua.modules.equipment.entity.EquipmentIn; |
... | @@ -11,18 +12,19 @@ import com.skua.modules.equipment.entity.EquipmentInChild; | ... | @@ -11,18 +12,19 @@ import com.skua.modules.equipment.entity.EquipmentInChild; |
11 | import com.skua.modules.equipment.entity.EquipmentOutChild; | 12 | import com.skua.modules.equipment.entity.EquipmentOutChild; |
12 | import com.skua.modules.equipment.service.IEquipmentInService; | 13 | import com.skua.modules.equipment.service.IEquipmentInService; |
13 | import com.skua.modules.equipment.service.IEquipmentOutService; | 14 | import com.skua.modules.equipment.service.IEquipmentOutService; |
14 | import com.skua.modules.erp.entity.ApproveRecord; | 15 | import com.skua.modules.erp.entity.*; |
15 | import com.skua.modules.erp.entity.ERPPurchaseContract; | ||
16 | import com.skua.modules.erp.entity.MaterialIN; | ||
17 | import com.skua.modules.erp.mapper.ApproveRecordMapper; | 16 | import com.skua.modules.erp.mapper.ApproveRecordMapper; |
18 | import com.skua.modules.erp.mapper.ERPPurchaseContractMapper; | 17 | import com.skua.modules.erp.mapper.ERPPurchaseContractMapper; |
19 | import com.skua.modules.erp.mapper.MaterialINMapper; | 18 | import com.skua.modules.erp.mapper.MaterialINMapper; |
20 | import com.skua.modules.erp.service.IERPPurchaseContractService; | 19 | import com.skua.modules.erp.service.IERPPurchaseContractService; |
20 | import com.skua.modules.erp.service.IMaterialAcceptanceFormService; | ||
21 | import com.skua.modules.erp.service.IMaterialINService; | 21 | import com.skua.modules.erp.service.IMaterialINService; |
22 | import com.skua.modules.erp.service.IPurchaseMaterialService; | ||
22 | import com.skua.modules.erp.vo.ArrivalRecordExcelExportVO; | 23 | import com.skua.modules.erp.vo.ArrivalRecordExcelExportVO; |
23 | import com.skua.modules.erp.vo.MaterialINVO; | 24 | import com.skua.modules.erp.vo.MaterialINVO; |
24 | import com.skua.modules.guest.util.DateUtil; | 25 | import com.skua.modules.guest.util.DateUtil; |
25 | import com.skua.modules.quartz.util.BaseUtil; | 26 | import com.skua.modules.quartz.util.BaseUtil; |
27 | import com.skua.modules.supplies.entity.PurchaseContract; | ||
26 | import com.skua.modules.supplies.entity.SuppliesWarehouse; | 28 | import com.skua.modules.supplies.entity.SuppliesWarehouse; |
27 | import com.skua.modules.supplies.service.ISuppliesWarehouseService; | 29 | import com.skua.modules.supplies.service.ISuppliesWarehouseService; |
28 | import com.skua.tool.util.DateUtils; | 30 | import com.skua.tool.util.DateUtils; |
... | @@ -50,12 +52,19 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -50,12 +52,19 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
50 | private ApproveRecordMapper recordMapper; | 52 | private ApproveRecordMapper recordMapper; |
51 | @Autowired | 53 | @Autowired |
52 | private IERPPurchaseContractService purchaseContractService; | 54 | private IERPPurchaseContractService purchaseContractService; |
55 | |||
56 | @Autowired | ||
57 | private IPurchaseMaterialService purchaseMaterialService; | ||
53 | @Autowired | 58 | @Autowired |
54 | private IEquipmentInService equipmentInService; | 59 | private IEquipmentInService equipmentInService; |
55 | @Autowired | 60 | @Autowired |
56 | private IEquipmentOutService equipmentOutService; | 61 | private IEquipmentOutService equipmentOutService; |
57 | @Autowired | 62 | @Autowired |
58 | private ISuppliesWarehouseService warehouseService; | 63 | private ISuppliesWarehouseService warehouseService; |
64 | @Autowired | ||
65 | private IMaterialAcceptanceFormService materialAcceptanceFormService;//验收单 | ||
66 | @Autowired | ||
67 | private ICommonSqlService commonSqlService; | ||
59 | 68 | ||
60 | /*** | 69 | /*** |
61 | * 审核药剂入库单 | 70 | * 审核药剂入库单 |
... | @@ -131,7 +140,39 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -131,7 +140,39 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
131 | public IPage<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, MaterialIN materialIN) { | 140 | public IPage<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, MaterialIN materialIN) { |
132 | return page.setRecords(baseMapper.selectAuditMaterialINByPage(page, materialIN)); | 141 | return page.setRecords(baseMapper.selectAuditMaterialINByPage(page, materialIN)); |
133 | } | 142 | } |
134 | 143 | /*** | |
144 | * 药剂入库 | ||
145 | * @param materialIN | ||
146 | */ | ||
147 | @Transactional | ||
148 | public String saveMaterialIN(MaterialIN materialIN){ | ||
149 | //根据货号查询统购合同编号 | ||
150 | QueryWrapper<PurchaseMaterial> queryWrapper = new QueryWrapper<PurchaseMaterial>(); | ||
151 | queryWrapper.eq("good_code",materialIN.getGoodCode()); | ||
152 | List<PurchaseMaterial> purchaseMaterialList = purchaseMaterialService.list(queryWrapper); | ||
153 | if(purchaseMaterialList != null && !purchaseMaterialList.isEmpty()){ | ||
154 | materialIN.setPurchaseContractId(purchaseMaterialList.get(0).getPurchaseContractId()); | ||
155 | materialIN.setSupplierId(purchaseMaterialList.get(0).getSupplierId()); | ||
156 | } | ||
157 | this.baseMapper.insert(materialIN); | ||
158 | MaterialAcceptanceForm materialAcceptanceForm = new MaterialAcceptanceForm(); | ||
159 | materialAcceptanceForm.setId( materialIN.getId() ) ; | ||
160 | materialAcceptanceFormService.save(materialAcceptanceForm); | ||
161 | return null; | ||
162 | } | ||
163 | @Transactional | ||
164 | public String updateMaterialIN(MaterialIN materialIN){ | ||
165 | //根据货号查询统购合同编号 | ||
166 | QueryWrapper<PurchaseMaterial> queryWrapper = new QueryWrapper<PurchaseMaterial>(); | ||
167 | queryWrapper.eq("good_code",materialIN.getGoodCode()); | ||
168 | List<PurchaseMaterial> purchaseMaterialList = purchaseMaterialService.list(queryWrapper); | ||
169 | if(purchaseMaterialList != null && !purchaseMaterialList.isEmpty()){ | ||
170 | materialIN.setPurchaseContractId(purchaseMaterialList.get(0).getPurchaseContractId()); | ||
171 | materialIN.setSupplierId(purchaseMaterialList.get(0).getSupplierId()); | ||
172 | } | ||
173 | this.baseMapper.updateById(materialIN ); | ||
174 | return null; | ||
175 | } | ||
135 | 176 | ||
136 | /*** | 177 | /*** |
137 | * 出库 | 178 | * 出库 | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/safe/controller/SafeHandlePointController.java
0 → 100644
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.safe.entity; | ||
2 | |||
3 | import java.util.Date; | ||
4 | import com.baomidou.mybatisplus.annotation.IdType; | ||
5 | import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | import com.skua.core.aspect.annotation.Dict; | ||
8 | import io.swagger.annotations.ApiModel; | ||
9 | import io.swagger.annotations.ApiModelProperty; | ||
10 | import lombok.Data; | ||
11 | import lombok.EqualsAndHashCode; | ||
12 | import lombok.experimental.Accessors; | ||
13 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
14 | import org.springframework.format.annotation.DateTimeFormat; | ||
15 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
16 | |||
17 | /** | ||
18 | * 安环处置点 | ||
19 | */ | ||
20 | @Data | ||
21 | @TableName("ajh_safe_handle_point") | ||
22 | @EqualsAndHashCode(callSuper = false) | ||
23 | @Accessors(chain = true) | ||
24 | @ApiModel(value="ajh_safe_handle_point对象", description="安环处置点") | ||
25 | public class SafeHandlePoint { | ||
26 | |||
27 | /**id*/ | ||
28 | @TableId(type = IdType.ID_WORKER_STR) | ||
29 | @ApiModelProperty(value = "id") | ||
30 | private String id; | ||
31 | /**公司名称*/ | ||
32 | @Excel(name = "公司名称", width = 15) | ||
33 | @ApiModelProperty(value = "公司名称") | ||
34 | private String companyName; | ||
35 | /**简称*/ | ||
36 | @Excel(name = "简称", width = 15) | ||
37 | @ApiModelProperty(value = "简称") | ||
38 | private String nameAbbr; | ||
39 | /**处置方式*/ | ||
40 | @Excel(name = "处置方式", width = 15) | ||
41 | @ApiModelProperty(value = "处置方式") | ||
42 | @Dict(dicCode = "safe_handle_type") | ||
43 | private String handleType; | ||
44 | /**日处理能力*/ | ||
45 | @Excel(name = "日处理能力", width = 15) | ||
46 | @ApiModelProperty(value = "日处理能力") | ||
47 | private String dayHandleCapacity; | ||
48 | /**合作状态*/ | ||
49 | @Excel(name = "合作状态", width = 15) | ||
50 | @ApiModelProperty(value = "合作状态") | ||
51 | @Dict(dicCode = "cooperate_status") | ||
52 | private String status; | ||
53 | /**地址*/ | ||
54 | @Excel(name = "地址", width = 15) | ||
55 | @ApiModelProperty(value = "地址") | ||
56 | private String address; | ||
57 | /**附件*/ | ||
58 | @Excel(name = "附件", width = 15) | ||
59 | @ApiModelProperty(value = "附件") | ||
60 | private String filePath; | ||
61 | /**录入全国信息系统:0 是 1否*/ | ||
62 | @Excel(name = "录入全国信息系统:0 是 1否", width = 15) | ||
63 | @ApiModelProperty(value = "录入全国信息系统:0 是 1否") | ||
64 | private Integer enterSystem; | ||
65 | /**关联合同集合*/ | ||
66 | @Excel(name = "关联合同集合", width = 15) | ||
67 | @ApiModelProperty(value = "关联合同集合") | ||
68 | private String contractIds; | ||
69 | /**0未删除1删除*/ | ||
70 | @Excel(name = "0未删除1删除", width = 15) | ||
71 | @ApiModelProperty(value = "0未删除1删除") | ||
72 | private Integer delFlag; | ||
73 | /**createTime*/ | ||
74 | @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
75 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
76 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
77 | @ApiModelProperty(value = "createTime") | ||
78 | private Date createTime; | ||
79 | /**创建人*/ | ||
80 | @Excel(name = "创建人", width = 15) | ||
81 | @ApiModelProperty(value = "创建人") | ||
82 | private String createBy; | ||
83 | /**updateBy*/ | ||
84 | @Excel(name = "updateBy", width = 15) | ||
85 | @ApiModelProperty(value = "updateBy") | ||
86 | private String updateBy; | ||
87 | /**updateTime*/ | ||
88 | @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
89 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
90 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
91 | @ApiModelProperty(value = "updateTime") | ||
92 | private Date updateTime; | ||
93 | } |
1 | package com.skua.modules.safe.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.safe.entity.SafeHandlePoint; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 安环处置点 | ||
11 | */ | ||
12 | public interface SafeHandlePointMapper extends BaseMapper<SafeHandlePoint> { | ||
13 | |||
14 | } |
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | <mapper namespace="com.skua.modules.safe.mapper.SafeHandlePointMapper"> | ||
4 | |||
5 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/SafeHandlePointServiceImpl.java
0 → 100644
1 | package com.skua.modules.safe.service.impl; | ||
2 | |||
3 | import com.skua.modules.safe.entity.SafeHandlePoint; | ||
4 | import com.skua.modules.safe.mapper.SafeHandlePointMapper; | ||
5 | import com.skua.modules.safe.service.ISafeHandlePointService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | |||
10 | /** | ||
11 | * 安环处置点 | ||
12 | */ | ||
13 | @Service | ||
14 | public class SafeHandlePointServiceImpl extends ServiceImpl<SafeHandlePointMapper, SafeHandlePoint> implements ISafeHandlePointService { | ||
15 | |||
16 | } |
... | @@ -133,7 +133,7 @@ mybatis-plus: | ... | @@ -133,7 +133,7 @@ mybatis-plus: |
133 | configuration: | 133 | configuration: |
134 | call-setters-on-nulls: true | 134 | call-setters-on-nulls: true |
135 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 | 135 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 |
136 | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | 136 | #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
137 | #数矿专用配置 | 137 | #数矿专用配置 |
138 | skua: | 138 | skua: |
139 | web-url: http://192.168.100.29:3000 | 139 | web-url: http://192.168.100.29:3000 | ... | ... |
... | @@ -99,6 +99,10 @@ public class MybatisInterceptor implements Interceptor { | ... | @@ -99,6 +99,10 @@ public class MybatisInterceptor implements Interceptor { |
99 | 99 | ||
100 | //material_info | 100 | //material_info |
101 | add("material_info"); | 101 | add("material_info"); |
102 | //三废 | ||
103 | //add("ajh_waste_gas"); | ||
104 | //噪音 | ||
105 | // add("ajh_waste_noise"); | ||
102 | }}; | 106 | }}; |
103 | 107 | ||
104 | //过滤不需要走部门ID查询的URL | 108 | //过滤不需要走部门ID查询的URL | ... | ... |
-
请 注册 或 登录 后发表评论