Merge remote-tracking branch 'origin/master' into master
正在显示
19 个修改的文件
包含
324 行增加
和
308 行删除
1 | package com.skua.modules.erp.controller; | 1 | package com.skua.modules.erp.controller; |
2 | 2 | ||
3 | import java.util.Arrays; | 3 | import java.util.Arrays; |
4 | import java.util.Date; | ||
4 | import java.util.List; | 5 | import java.util.List; |
5 | import java.util.Map; | 6 | import java.util.Map; |
6 | import java.io.IOException; | 7 | import java.io.IOException; |
... | @@ -10,16 +11,23 @@ import javax.servlet.http.HttpServletRequest; | ... | @@ -10,16 +11,23 @@ import javax.servlet.http.HttpServletRequest; |
10 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
11 | import com.skua.core.api.vo.Result; | 12 | import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 13 | import com.skua.core.aspect.annotation.AutoLog; |
14 | import com.skua.core.context.BaseContextHandler; | ||
13 | import com.skua.core.query.QueryGenerator; | 15 | import com.skua.core.query.QueryGenerator; |
14 | import com.skua.core.util.ConvertUtils; | 16 | import com.skua.core.util.ConvertUtils; |
17 | import com.skua.core.util.DateUtils; | ||
15 | import com.skua.modules.erp.entity.ErpSettlement; | 18 | import com.skua.modules.erp.entity.ErpSettlement; |
19 | import com.skua.modules.erp.entity.ErpSettlementItem; | ||
16 | import com.skua.modules.erp.service.IErpSettlementService; | 20 | import com.skua.modules.erp.service.IErpSettlementService; |
17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 21 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
18 | import com.baomidou.mybatisplus.core.metadata.IPage; | 22 | import com.baomidou.mybatisplus.core.metadata.IPage; |
19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 23 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
20 | import com.skua.modules.erp.vo.ErpSettlementVO; | 24 | import com.skua.modules.erp.vo.ErpSettlementVO; |
25 | import com.skua.modules.productionduty.utils.HolidaysUtils; | ||
26 | import com.skua.modules.quartz.util.BaseUtil; | ||
27 | import io.netty.util.internal.StringUtil; | ||
21 | import lombok.extern.slf4j.Slf4j; | 28 | import lombok.extern.slf4j.Slf4j; |
22 | 29 | ||
30 | import org.apache.commons.lang3.StringUtils; | ||
23 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 31 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
24 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 32 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
25 | import org.jeecgframework.poi.excel.entity.ExportParams; | 33 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | @@ -64,19 +72,26 @@ public class ErpSettlementController { | ... | @@ -64,19 +72,26 @@ public class ErpSettlementController { |
64 | @GetMapping(value = "/supplierSettlement") | 72 | @GetMapping(value = "/supplierSettlement") |
65 | public Result<ErpSettlementVO> supplierSettlement(@RequestParam(name="ids",required=true) String ids) { | 73 | public Result<ErpSettlementVO> supplierSettlement(@RequestParam(name="ids",required=true) String ids) { |
66 | Result<ErpSettlementVO> result = new Result<>(); | 74 | Result<ErpSettlementVO> result = new Result<>(); |
67 | List<ErpSettlementVO> settlementVOList = erpSettlementService.checkSupplierByIds(ids); | 75 | ErpSettlementVO erpSettlementVO = null; |
76 | List<ErpSettlementVO> settlementVOList = erpSettlementService.supplierSettlement(ids); | ||
77 | if(settlementVOList==null || settlementVOList.isEmpty()) { | ||
78 | result.error500("根据供应商与合同号未找到实体"); | ||
79 | return result; | ||
80 | } | ||
68 | String supplierName = ""; | 81 | String supplierName = ""; |
69 | if(settlementVOList != null ){ | 82 | if(settlementVOList != null ){ |
70 | for(ErpSettlementVO settlementVO : settlementVOList){ | 83 | for(ErpSettlementVO settlementVO : settlementVOList){ |
84 | erpSettlementVO = settlementVO; | ||
71 | if(supplierName.length() >0 ) supplierName+=","; | 85 | if(supplierName.length() >0 ) supplierName+=","; |
72 | supplierName += settlementVO.getSupplierName(); | 86 | supplierName += settlementVO.getSupplierName(); |
73 | } | 87 | } |
74 | } | 88 | } |
75 | String[] supplierNameList = supplierName.split(","); | 89 | String[] supplierNameList = supplierName.split(","); |
76 | if(supplierNameList.length > 1){ | 90 | if(supplierNameList.length > 1){ |
77 | result.error500("多个供应商:"+supplierName+";请选择一个供应商"); | 91 | result.error500("查询多个供应商:"+supplierName+"记录;请选择某一个供应商"); |
78 | }else{ | 92 | }else{ |
79 | ErpSettlementVO erpSettlementVO = erpSettlementService.supplierSettlementByMaterialIds(ids); | 93 | List<ErpSettlementItem> erpSettlementItemList = erpSettlementService.querySupplierSettlementByMaterialIds(ids); |
94 | erpSettlementVO.setItemList( erpSettlementItemList ); | ||
80 | result.setResult(erpSettlementVO); | 95 | result.setResult(erpSettlementVO); |
81 | result.setSuccess(true); | 96 | result.setSuccess(true); |
82 | } | 97 | } |
... | @@ -88,20 +103,26 @@ public class ErpSettlementController { | ... | @@ -88,20 +103,26 @@ public class ErpSettlementController { |
88 | @GetMapping(value = "/waterDepartSettlement") | 103 | @GetMapping(value = "/waterDepartSettlement") |
89 | public Result<ErpSettlementVO> waterDepartSettlement(@RequestParam(name="ids",required=true) String ids) { | 104 | public Result<ErpSettlementVO> waterDepartSettlement(@RequestParam(name="ids",required=true) String ids) { |
90 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | 105 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); |
91 | 106 | ErpSettlementVO erpSettlementVO = null; | |
92 | List<ErpSettlementVO> settlementVOList = erpSettlementService.checkSupplierByIds(ids); | 107 | List<ErpSettlementVO> settlementVOList = erpSettlementService.waterDepartSettlement(ids); |
108 | if(settlementVOList==null || settlementVOList.isEmpty()) { | ||
109 | result.error500("根据部门与合同号未找到实体"); | ||
110 | return result; | ||
111 | } | ||
93 | String supplierName = ""; | 112 | String supplierName = ""; |
94 | if(settlementVOList != null ){ | 113 | if(settlementVOList != null ){ |
95 | for(ErpSettlementVO settlementVO : settlementVOList){ | 114 | for(ErpSettlementVO settlementVO : settlementVOList){ |
115 | erpSettlementVO = settlementVO; | ||
96 | if(supplierName.length() >0 ) supplierName+=","; | 116 | if(supplierName.length() >0 ) supplierName+=","; |
97 | supplierName += settlementVO.getSupplierName(); | 117 | supplierName += settlementVO.getSupplierName(); |
98 | } | 118 | } |
99 | } | 119 | } |
100 | String[] supplierNameList = supplierName.split(","); | 120 | String[] supplierNameList = supplierName.split(","); |
101 | if(supplierNameList.length > 1){ | 121 | if(supplierNameList.length > 1){ |
102 | result.error500("多个水厂:"+supplierName+";请选择一个水厂"); | 122 | result.error500("查询出多个水厂:"+supplierName+"记录;请选择某一个水厂"); |
103 | }else{ | 123 | }else{ |
104 | ErpSettlementVO erpSettlementVO = erpSettlementService.waterDepartSettlementByMaterialIds(ids); | 124 | List<ErpSettlementItem> settlementItemList = erpSettlementService.queryWaterDepartSettlementByMaterialIds(ids); |
125 | erpSettlementVO.setItemList(settlementItemList ); | ||
105 | result.setResult(erpSettlementVO); | 126 | result.setResult(erpSettlementVO); |
106 | result.setSuccess(true); | 127 | result.setSuccess(true); |
107 | } | 128 | } |
... | @@ -114,6 +135,12 @@ public class ErpSettlementController { | ... | @@ -114,6 +135,12 @@ public class ErpSettlementController { |
114 | public Result<ErpSettlementVO> add(@RequestBody ErpSettlementVO erpSettlementVO) { | 135 | public Result<ErpSettlementVO> add(@RequestBody ErpSettlementVO erpSettlementVO) { |
115 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | 136 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); |
116 | try { | 137 | try { |
138 | if(StringUtils.isEmpty(erpSettlementVO.getApplyTime())){ | ||
139 | erpSettlementVO.setApplyTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | ||
140 | } | ||
141 | if(StringUtils.isEmpty(erpSettlementVO.getApproverSign())){ | ||
142 | erpSettlementVO.setApproverSign(BaseContextHandler.getUserName()); | ||
143 | } | ||
117 | erpSettlementService.saveSettlement(erpSettlementVO); | 144 | erpSettlementService.saveSettlement(erpSettlementVO); |
118 | result.success("添加成功!"); | 145 | result.success("添加成功!"); |
119 | } catch (Exception e) { | 146 | } catch (Exception e) { |
... | @@ -139,6 +166,63 @@ public class ErpSettlementController { | ... | @@ -139,6 +166,63 @@ public class ErpSettlementController { |
139 | } | 166 | } |
140 | return result; | 167 | return result; |
141 | } | 168 | } |
169 | @AutoLog(value = "药剂结算单详情-验收审批") | ||
170 | @ApiOperation(value="药剂结算单详情-验收审批", notes="药剂结算单详情-验收审批") | ||
171 | @DeleteMapping(value = "/auditAccept") | ||
172 | public Result<?> auditAccept(@RequestParam(name="id",required=true) String id) { | ||
173 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | ||
174 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); | ||
175 | |||
176 | erpSettlementEntity.setInspectTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | ||
177 | erpSettlementEntity.setInspectorSign(BaseContextHandler.getUserName()); | ||
178 | if(erpSettlementEntity==null) { | ||
179 | result.error500("未找到对应实体"); | ||
180 | }else { | ||
181 | boolean ok = erpSettlementService.updateById(erpSettlementEntity); | ||
182 | if(ok) { | ||
183 | result.success("验收审批成功!"); | ||
184 | } | ||
185 | } | ||
186 | return result; | ||
187 | } | ||
188 | |||
189 | @AutoLog(value = "药剂结算单详情-经理审批") | ||
190 | @ApiOperation(value="药剂结算单详情-经理审批", notes="药剂结算单详情-经理审批") | ||
191 | @DeleteMapping(value = "/auditManager") | ||
192 | public Result<?> auditManager(@RequestParam(name="id",required=true) String id) { | ||
193 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | ||
194 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); | ||
195 | |||
196 | erpSettlementEntity.setApproveTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | ||
197 | erpSettlementEntity.setApproverSign(BaseContextHandler.getUserName()); | ||
198 | if(erpSettlementEntity==null) { | ||
199 | result.error500("未找到对应实体"); | ||
200 | }else { | ||
201 | boolean ok = erpSettlementService.updateById(erpSettlementEntity); | ||
202 | if(ok) { | ||
203 | result.success("审批成功!"); | ||
204 | } | ||
205 | } | ||
206 | return result; | ||
207 | } | ||
208 | @AutoLog(value = "药剂结算单详情-结算") | ||
209 | @ApiOperation(value="药剂结算单详情-结算", notes="药剂结算单详情-结算") | ||
210 | @DeleteMapping(value = "/settlement") | ||
211 | public Result<?> settlement(@RequestParam(name="id",required=true) String id) { | ||
212 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | ||
213 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); | ||
214 | erpSettlementEntity.setStatus(1); | ||
215 | erpSettlementEntity.setSettlementTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | ||
216 | if(erpSettlementEntity==null) { | ||
217 | result.error500("未找到对应实体"); | ||
218 | }else { | ||
219 | boolean ok = erpSettlementService.updateById(erpSettlementEntity); | ||
220 | if(ok) { | ||
221 | result.success("结算成功!"); | ||
222 | } | ||
223 | } | ||
224 | return result; | ||
225 | } | ||
142 | 226 | ||
143 | @AutoLog(value = "药剂结算单详情-通过id删除") | 227 | @AutoLog(value = "药剂结算单详情-通过id删除") |
144 | @ApiOperation(value="药剂结算单详情-通过id删除", notes="药剂结算单详情-通过id删除") | 228 | @ApiOperation(value="药剂结算单详情-通过id删除", notes="药剂结算单详情-通过id删除") |
... | @@ -166,7 +250,6 @@ public class ErpSettlementController { | ... | @@ -166,7 +250,6 @@ public class ErpSettlementController { |
166 | } | 250 | } |
167 | return result; | 251 | return result; |
168 | } | 252 | } |
169 | |||
170 | @AutoLog(value = "药剂结算单详情-通过id查询") | 253 | @AutoLog(value = "药剂结算单详情-通过id查询") |
171 | @ApiOperation(value="药剂结算单详情-通过id查询", notes="药剂结算单详情-通过id查询") | 254 | @ApiOperation(value="药剂结算单详情-通过id查询", notes="药剂结算单详情-通过id查询") |
172 | @GetMapping(value = "/queryById") | 255 | @GetMapping(value = "/queryById") |
... | @@ -182,7 +265,20 @@ public class ErpSettlementController { | ... | @@ -182,7 +265,20 @@ public class ErpSettlementController { |
182 | return result; | 265 | return result; |
183 | } | 266 | } |
184 | 267 | ||
185 | 268 | @AutoLog(value = "药剂结算单详情-导出:送货单以及物资验收单") | |
269 | @ApiOperation(value="药剂结算单详情-导出:送货单以及物资验收单", notes="药剂结算单详情-导出:送货单以及物资验收单") | ||
270 | @GetMapping(value = "/exportSupplierFormPDF") | ||
271 | public Result<ErpSettlementVO> exportSupplierFormPDF(@RequestParam(name="id",required=true) String id) { | ||
272 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | ||
273 | ErpSettlementVO erpSettlement = erpSettlementService.queryById(id); | ||
274 | if(erpSettlement==null) { | ||
275 | result.error500("未找到对应实体"); | ||
276 | }else { | ||
277 | result.setResult(erpSettlement); | ||
278 | result.setSuccess(true); | ||
279 | } | ||
280 | return result; | ||
281 | } | ||
186 | 282 | ||
187 | @RequestMapping(value = "/exportXls") | 283 | @RequestMapping(value = "/exportXls") |
188 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | 284 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | ... | ... |
1 | package com.skua.modules.erp.controller; | 1 | package com.skua.modules.erp.controller; |
2 | 2 | ||
3 | import java.util.*; | 3 | import java.util.*; |
4 | |||
5 | import javax.servlet.http.HttpServletRequest; | 4 | import javax.servlet.http.HttpServletRequest; |
6 | |||
7 | import com.skua.core.api.vo.Result; | 5 | import com.skua.core.api.vo.Result; |
8 | import com.skua.core.aspect.annotation.AutoLog; | 6 | import com.skua.core.aspect.annotation.AutoLog; |
9 | import com.skua.core.context.BaseContextHandler; | 7 | import com.skua.core.context.BaseContextHandler; | ... | ... |
... | @@ -40,12 +40,15 @@ public class ErpSettlement { | ... | @@ -40,12 +40,15 @@ public class ErpSettlement { |
40 | private String departId; | 40 | private String departId; |
41 | /**采购合同*/ | 41 | /**采购合同*/ |
42 | @ApiModelProperty(value = "采购合同") | 42 | @ApiModelProperty(value = "采购合同") |
43 | @Dict(dictTable = "erp_purchase_contract", dicCode="id", dicText = "contract_code") | ||
44 | private String purchaseContractId; | 43 | private String purchaseContractId; |
45 | /**分销合同*/ | 44 | /**分销合同*/ |
46 | @ApiModelProperty(value = "分销合同") | 45 | @ApiModelProperty(value = "分销合同") |
47 | @Dict(dictTable = "erp_distribut_contract", dicCode="id", dicText = "contract_code") | ||
48 | private String distributContractId; | 46 | private String distributContractId; |
47 | |||
48 | /**合同编号*/ | ||
49 | @ApiModelProperty(value = "合同编号") | ||
50 | private String contractCode; | ||
51 | |||
49 | /**数量*/ | 52 | /**数量*/ |
50 | @Excel(name = "数量", width = 15) | 53 | @Excel(name = "数量", width = 15) |
51 | @ApiModelProperty(value = "数量") | 54 | @ApiModelProperty(value = "数量") |
... | @@ -64,8 +67,8 @@ public class ErpSettlement { | ... | @@ -64,8 +67,8 @@ public class ErpSettlement { |
64 | private String totalPriceTax; | 67 | private String totalPriceTax; |
65 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ | 68 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ |
66 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) | 69 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) |
67 | @ApiModelProperty(value = "签字状态(1-申请,2-验收签字,3-经理签字)") | 70 | @ApiModelProperty(value = "审批状态(1-申请,2-验收签字,3-经理签字)") |
68 | private Integer signStatus; | 71 | private Integer auditStatus; |
69 | /**结算状态(0 未结算 1 已结算)*/ | 72 | /**结算状态(0 未结算 1 已结算)*/ |
70 | @Excel(name = "结算状态(0 未结算 1 已结算)", width = 15) | 73 | @Excel(name = "结算状态(0 未结算 1 已结算)", width = 15) |
71 | @ApiModelProperty(value = "结算状态(0 未结算 1 已结算)") | 74 | @ApiModelProperty(value = "结算状态(0 未结算 1 已结算)") |
... | @@ -74,6 +77,11 @@ public class ErpSettlement { | ... | @@ -74,6 +77,11 @@ public class ErpSettlement { |
74 | @Excel(name = "申请时间", width = 15) | 77 | @Excel(name = "申请时间", width = 15) |
75 | @ApiModelProperty(value = "申请时间") | 78 | @ApiModelProperty(value = "申请时间") |
76 | private String applyTime; | 79 | private String applyTime; |
80 | |||
81 | @Excel(name = "结算日期", width = 15) | ||
82 | @ApiModelProperty(value = "结算日期") | ||
83 | private String settlementTime; | ||
84 | |||
77 | /**申请人签字*/ | 85 | /**申请人签字*/ |
78 | @Excel(name = "申请人签字", width = 15) | 86 | @Excel(name = "申请人签字", width = 15) |
79 | @ApiModelProperty(value = "申请人签字") | 87 | @ApiModelProperty(value = "申请人签字") |
... | @@ -94,6 +102,8 @@ public class ErpSettlement { | ... | @@ -94,6 +102,8 @@ public class ErpSettlement { |
94 | @Excel(name = "审批签字", width = 15) | 102 | @Excel(name = "审批签字", width = 15) |
95 | @ApiModelProperty(value = "审批签字") | 103 | @ApiModelProperty(value = "审批签字") |
96 | private String approverSign; | 104 | private String approverSign; |
105 | |||
106 | |||
97 | /**备注*/ | 107 | /**备注*/ |
98 | @Excel(name = "备注", width = 15) | 108 | @Excel(name = "备注", width = 15) |
99 | @ApiModelProperty(value = "备注") | 109 | @ApiModelProperty(value = "备注") | ... | ... |
... | @@ -30,6 +30,9 @@ public class ErpSettlementItem { | ... | @@ -30,6 +30,9 @@ public class ErpSettlementItem { |
30 | @TableId(type = IdType.ID_WORKER_STR) | 30 | @TableId(type = IdType.ID_WORKER_STR) |
31 | @ApiModelProperty(value = "主键") | 31 | @ApiModelProperty(value = "主键") |
32 | private String id; | 32 | private String id; |
33 | |||
34 | @ApiModelProperty(value = "药剂入库单编号") | ||
35 | private String materialInId; | ||
33 | /**结算单编号*/ | 36 | /**结算单编号*/ |
34 | @Excel(name = "结算单编号", width = 15) | 37 | @Excel(name = "结算单编号", width = 15) |
35 | @ApiModelProperty(value = "结算单编号") | 38 | @ApiModelProperty(value = "结算单编号") |
... | @@ -99,19 +102,10 @@ public class ErpSettlementItem { | ... | @@ -99,19 +102,10 @@ public class ErpSettlementItem { |
99 | 102 | ||
100 | /**采购合同*/ | 103 | /**采购合同*/ |
101 | @ApiModelProperty(value = "采购合同") | 104 | @ApiModelProperty(value = "采购合同") |
102 | @Dict(dictTable = "erp_purchase_contract", dicCode="id", dicText = "contract_code") | ||
103 | private String purchaseContractId; | 105 | private String purchaseContractId; |
104 | /**分销合同*/ | 106 | /**分销合同*/ |
105 | 107 | ||
106 | @ApiModelProperty(value = "分销合同") | 108 | @ApiModelProperty(value = "分销合同") |
107 | @Dict(dictTable = "erp_distribut_contract", dicCode="id", dicText = "contract_code") | ||
108 | private String distributContractId; | 109 | private String distributContractId; |
109 | 110 | ||
110 | @TableField(exist=false) | ||
111 | @ApiModelProperty(value = "供应商id") | ||
112 | private String supplierId; | ||
113 | |||
114 | @TableField(exist=false) | ||
115 | @ApiModelProperty(value = "部门编号") | ||
116 | private String departId; | ||
117 | } | 111 | } | ... | ... |
... | @@ -60,6 +60,12 @@ public class PurchaseMaterial { | ... | @@ -60,6 +60,12 @@ public class PurchaseMaterial { |
60 | @Excel(name = "计量单位", width = 15) | 60 | @Excel(name = "计量单位", width = 15) |
61 | @ApiModelProperty(value = "计量单位") | 61 | @ApiModelProperty(value = "计量单位") |
62 | private String measuringUnit; | 62 | private String measuringUnit; |
63 | @ApiModelProperty(value = "产地") | ||
64 | private String goodOrigin; | ||
65 | @ApiModelProperty(value = "品牌") | ||
66 | private String goodBrand; | ||
67 | |||
68 | |||
63 | /**计划采购数量*/ | 69 | /**计划采购数量*/ |
64 | @Excel(name = "计划采购数量", width = 15) | 70 | @Excel(name = "计划采购数量", width = 15) |
65 | @ApiModelProperty(value = "计划采购数量") | 71 | @ApiModelProperty(value = "计划采购数量") | ... | ... |
... | @@ -12,10 +12,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ... | @@ -12,10 +12,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
12 | * 药剂结算单详情 | 12 | * 药剂结算单详情 |
13 | */ | 13 | */ |
14 | public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> { | 14 | public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> { |
15 | //校验供应商 | 15 | //供应商结算 |
16 | List<ErpSettlementVO> checkSupplierByIds(@Param("ids") String ids); | 16 | List<ErpSettlementVO> supplierSettlement(@Param("ids") String ids); |
17 | //校验水厂 | 17 | //水厂结算 |
18 | List<ErpSettlementVO> checkWaterDepartByIds(@Param("ids")String ids); | 18 | List<ErpSettlementVO> waterDepartSettlement(@Param("ids")String ids); |
19 | // 根据入库单ids,获取结算单 | 19 | |
20 | List<ErpSettlementItem> querySettlementByMaterialIds(@Param("ids") String materialIds); | 20 | // 根据入库单ids,获取【供应商】结算单详情 |
21 | List<ErpSettlementItem> querySupplierSettlementByMaterialIds(@Param("ids") String materialIds); | ||
22 | |||
23 | // 根据入库单ids,获取【水厂】结算单详情 | ||
24 | List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds(@Param("ids") String materialIds); | ||
21 | } | 25 | } | ... | ... |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 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.erp.mapper.ErpSettlementMapper"> | 3 | <mapper namespace="com.skua.modules.erp.mapper.ErpSettlementMapper"> |
4 | 4 | <!--供应商结算 --> | |
5 | <!--校验供应商--> | 5 | <select id="supplierSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> |
6 | <select id="checkSupplierByIds" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> | 6 | select sm.supp_name 'supplierName', d.depart_name ,aaa.* from ( |
7 | select mi.supplier_id , sm.supp_name 'supplier_name' from erp_material_in mi ,ajh_supplier_manage sm | 7 | select pm.supplier_id ,pc.contract_code, mi.purchase_contract_id ,pc.project_name, mi.depart_id, |
8 | where mi.supplier_id = sm.id | 8 | sum(mi.material_num) material_num, round(sum(pm.unit_price * mi.material_num),2) total_price, |
9 | and mi.id in (${ids}) group by mi.supplier_id | 9 | round(sum(pm.unit_price * mi.material_num *(100 + pm.tax_amount) /100),2) total_price_tax |
10 | </select> | 10 | from erp_material_in mi ,erp_purchase_contract pc , erp_purchase_material pm |
11 | <!-- 校验水厂名称 --> | 11 | where mi.audit_status = 3 and mi.purchase_contract_id = pc.id and pm.good_code = mi.good_code and pm.contract_id = mi.purchase_contract_id |
12 | <select id="checkWaterDepartByIds" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> | 12 | and mi.id in (${ids}) |
13 | select mi.depart_id , d.depart_name from erp_material_in mi ,sys_depart d | 13 | group by pm.supplier_id ,pc.contract_code |
14 | where mi.depart_id = d.id | 14 | )aaa |
15 | and mi.id in (${ids}) group by mi.depart_id | 15 | left join ajh_supplier_manage sm on aaa.supplier_id = sm.id |
16 | left join sys_depart d on aaa.depart_id = d.id | ||
16 | </select> | 17 | </select> |
17 | 18 | <!-- 根据入库单ids,获取供应商结算单详情--> | |
18 | <!-- 根据入库单ids,获取结算单--> | 19 | <select id="querySupplierSettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> |
19 | <select id="querySettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> | 20 | select pc.contract_code, mi.purchase_contract_id , pm.unit_price ,mi.material_num, pm.tax_amount ,(pm.unit_price * mi.material_num) total_price,(pm.unit_price * mi.material_num *(100+pm.tax_amount) /100) total_price_tax, |
20 | select mi.* from erp_material_in mi where mi.id in (${ids}) group by mi.create_time | 21 | mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, mi.measuring_unit,mi.good_code,mi.id 'material_in_id' |
22 | from erp_material_in mi ,erp_purchase_contract pc , erp_purchase_material pm | ||
23 | where mi.audit_status = 3 and mi.purchase_contract_id = pc.id and pm.good_code = mi.good_code and pm.contract_id = mi.purchase_contract_id | ||
24 | and mi.id in (${ids}) | ||
25 | order by mi.arrive_time asc | ||
21 | </select> | 26 | </select> |
22 | 27 | ||
23 | <select id="querySettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> | 28 | <!--水厂结算 --> |
24 | select mi.* from erp_material_in mi where mi.id in (${ids}) group by mi.create_time | 29 | <select id="waterDepartSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> |
30 | select d.depart_name ,aaa.* from ( | ||
31 | select mi.depart_id ,dc.contract_code, mi.distribut_contract_id ,sum(mi.material_num) material_num, dc.contract_name 'project_name', round(sum(dm.distribut_price * mi.material_num),2) total_price, | ||
32 | round(sum(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100),2) total_price_tax | ||
33 | from erp_material_in mi ,erp_distribut_contract dc , erp_distribut_material dm | ||
34 | where mi.audit_status = 3 and mi.distribut_contract_id = dc.id and dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id | ||
35 | and mi.id in (${ids}) | ||
36 | group by mi.depart_id ,dc.contract_code | ||
37 | )aaa | ||
38 | left join sys_depart d on aaa.depart_id = d.id | ||
25 | </select> | 39 | </select> |
26 | 40 | <!-- 根据入库单ids,获取水厂结算单详情--> | |
27 | <select id="querySettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> | 41 | <select id="queryWaterDepartSettlementByMaterialIds" resultType="com.skua.modules.erp.entity.ErpSettlementItem"> |
28 | select mi.* from erp_material_in mi where mi.id in (${ids}) group by mi.create_time | 42 | select dc.contract_code, mi.distribut_contract_id , dm.distribut_price 'unit_price' , mi.material_num, dm.tax_amount ,(dm.distribut_price * mi.material_num) total_price, |
43 | (dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100) total_price_tax, | ||
44 | mi.arrive_time ,mi.remark,mi.sparepart_type,mi.sparepart_id,mi.sparepart_name,mi.sparepart_code,mi.specification, | ||
45 | mi.measuring_unit,mi.good_code,mi.id 'material_in_id' | ||
46 | from erp_material_in mi ,erp_distribut_contract dc , erp_distribut_material dm | ||
47 | where mi.audit_status = 3 and mi.distribut_contract_id = dc.id and dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id | ||
48 | and mi.id in (${ids}) | ||
49 | order by mi.arrive_time asc | ||
29 | </select> | 50 | </select> |
30 | </mapper> | 51 | </mapper> | ... | ... |
... | @@ -2,7 +2,9 @@ package com.skua.modules.erp.service; | ... | @@ -2,7 +2,9 @@ package com.skua.modules.erp.service; |
2 | 2 | ||
3 | import com.skua.modules.erp.entity.ErpSettlement; | 3 | import com.skua.modules.erp.entity.ErpSettlement; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | import com.skua.modules.erp.entity.ErpSettlementItem; | ||
5 | import com.skua.modules.erp.vo.ErpSettlementVO; | 6 | import com.skua.modules.erp.vo.ErpSettlementVO; |
7 | import org.apache.ibatis.annotations.Param; | ||
6 | 8 | ||
7 | import java.util.List; | 9 | import java.util.List; |
8 | 10 | ||
... | @@ -10,20 +12,6 @@ import java.util.List; | ... | @@ -10,20 +12,6 @@ import java.util.List; |
10 | * 药剂结算单详情 | 12 | * 药剂结算单详情 |
11 | */ | 13 | */ |
12 | public interface IErpSettlementService extends IService<ErpSettlement> { | 14 | public interface IErpSettlementService extends IService<ErpSettlement> { |
13 | |||
14 | /*** | ||
15 | * 校验供应商 | ||
16 | * @param ids | ||
17 | * @return | ||
18 | */ | ||
19 | List<ErpSettlementVO> checkSupplierByIds(String ids); | ||
20 | |||
21 | /*** | ||
22 | * 校验水厂 | ||
23 | * @param ids | ||
24 | * @return | ||
25 | */ | ||
26 | List<ErpSettlementVO> checkWaterDepartByIds(String ids); | ||
27 | /** | 15 | /** |
28 | * 新增结算单 | 16 | * 新增结算单 |
29 | * @param erpSettlementVO | 17 | * @param erpSettlementVO |
... | @@ -42,9 +30,15 @@ public interface IErpSettlementService extends IService<ErpSettlement> { | ... | @@ -42,9 +30,15 @@ public interface IErpSettlementService extends IService<ErpSettlement> { |
42 | // 删除 | 30 | // 删除 |
43 | void delById(String id); | 31 | void delById(String id); |
44 | 32 | ||
45 | //供应商结算清单 | 33 | //供应商结算 |
46 | ErpSettlementVO supplierSettlementByMaterialIds(String materialIds); | 34 | List<ErpSettlementVO> supplierSettlement(String materialInIds); |
47 | //水厂结束清单 | 35 | // 根据入库单ids,获取【供应商】结算单详情 |
48 | ErpSettlementVO waterDepartSettlementByMaterialIds(String materialIds); | 36 | List<ErpSettlementItem> querySupplierSettlementByMaterialIds(String materialInIds); |
37 | |||
38 | |||
39 | //水厂结算 | ||
40 | List<ErpSettlementVO> waterDepartSettlement(String materialInIds); | ||
41 | // 根据入库单ids,获取【水厂】结算单详情 | ||
42 | List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds( String materialInIds); | ||
49 | 43 | ||
50 | } | 44 | } | ... | ... |
... | @@ -84,63 +84,22 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E | ... | @@ -84,63 +84,22 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E |
84 | settlementItemMapper.deleteBySettlementId(settlementId); | 84 | settlementItemMapper.deleteBySettlementId(settlementId); |
85 | } | 85 | } |
86 | 86 | ||
87 | /*** | 87 | //供应商结算 |
88 | * 校验供应商 | 88 | public List<ErpSettlementVO> supplierSettlement(String materialInIds){ |
89 | * @param ids | 89 | return this.baseMapper.supplierSettlement( materialInIds ); |
90 | * @return | ||
91 | */ | ||
92 | public List<ErpSettlementVO> checkSupplierByIds(String ids){ | ||
93 | ids = JSUtils.quoteEach(ids,","); | ||
94 | return this.baseMapper.checkSupplierByIds( ids ); | ||
95 | } | 90 | } |
96 | 91 | //水厂结算 | |
97 | /*** | 92 | public List<ErpSettlementVO> waterDepartSettlement(String materialInIds){ |
98 | * 校验水厂 | 93 | return this.baseMapper.waterDepartSettlement( materialInIds ); |
99 | * @param ids | ||
100 | * @return | ||
101 | */ | ||
102 | public List<ErpSettlementVO> checkWaterDepartByIds(String ids){ | ||
103 | ids = JSUtils.quoteEach(ids,","); | ||
104 | return this.baseMapper.checkWaterDepartByIds( ids ); | ||
105 | } | 94 | } |
106 | 95 | ||
107 | //供应商结算清单 | 96 | // 根据入库单ids,获取【供应商】结算单详情 |
108 | public ErpSettlementVO supplierSettlementByMaterialIds(String materialIds){ | 97 | public List<ErpSettlementItem> querySupplierSettlementByMaterialIds(String materialInIds){ |
109 | List<ErpSettlementItem> itemList = this.baseMapper.querySettlementByMaterialIds( materialIds ); | 98 | return this.baseMapper.querySupplierSettlementByMaterialIds( materialInIds ); |
110 | ErpSettlementVO erpSettlementVO = new ErpSettlementVO(); | ||
111 | if(itemList != null){ | ||
112 | for(ErpSettlementItem settlementItem : itemList){ | ||
113 | erpSettlementVO.setSupplierId(settlementItem.getSupplierId() ); | ||
114 | erpSettlementVO.setPurchaseContractId( settlementItem.getPurchaseContractId() ); | ||
115 | erpSettlementVO.setDistributContractId( settlementItem.getDistributContractId()); | ||
116 | //数量 | ||
117 | //金额 | ||
118 | //税额 | ||
119 | //价税合计 | ||
120 | } | ||
121 | } | ||
122 | erpSettlementVO.setItemList( itemList ); | ||
123 | SupplierManage supplierManage = supplierManageMapper.selectById(erpSettlementVO.getSupplierId()); | ||
124 | if(supplierManage != null ){ | ||
125 | erpSettlementVO.setSupplierName( supplierManage.getSuppName() ); | ||
126 | } | ||
127 | return erpSettlementVO; | ||
128 | } | 99 | } |
129 | //水厂结束清单 | ||
130 | public ErpSettlementVO waterDepartSettlementByMaterialIds(String materialIds){ | ||
131 | List<ErpSettlementItem> itemList = this.baseMapper.querySettlementByMaterialIds( materialIds ); | ||
132 | ErpSettlementVO erpSettlementVO = new ErpSettlementVO(); | ||
133 | if(itemList != null){ | ||
134 | for(ErpSettlementItem settlementItem : itemList){ | ||
135 | erpSettlementVO.setSupplierId(settlementItem.getSupplierId() ); | ||
136 | } | ||
137 | } | ||
138 | erpSettlementVO.setItemList( itemList ); | ||
139 | SysDepart depart = departMapper.selectById(erpSettlementVO.getDepartId()); | ||
140 | if(depart != null ){ | ||
141 | erpSettlementVO.setDepartName( depart.getDepartName() ); | ||
142 | } | ||
143 | return erpSettlementVO; | ||
144 | 100 | ||
101 | // 根据入库单ids,获取【水厂】结算单详情 | ||
102 | public List<ErpSettlementItem> queryWaterDepartSettlementByMaterialIds( String materialInIds){ | ||
103 | return this.baseMapper.queryWaterDepartSettlementByMaterialIds( materialInIds ); | ||
145 | } | 104 | } |
146 | } | 105 | } | ... | ... |
1 | package com.skua.modules.erp.vo; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.TableField; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * 药剂结算单详情 | ||
12 | */ | ||
13 | @Data | ||
14 | @ApiModel(value="erp_settlement数据传输对象", description="药剂结算单详情") | ||
15 | public class ErpSettlementFormVO { | ||
16 | @ApiModelProperty(value = "项目名称") | ||
17 | private String projectName; | ||
18 | |||
19 | @ApiModelProperty(value = "集团名称") | ||
20 | private String jtDepartName; | ||
21 | |||
22 | @ApiModelProperty(value = "供应商名称") | ||
23 | private String supplierName; | ||
24 | |||
25 | @ApiModelProperty(value = "部门名称") | ||
26 | private String departName; | ||
27 | |||
28 | @ApiModelProperty(value = "开始时间") | ||
29 | private String startTime; | ||
30 | @ApiModelProperty(value = "结束时间") | ||
31 | private String endTime; | ||
32 | |||
33 | /**合同编号*/ | ||
34 | @ApiModelProperty(value = "合同编号") | ||
35 | private String contractCode; | ||
36 | |||
37 | @ApiModelProperty(value = "物料类别编号") | ||
38 | private String sparepartTypeName; | ||
39 | |||
40 | @ApiModelProperty(value = "物料名称") | ||
41 | private String sparepartName; | ||
42 | |||
43 | @ApiModelProperty(value = "规格型号") | ||
44 | private String specification; | ||
45 | |||
46 | @TableField(exist=false) | ||
47 | @ApiModelProperty(value = "结算清单") | ||
48 | private List<ErpSettlementItemVO> itemList ; | ||
49 | |||
50 | } |
... | @@ -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.modules.erp.entity.ErpSettlementItem; | ||
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; |
... | @@ -20,77 +21,20 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -20,77 +21,20 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
20 | */ | 21 | */ |
21 | @Data | 22 | @Data |
22 | @ApiModel(value="erp_settlement_item数据传输对象", description="药剂结算单详情") | 23 | @ApiModel(value="erp_settlement_item数据传输对象", description="药剂结算单详情") |
23 | public class ErpSettlementItemVO { | 24 | public class ErpSettlementItemVO extends ErpSettlementItem { |
24 | 25 | /**外观情况*/ | |
25 | /**主键*/ | 26 | @ApiModelProperty(value = "外观情况") |
26 | @ApiModelProperty(value = "主键") | 27 | private String appearanceInfo; |
27 | private String id; | 28 | /**货物与合同清单匹配情况*/ |
28 | /**结算单编号*/ | 29 | @ApiModelProperty(value = "货物与合同清单匹配情况") |
29 | @Excel(name = "结算单编号", width = 15) | 30 | private String matchedInfo; |
30 | @ApiModelProperty(value = "结算单编号") | 31 | /**处理意见*/ |
31 | private String settlementId; | 32 | @ApiModelProperty(value = "处理意见") |
32 | /**采购合同编号*/ | 33 | private String handleMsg; |
33 | @Excel(name = "采购合同编号", width = 15) | 34 | /**送货/供方人员签字*/ |
34 | @ApiModelProperty(value = "采购合同编号") | 35 | @ApiModelProperty(value = "送货/供方人员签字") |
35 | private String contractId; | 36 | private String senderSign; |
36 | /**物料类别编号*/ | 37 | /**收货人员签字*/ |
37 | @Excel(name = "物料类别编号", width = 15) | 38 | @ApiModelProperty(value = "收货人员签字") |
38 | @ApiModelProperty(value = "物料类别编号") | 39 | private String receiverSign; |
39 | private String sparepartType; | ||
40 | /**物料编号*/ | ||
41 | @Excel(name = "物料编号", width = 15) | ||
42 | @ApiModelProperty(value = "物料编号") | ||
43 | private String sparepartId; | ||
44 | /**物料名称*/ | ||
45 | @Excel(name = "物料名称", width = 15) | ||
46 | @ApiModelProperty(value = "物料名称") | ||
47 | private String sparepartName; | ||
48 | /**物料编码*/ | ||
49 | @Excel(name = "物料编码", width = 15) | ||
50 | @ApiModelProperty(value = "物料编码") | ||
51 | private String sparepartCode; | ||
52 | /**货号*/ | ||
53 | @Excel(name = "货号", width = 15) | ||
54 | @ApiModelProperty(value = "货号") | ||
55 | private String goodCode; | ||
56 | /**规格型号*/ | ||
57 | @Excel(name = "规格型号", width = 15) | ||
58 | @ApiModelProperty(value = "规格型号") | ||
59 | private String specification; | ||
60 | /**计量单位*/ | ||
61 | @Excel(name = "计量单位", width = 15) | ||
62 | @ApiModelProperty(value = "计量单位") | ||
63 | private String measuringUnit; | ||
64 | /**数量*/ | ||
65 | @Excel(name = "数量", width = 15) | ||
66 | @ApiModelProperty(value = "数量") | ||
67 | private String materialNum; | ||
68 | /**单价*/ | ||
69 | @Excel(name = "单价", width = 15) | ||
70 | @ApiModelProperty(value = "单价") | ||
71 | private String unitPrice; | ||
72 | /**总价*/ | ||
73 | @Excel(name = "总价", width = 15) | ||
74 | @ApiModelProperty(value = "总价") | ||
75 | private String totalPrice; | ||
76 | /**税额*/ | ||
77 | @Excel(name = "税额", width = 15) | ||
78 | @ApiModelProperty(value = "税额") | ||
79 | private String taxAmount; | ||
80 | /**价税合计*/ | ||
81 | @Excel(name = "价税合计", width = 15) | ||
82 | @ApiModelProperty(value = "价税合计") | ||
83 | private String totalPriceTax; | ||
84 | /**到货时间*/ | ||
85 | @Excel(name = "到货时间", width = 15) | ||
86 | @ApiModelProperty(value = "到货时间") | ||
87 | private String arriveTime; | ||
88 | /**备注*/ | ||
89 | @Excel(name = "备注", width = 15) | ||
90 | @ApiModelProperty(value = "备注") | ||
91 | private String remark; | ||
92 | /**删除标识,0:有效,1:删除*/ | ||
93 | @Excel(name = "删除标识,0:有效,1:删除", width = 15) | ||
94 | @ApiModelProperty(value = "删除标识,0:有效,1:删除") | ||
95 | private Integer delFlag; | ||
96 | } | 40 | } | ... | ... |
... | @@ -25,6 +25,9 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -25,6 +25,9 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
25 | @Data | 25 | @Data |
26 | @ApiModel(value="erp_settlement数据传输对象", description="药剂结算单详情") | 26 | @ApiModel(value="erp_settlement数据传输对象", description="药剂结算单详情") |
27 | public class ErpSettlementVO extends ErpSettlement { | 27 | public class ErpSettlementVO extends ErpSettlement { |
28 | @TableField(exist=false) | ||
29 | @ApiModelProperty(value = "项目名称") | ||
30 | private String projectName; | ||
28 | 31 | ||
29 | @TableField(exist=false) | 32 | @TableField(exist=false) |
30 | @ApiModelProperty(value = "供应商名称") | 33 | @ApiModelProperty(value = "供应商名称") | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.modules.custom.vo.FCustomReportDatasetVO; | ... | @@ -9,6 +9,7 @@ import com.skua.modules.custom.vo.FCustomReportDatasetVO; |
9 | import com.skua.modules.report.vo.DataVO; | 9 | import com.skua.modules.report.vo.DataVO; |
10 | import com.skua.modules.report.vo.JnhbLargeScreenVO; | 10 | import com.skua.modules.report.vo.JnhbLargeScreenVO; |
11 | import com.skua.modules.report.vo.JnhbReportData; | 11 | import com.skua.modules.report.vo.JnhbReportData; |
12 | import com.skua.modules.report.vo.largeScreen.ResultNumberVO; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * 数据集管理 | 15 | * 数据集管理 |
... | @@ -112,10 +113,20 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData | ... | @@ -112,10 +113,20 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData |
112 | * @return | 113 | * @return |
113 | */ | 114 | */ |
114 | JnhbLargeScreenVO jnhbLargeScreenShow(String departIds,String time); | 115 | JnhbLargeScreenVO jnhbLargeScreenShow(String departIds,String time); |
115 | 116 | /** | |
117 | * 节能环保 大屏展示:ESG减排趋势:吨消减耗能:排放指标 | ||
118 | * @return | ||
119 | */ | ||
120 | JnhbLargeScreenVO jnhbLargeScreenShowESG(String departIds, String time); | ||
116 | /** | 121 | /** |
117 | * 节能环保:大屏展示:头部数据 | 122 | * 节能环保:大屏展示:头部数据 |
118 | * @return | 123 | * @return |
119 | */ | 124 | */ |
120 | JnhbLargeScreenVO jnhbLargeScreenShowHeader(String departIds,String time); | 125 | List<ResultNumberVO> jnhbLargeScreenShowHeader(String departIds,String time); |
126 | /** | ||
127 | * 节能环保:大屏展示:消减量 | ||
128 | * @return | ||
129 | */ | ||
130 | List<ResultNumberVO> jnhbLargeScreenShowResultNumber(String departIds, String time); | ||
131 | |||
121 | } | 132 | } | ... | ... |
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.report.controller; | 1 | package com.skua.modules.report.controller; |
2 | 2 | ||
3 | import cn.hutool.core.collection.CollectionUtil; | ||
4 | import com.google.common.collect.Maps; | 3 | import com.google.common.collect.Maps; |
5 | import com.skua.common.report.ReportViewUtil; | 4 | import com.skua.common.report.ReportViewUtil; |
6 | import com.skua.core.api.vo.Result; | 5 | import com.skua.core.api.vo.Result; |
... | @@ -10,9 +9,9 @@ import com.skua.core.util.ConvertUtils; | ... | @@ -10,9 +9,9 @@ import com.skua.core.util.ConvertUtils; |
10 | import com.skua.core.util.DateUtils; | 9 | import com.skua.core.util.DateUtils; |
11 | import com.skua.modules.custom.service.IFCustomReportDatasetService; | 10 | import com.skua.modules.custom.service.IFCustomReportDatasetService; |
12 | import com.skua.modules.report.service.IReportDataService; | 11 | import com.skua.modules.report.service.IReportDataService; |
13 | import com.skua.modules.report.vo.DataVO; | ||
14 | import com.skua.modules.report.vo.JnhbLargeScreenVO; | 12 | import com.skua.modules.report.vo.JnhbLargeScreenVO; |
15 | import com.skua.modules.report.vo.JnhbReportData; | 13 | import com.skua.modules.report.vo.JnhbReportData; |
14 | import com.skua.modules.report.vo.largeScreen.ResultNumberVO; | ||
16 | import io.swagger.annotations.Api; | 15 | import io.swagger.annotations.Api; |
17 | import io.swagger.annotations.ApiOperation; | 16 | import io.swagger.annotations.ApiOperation; |
18 | import lombok.extern.slf4j.Slf4j; | 17 | import lombok.extern.slf4j.Slf4j; |
... | @@ -202,13 +201,35 @@ public class ReportDataController { | ... | @@ -202,13 +201,35 @@ public class ReportDataController { |
202 | } | 201 | } |
203 | 202 | ||
204 | @AutoLog(value = "节能环保:大屏展示") | 203 | @AutoLog(value = "节能环保:大屏展示") |
205 | @ApiOperation(value = "节能环保:大屏展示:头部数据", notes = "节能环保:大屏展示(time:yyyy-MM)") | 204 | @ApiOperation(value = "节能环保:大屏展示:ESG减排趋势:吨消减耗能:排放指标", notes = "节能环保:大屏展示:ESG减排趋势:吨消减耗能:排放指标(time:yyyy-MM)") |
206 | @GetMapping(value = "/jnhbLargeScreenShow_header") | 205 | @GetMapping(value = "/jnhbLargeScreenShowESG") |
207 | public Result<JnhbLargeScreenVO> jnhbLargeScreenShowHeader( @RequestParam(name="time") String time) { //time | 206 | public Result<JnhbLargeScreenVO> jnhbLargeScreenShowESG( @RequestParam(name="time") String time) { //time |
208 | Result<JnhbLargeScreenVO> result = new Result<>(); | 207 | Result<JnhbLargeScreenVO> result = new Result<>(); |
209 | String departIds = BaseContextHandler.getDeparts(); | 208 | String departIds = BaseContextHandler.getDeparts(); |
210 | JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShow(departIds,time); | 209 | JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShowESG(departIds,time); |
211 | result.setResult(jnhbLargeScreenVO); | 210 | result.setResult(jnhbLargeScreenVO); |
212 | return result; | 211 | return result; |
213 | } | 212 | } |
213 | |||
214 | @AutoLog(value = "节能环保:大屏展示") | ||
215 | @ApiOperation(value = "节能环保:大屏展示:头部数据", notes = "节能环保:大屏展示(time:yyyy-MM)") | ||
216 | @GetMapping(value = "/jnhbLargeScreenShow_header") | ||
217 | public Result<List<ResultNumberVO>> jnhbLargeScreenShowHeader( @RequestParam(name="time") String time) { //time | ||
218 | Result<List<ResultNumberVO>> result = new Result<>(); | ||
219 | String departIds = BaseContextHandler.getDeparts(); | ||
220 | List<ResultNumberVO> dataList = fCustomReportDatasetService.jnhbLargeScreenShowHeader(departIds,time); | ||
221 | result.setResult(dataList); | ||
222 | return result; | ||
223 | } | ||
224 | |||
225 | @AutoLog(value = "节能环保:大屏展示") | ||
226 | @ApiOperation(value = "节能环保:大屏展示:消减量", notes = "节能环保:大屏展示:消减量(time:yyyy-MM)") | ||
227 | @GetMapping(value = "/jnhbLargeScreenShowResultNumber") | ||
228 | public Result<List<ResultNumberVO>> jnhbLargeScreenShowResultNumber( @RequestParam(name="time") String time) { //time | ||
229 | Result<List<ResultNumberVO>> result = new Result<>(); | ||
230 | String departIds = BaseContextHandler.getDeparts(); | ||
231 | List<ResultNumberVO> dataLIst = fCustomReportDatasetService.jnhbLargeScreenShowResultNumber(departIds,time); | ||
232 | result.setResult(dataLIst); | ||
233 | return result; | ||
234 | } | ||
214 | } | 235 | } | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbLargeScreenExpressionVO.java
deleted
100644 → 0
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import cn.hutool.core.convert.Convert; | ||
4 | import com.skua.core.util.ConvertUtils; | ||
5 | import com.skua.modules.flow.utils.ConvertUtil; | ||
6 | import io.swagger.annotations.ApiModelProperty; | ||
7 | import lombok.Data; | ||
8 | import org.apache.commons.lang3.StringUtils; | ||
9 | |||
10 | /** | ||
11 | * @auther kangwei | ||
12 | * @create 2024-10-21-9:17 | ||
13 | */ | ||
14 | @Data | ||
15 | public class JnhbLargeScreenExpressionVO { | ||
16 | //头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02, | ||
17 | private String head_wssjcll_expression ="0";//污水处理量 | ||
18 | private String head_wsfhl_expression="0";//系统负荷率 | ||
19 | private String head_dh_expression="0";//电耗 | ||
20 | private String head_qy_expression="0"; //汽油 | ||
21 | private String head_xssyl_expression="0";//薪水 | ||
22 | private String head_zhnyxhl_expression="0";//综合能耗 | ||
23 | private String head_eyhtpfl_expression="0";//C02 | ||
24 | private String head_dsdh_expression = "0";//吨水电耗 | ||
25 | |||
26 | private String head_wssjcll_expression_hb ="0";//污水处理量 | ||
27 | private String head_wsfhl_expression_hb ="0";//系统负荷率 | ||
28 | private String head_dh_expression_hb ="0";//电耗 | ||
29 | private String head_qy_expression_hb ="0"; //汽油 | ||
30 | private String head_xssyl_expression_hb ="0";//薪水 | ||
31 | private String head_zhnyxhl_expression_hb ="0";//综合能耗 | ||
32 | private String head_eyhtpfl_expression_hb="0";//C02 | ||
33 | private String head_dsdh_expression_hb = "0";//吨水电耗 | ||
34 | |||
35 | private String head_wssjcll_expression_tb ="0";//污水处理量 | ||
36 | private String head_wsfhl_expression_tb="0";//系统负荷率 | ||
37 | private String head_dh_expression_tb ="0";//电耗 | ||
38 | private String head_qy_expression_tb ="0"; //汽油 | ||
39 | private String head_xssyl_expression_tb ="0";//薪水 | ||
40 | private String head_zhnyxhl_expression_tb ="0";//综合能耗 | ||
41 | private String head_eyhtpfl_expression_tb ="0";//C02 | ||
42 | private String head_dsdh_expression_tb = "0";//吨水电耗 | ||
43 | |||
44 | |||
45 | /*** | ||
46 | * 消减量统计 | ||
47 | * @param reportData | ||
48 | */ | ||
49 | private String reduce_statistics_cod = "0";//消减量统计 | ||
50 | private String reduce_statistics_nh3n = "0";//消减量统计 | ||
51 | private String reduce_statistics_tp = "0";//消减量统计 | ||
52 | private String reduce_statistics_tn = "0";//消减量统计 | ||
53 | |||
54 | private String reduce_statistics_cod_hb = "0";//消减量统计 | ||
55 | private String reduce_statistics_nh3n_hb = "0";//消减量统计 | ||
56 | private String reduce_statistics_tp_hb = "0";//消减量统计 | ||
57 | private String reduce_statistics_tn_hb = "0";//消减量统计 | ||
58 | |||
59 | private String reduce_statistics_cod_tb = "0";//消减量统计 | ||
60 | private String reduce_statistics_nh3n_tb = "0";//消减量统计 | ||
61 | private String reduce_statistics_tp_tb = "0";//消减量统计 | ||
62 | private String reduce_statistics_tn_tb = "0";//消减量统计 | ||
63 | |||
64 | public void setReduceStatistics(JnhbReportData reportData){ | ||
65 | if(StringUtils.isNotEmpty( reportData.getCodxjl() )) reduce_statistics_cod = ConvertUtils.getString(reportData.getCodxjl() ,"0") +" + " + reduce_statistics_cod;//污水处理量 ; | ||
66 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_nh3n = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_nh3n;//系统负荷率 ; | ||
67 | if(StringUtils.isNotEmpty( reportData.getTpxjl() )) reduce_statistics_tp = ConvertUtils.getString(reportData.getTpxjl() ,"0") +" + " + reduce_statistics_tp;//电耗 ; | ||
68 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_tn = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_tn;//汽油 ; | ||
69 | } | ||
70 | public void setReduceStatisticsHB(JnhbReportData reportData){ | ||
71 | if(StringUtils.isNotEmpty( reportData.getCodxjl() )) reduce_statistics_cod_hb = ConvertUtils.getString(reportData.getCodxjl() ,"0") +" + " + reduce_statistics_cod_hb;//污水处理量 ; | ||
72 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_nh3n_hb = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_nh3n_hb;//系统负荷率 ; | ||
73 | if(StringUtils.isNotEmpty( reportData.getTpxjl() )) reduce_statistics_tp_hb = ConvertUtils.getString(reportData.getTpxjl() ,"0") +" + " + reduce_statistics_tp_hb;//电耗 ; | ||
74 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_tn_hb = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_tn_hb;//汽油 ; | ||
75 | } | ||
76 | |||
77 | public void setReduceStatisticsTB(JnhbReportData reportData){ | ||
78 | if(StringUtils.isNotEmpty( reportData.getCodxjl() )) reduce_statistics_cod_tb = ConvertUtils.getString(reportData.getCodxjl() ,"0") +" + " + reduce_statistics_cod_tb;//污水处理量 ; | ||
79 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_nh3n_tb = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_nh3n_tb;//系统负荷率 ; | ||
80 | if(StringUtils.isNotEmpty( reportData.getTpxjl() )) reduce_statistics_tp_tb = ConvertUtils.getString(reportData.getTpxjl() ,"0") +" + " + reduce_statistics_tp_tb;//电耗 ; | ||
81 | if(StringUtils.isNotEmpty( reportData.getTnxjl() )) reduce_statistics_tn_tb = ConvertUtils.getString(reportData.getTnxjl() ,"0") +" + " + reduce_statistics_tn_tb;//汽油 ; | ||
82 | } | ||
83 | } |
... | @@ -17,42 +17,31 @@ import java.util.List; | ... | @@ -17,42 +17,31 @@ import java.util.List; |
17 | @ApiModel(value="生产运营--大屏对象", description="生产运营--月度生产数据报表") | 17 | @ApiModel(value="生产运营--大屏对象", description="生产运营--月度生产数据报表") |
18 | public class JnhbLargeScreenVO { | 18 | public class JnhbLargeScreenVO { |
19 | @ApiModelProperty(value = "头部统计数值") | 19 | @ApiModelProperty(value = "头部统计数值") |
20 | private List<ResultNumberVO> headStatisticsList = new ArrayList<>(); | 20 | private List<ResultNumberVO> headStatisticsList = null; |
21 | 21 | ||
22 | @ApiModelProperty(value = "各站点能源消耗排名") | 22 | @ApiModelProperty(value = "各站点能源消耗排名") |
23 | private List<PowerConsumeVO> powerConsumeVOList = new ArrayList(); | 23 | private List<PowerConsumeVO> powerConsumeVOList = null; |
24 | 24 | ||
25 | @ApiModelProperty(value = "负荷率对象") | 25 | @ApiModelProperty(value = "负荷率对象") |
26 | private List<LoadRateVO> loadRateVOList = new ArrayList<>(); | 26 | private List<LoadRateVO> loadRateVOList = null; |
27 | 27 | ||
28 | @ApiModelProperty(value = "CO2排放排名") | 28 | @ApiModelProperty(value = "CO2排放排名") |
29 | private List<ResultNumberVO> co2DataList = new ArrayList<>(); | 29 | private List<ResultNumberVO> co2DataList = null; |
30 | 30 | ||
31 | 31 | ||
32 | @ApiModelProperty(value = "消减量统计") | 32 | @ApiModelProperty(value = "消减量统计") |
33 | private List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4); | 33 | private List<ResultNumberVO> reduceStatisticsList = null; |
34 | 34 | ||
35 | @ApiModelProperty(value = "ESG减排趋势") | 35 | @ApiModelProperty(value = "ESG减排趋势") |
36 | private List<ResultChartsVO> esgChartsList= new ArrayList<>(); | 36 | private List<ResultChartsVO> esgChartsList= null; |
37 | 37 | ||
38 | @ApiModelProperty(value = "吨消减能耗") | 38 | @ApiModelProperty(value = "吨消减能耗") |
39 | private List<ResultChartsVO> energyConsumeChartsList= new ArrayList<>(); | 39 | private List<ResultChartsVO> energyConsumeChartsList = null; |
40 | 40 | ||
41 | @ApiModelProperty(value = "废物处理对象集合") | 41 | @ApiModelProperty(value = "废物处理对象集合") |
42 | private List<WasteMaterialVO> wasteMaterialList = new ArrayList<>();//废物处理对象集合 | 42 | private List<WasteMaterialVO> wasteMaterialList = null;//废物处理对象集合 |
43 | @ApiModelProperty(value = "一级能耗设备数量") | 43 | @ApiModelProperty(value = "一级能耗设备数量") |
44 | private Integer equipmentL1; | 44 | private Integer equipmentL1; |
45 | @ApiModelProperty(value = "二级能耗设备") | 45 | @ApiModelProperty(value = "二级能耗设备") |
46 | private Integer equipmentL2; | 46 | private Integer equipmentL2; |
47 | |||
48 | /*** | ||
49 | * 设置:消减统计记录 | ||
50 | */ | ||
51 | public void setReduceStatistics(JnhbLargeScreenExpressionVO largeScreenExpressionVO){ | ||
52 | this.getReduceStatisticsList().add( new ResultNumberVO( "cod","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod(),"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_cod_tb(),"0")) );//吨水电耗 | ||
53 | this.getReduceStatisticsList().add( new ResultNumberVO( "NH3-N","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_nh3n_tb(),"0")) );//吨水电耗 | ||
54 | this.getReduceStatisticsList().add( new ResultNumberVO( "TP","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tp_tb(),"0")) );//吨水电耗 | ||
55 | this.getReduceStatisticsList().add( new ResultNumberVO( "TN","",JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn_hb() ,"0") , JSUtils.executeExpression(largeScreenExpressionVO.getReduce_statistics_tn_tb(),"0")) );//吨水电耗 | ||
56 | } | ||
57 | |||
58 | } | 47 | } | ... | ... |
... | @@ -18,7 +18,7 @@ public interface IEquipmentSparepartTypeService extends IService<EquipmentSparep | ... | @@ -18,7 +18,7 @@ public interface IEquipmentSparepartTypeService extends IService<EquipmentSparep |
18 | * @param sparepartTypeId | 18 | * @param sparepartTypeId |
19 | * @return | 19 | * @return |
20 | */ | 20 | */ |
21 | public Set<String> getAllChildrenSparepartTypeIds( String sparepartTypeId ); | 21 | Set<String> getAllChildrenSparepartTypeIds( String sparepartTypeId ); |
22 | /** | 22 | /** |
23 | * <pre> | 23 | * <pre> |
24 | * 保存并修改父级叶子节点状态 | 24 | * 保存并修改父级叶子节点状态 | ... | ... |
... | @@ -7,7 +7,6 @@ import com.skua.modules.system.model.DepartIdModel; | ... | @@ -7,7 +7,6 @@ import com.skua.modules.system.model.DepartIdModel; |
7 | import com.skua.modules.system.model.SysDepartTreeModel; | 7 | import com.skua.modules.system.model.SysDepartTreeModel; |
8 | import com.skua.modules.system.vo.DepartTree; | 8 | import com.skua.modules.system.vo.DepartTree; |
9 | import com.skua.modules.system.vo.SysDeptUserVO; | 9 | import com.skua.modules.system.vo.SysDeptUserVO; |
10 | |||
11 | import java.util.List; | 10 | import java.util.List; |
12 | import java.util.Map; | 11 | import java.util.Map; |
13 | import java.util.Set; | 12 | import java.util.Set; |
... | @@ -23,7 +22,7 @@ public interface ISysDepartService extends IService<SysDepart>{ | ... | @@ -23,7 +22,7 @@ public interface ISysDepartService extends IService<SysDepart>{ |
23 | * @param departId | 22 | * @param departId |
24 | * @return | 23 | * @return |
25 | */ | 24 | */ |
26 | public Set<String> getAllChildrenDepartIds(String departId); | 25 | Set<String> getAllChildrenDepartIds(String departId); |
27 | 26 | ||
28 | /** | 27 | /** |
29 | * 查询所有部门信息,并分节点进行显示 | 28 | * 查询所有部门信息,并分节点进行显示 | ... | ... |
-
请 注册 或 登录 后发表评论