Merge remote-tracking branch 'origin/master'
正在显示
23 个修改的文件
包含
384 行增加
和
43 行删除
... | @@ -66,6 +66,9 @@ public class ErpSettlementController { | ... | @@ -66,6 +66,9 @@ public class ErpSettlementController { |
66 | } | 66 | } |
67 | //结算类型 | 67 | //结算类型 |
68 | queryWrapper.eq("settlement_type" ,erpSettlement.getSettlementType()) ; | 68 | queryWrapper.eq("settlement_type" ,erpSettlement.getSettlementType()) ; |
69 | |||
70 | //根据角色限制列表 | ||
71 | |||
69 | /*String startDate = req.getParameter("startDate"); | 72 | /*String startDate = req.getParameter("startDate"); |
70 | if(StringUtils.isNotEmpty(startDate)){ | 73 | if(StringUtils.isNotEmpty(startDate)){ |
71 | startDate = startDate+" 00:00:00"; | 74 | startDate = startDate+" 00:00:00"; |
... | @@ -273,12 +276,12 @@ public class ErpSettlementController { | ... | @@ -273,12 +276,12 @@ public class ErpSettlementController { |
273 | @AutoLog(value = "药剂结算单详情-验收审批") | 276 | @AutoLog(value = "药剂结算单详情-验收审批") |
274 | @ApiOperation(value="药剂结算单详情-验收审批", notes="药剂结算单详情-验收审批") | 277 | @ApiOperation(value="药剂结算单详情-验收审批", notes="药剂结算单详情-验收审批") |
275 | @GetMapping(value = "/auditAccept") | 278 | @GetMapping(value = "/auditAccept") |
276 | public Result<?> auditAccept(@RequestParam(name="id",required=true) String id,Integer auditStatus ,String approveMessage ) { | 279 | public Result<?> auditAccept(@RequestParam(name="id",required=true) String id ) { |
277 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | 280 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); |
278 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); | 281 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); |
279 | erpSettlementEntity.setInspectTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | 282 | erpSettlementEntity.setInspectTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); |
280 | erpSettlementEntity.setAuditStatus(auditStatus); | 283 | erpSettlementEntity.setAuditStatus(2); |
281 | erpSettlementEntity.setApproveMessage(approveMessage); | 284 | //erpSettlementEntity.setApproveMessage(approveMessage); |
282 | erpSettlementEntity.setInspectorSign(BaseContextHandler.getUserName()); | 285 | erpSettlementEntity.setInspectorSign(BaseContextHandler.getUserName()); |
283 | if(erpSettlementEntity==null) { | 286 | if(erpSettlementEntity==null) { |
284 | result.error500("未找到对应实体"); | 287 | result.error500("未找到对应实体"); |
... | @@ -294,13 +297,13 @@ public class ErpSettlementController { | ... | @@ -294,13 +297,13 @@ public class ErpSettlementController { |
294 | @AutoLog(value = "药剂结算单详情-经理审批") | 297 | @AutoLog(value = "药剂结算单详情-经理审批") |
295 | @ApiOperation(value="药剂结算单详情-经理审批", notes="药剂结算单详情-经理审批") | 298 | @ApiOperation(value="药剂结算单详情-经理审批", notes="药剂结算单详情-经理审批") |
296 | @GetMapping(value = "/auditManager") | 299 | @GetMapping(value = "/auditManager") |
297 | public Result<?> auditManager(@RequestParam(name="id",required=true) String id,Integer auditStatus ,String approveMessage ) { | 300 | public Result<?> auditManager(@RequestParam(name="id",required=true) String id ) { |
298 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); | 301 | Result<ErpSettlementVO> result = new Result<ErpSettlementVO>(); |
299 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); | 302 | ErpSettlement erpSettlementEntity = erpSettlementService.getById(id); |
300 | erpSettlementEntity.setApproveTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); | 303 | erpSettlementEntity.setApproveTime(DateUtils.format(new Date(), HolidaysUtils.DATE_TIME_PATTERN)); |
301 | erpSettlementEntity.setApproverSign(BaseContextHandler.getUserName()); | 304 | erpSettlementEntity.setApproverSign(BaseContextHandler.getUserName()); |
302 | erpSettlementEntity.setAuditStatus(auditStatus); | 305 | erpSettlementEntity.setAuditStatus(3); |
303 | erpSettlementEntity.setApproveMessage(approveMessage); | 306 | //erpSettlementEntity.setApproveMessage(approveMessage); |
304 | if(erpSettlementEntity==null) { | 307 | if(erpSettlementEntity==null) { |
305 | result.error500("未找到对应实体"); | 308 | result.error500("未找到对应实体"); |
306 | }else { | 309 | }else { | ... | ... |
... | @@ -7,6 +7,7 @@ import com.skua.core.context.SpringContextUtils; | ... | @@ -7,6 +7,7 @@ import com.skua.core.context.SpringContextUtils; |
7 | import com.skua.core.query.QueryGenerator; | 7 | import com.skua.core.query.QueryGenerator; |
8 | import com.skua.modules.erp.entity.MaterialIN; | 8 | import com.skua.modules.erp.entity.MaterialIN; |
9 | import com.skua.modules.erp.vo.PurchaseAnalysisVO; | 9 | import com.skua.modules.erp.vo.PurchaseAnalysisVO; |
10 | import com.skua.tool.util.DateUtils; | ||
10 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
11 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
12 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
... | @@ -31,11 +32,14 @@ public class PurchaseAnalysisController { | ... | @@ -31,11 +32,14 @@ public class PurchaseAnalysisController { |
31 | public Result<PurchaseAnalysisVO> settlementList(String startDate,String endDate) { | 32 | public Result<PurchaseAnalysisVO> settlementList(String startDate,String endDate) { |
32 | Result<PurchaseAnalysisVO> result = new Result<PurchaseAnalysisVO>(); | 33 | Result<PurchaseAnalysisVO> result = new Result<PurchaseAnalysisVO>(); |
33 | 34 | ||
35 | int year = DateUtils.getDateYear(startDate); | ||
36 | startDate = year+"-01-01"; | ||
37 | endDate = year+"-12-31"; | ||
34 | String drugStorage = getJdbcTemplate().queryForObject("select round(ifnull(sum(material_num),0),2) from erp_material_in where audit_status = '3' and arrive_time >='"+startDate+"' and arrive_time <= '"+endDate+"'",String.class); | 38 | String drugStorage = getJdbcTemplate().queryForObject("select round(ifnull(sum(material_num),0),2) from erp_material_in where audit_status = '3' and arrive_time >='"+startDate+"' and arrive_time <= '"+endDate+"'",String.class); |
35 | String purchaseMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(purchase_money),0),2) from erp_purchase_contract where use_flag = 0 and status = 3 and project_time >='"+startDate+"' and project_time <= '"+endDate+"'",String.class); | 39 | String purchaseMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(purchase_money),0),2) from erp_purchase_contract where use_flag = 0 and status = 3 and project_time >='"+startDate+"' and project_time <= '"+endDate+"'",String.class); |
36 | String distributMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(distribut_money),0),2) from erp_distribut_contract where status = 3 and purchase_time >='"+startDate+"' and purchase_time <= '"+endDate+"' ",String.class); | 40 | String distributMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(distribut_money),0),2) from erp_distribut_contract where purchase_time >='"+startDate+"' and purchase_time <= '"+endDate+"' ",String.class); |
37 | String supplierMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '0' and t.status = '1' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class); | 41 | String supplierMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '0' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class); |
38 | String waterDepartMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '1' and t.status = '1' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class); | 42 | String waterDepartMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '1' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class); |
39 | 43 | ||
40 | PurchaseAnalysisVO purchaseAnalysisVO = new PurchaseAnalysisVO( drugStorage, purchaseMoney, distributMoney, supplierMoneyByJs, waterDepartMoneyByJs); | 44 | PurchaseAnalysisVO purchaseAnalysisVO = new PurchaseAnalysisVO( drugStorage, purchaseMoney, distributMoney, supplierMoneyByJs, waterDepartMoneyByJs); |
41 | result.setSuccess(true); | 45 | result.setSuccess(true); | ... | ... |
... | @@ -62,7 +62,7 @@ public class ErpSettlement { | ... | @@ -62,7 +62,7 @@ public class ErpSettlement { |
62 | private String totalPriceTax; | 62 | private String totalPriceTax; |
63 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ | 63 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ |
64 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) | 64 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) |
65 | @ApiModelProperty(value = "审批状态(1-申请,2-验收签字,3-经理签字,4 验收驳回,5 经理驳回)") | 65 | @ApiModelProperty(value = "审批状态(1-申请,2-验收签字,3-经理签字,-2 验收驳回,-3 经理驳回)") |
66 | private Integer auditStatus; | 66 | private Integer auditStatus; |
67 | /**结算状态(0 未结算 1 已结算)*/ | 67 | /**结算状态(0 未结算 1 已结算)*/ |
68 | @Excel(name = "结算状态(0 未结算 1 已结算)", width = 15) | 68 | @Excel(name = "结算状态(0 未结算 1 已结算)", width = 15) | ... | ... |
... | @@ -64,6 +64,7 @@ | ... | @@ -64,6 +64,7 @@ |
64 | 64 | ||
65 | <select id="queryById" resultType="com.skua.modules.erp.vo.MaterialINVO"> | 65 | <select id="queryById" resultType="com.skua.modules.erp.vo.MaterialINVO"> |
66 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, | 66 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, |
67 | pm.unit_price 'purchasePrice', | ||
67 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', | 68 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', |
68 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, | 69 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, |
69 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type | 70 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type |
... | @@ -80,6 +81,7 @@ | ... | @@ -80,6 +81,7 @@ |
80 | 81 | ||
81 | <select id="arrivalRecordList" resultType="com.skua.modules.erp.vo.MaterialINVO"> | 82 | <select id="arrivalRecordList" resultType="com.skua.modules.erp.vo.MaterialINVO"> |
82 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, | 83 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, |
84 | pm.unit_price 'purchasePrice', | ||
83 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', | 85 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', |
84 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, | 86 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, |
85 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type | 87 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type | ... | ... |
... | @@ -279,7 +279,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -279,7 +279,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
279 | materialIN.setMaterialNum(purchaseMaterialVO.getMaterialNum()); | 279 | materialIN.setMaterialNum(purchaseMaterialVO.getMaterialNum()); |
280 | 280 | ||
281 | materialIN.setSparepartId(purchaseMaterialVO.getSparepartId()); | 281 | materialIN.setSparepartId(purchaseMaterialVO.getSparepartId()); |
282 | 282 | materialIN.setSparepartName(purchaseMaterialVO.getSparepartName()); | |
283 | materialIN.setSparepartType(purchaseMaterialVO.getSparepartType()); | 283 | materialIN.setSparepartType(purchaseMaterialVO.getSparepartType()); |
284 | materialIN.setGoodCode(purchaseMaterialVO.getGoodCode()); | 284 | materialIN.setGoodCode(purchaseMaterialVO.getGoodCode()); |
285 | materialIN.setSupplierId(purchaseMaterialVO.getSupplierId()); | 285 | materialIN.setSupplierId(purchaseMaterialVO.getSupplierId()); | ... | ... |
... | @@ -29,7 +29,7 @@ public class MaterialINArrivalRecordVO { | ... | @@ -29,7 +29,7 @@ public class MaterialINArrivalRecordVO { |
29 | @ApiModelProperty(value = "到货时间") | 29 | @ApiModelProperty(value = "到货时间") |
30 | private String arriveTime; | 30 | private String arriveTime; |
31 | 31 | ||
32 | @Excel(name = "使用单位", width = 15,orderNum = "3",dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 32 | @Excel(name = "使用单位", width = 25,orderNum = "3",dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
33 | @ApiModelProperty(value = "所属机构") | 33 | @ApiModelProperty(value = "所属机构") |
34 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 34 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
35 | private String departId; | 35 | private String departId; |
... | @@ -46,7 +46,7 @@ public class MaterialINArrivalRecordVO { | ... | @@ -46,7 +46,7 @@ public class MaterialINArrivalRecordVO { |
46 | @ApiModelProperty(value = "数量") | 46 | @ApiModelProperty(value = "数量") |
47 | private String materialNum; | 47 | private String materialNum; |
48 | 48 | ||
49 | @Excel(name = "供货单位", width = 15,orderNum = "7",dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name") | 49 | @Excel(name = "供货单位", width = 30,orderNum = "7",dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name") |
50 | @ApiModelProperty(value = "供应商编号") | 50 | @ApiModelProperty(value = "供应商编号") |
51 | @Dict(dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name") | 51 | @Dict(dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name") |
52 | private String supplierId; | 52 | private String supplierId; |
... | @@ -63,9 +63,11 @@ public class MaterialINArrivalRecordVO { | ... | @@ -63,9 +63,11 @@ public class MaterialINArrivalRecordVO { |
63 | @Dict(dictTable = "erp_distribut_contract", dicCode="id", dicText = "contract_code") | 63 | @Dict(dictTable = "erp_distribut_contract", dicCode="id", dicText = "contract_code") |
64 | private String distributContractId; | 64 | private String distributContractId; |
65 | /**采购单价*/ | 65 | /**采购单价*/ |
66 | @Excel(name = "采购单价", width = 15,orderNum = "10") | ||
66 | @ApiModelProperty(value = "采购单价") | 67 | @ApiModelProperty(value = "采购单价") |
67 | private String purchasePrice; | 68 | private String purchasePrice; |
68 | /**分销单价*/ | 69 | /**分销单价*/ |
70 | @Excel(name = "分销单价", width = 15,orderNum = "10") | ||
69 | @ApiModelProperty(value = "分销单价") | 71 | @ApiModelProperty(value = "分销单价") |
70 | private String distributPrice; | 72 | private String distributPrice; |
71 | /**采购总价*/ | 73 | /**采购总价*/ | ... | ... |
... | @@ -67,6 +67,7 @@ public class MaterialINVO extends MaterialIN { | ... | @@ -67,6 +67,7 @@ public class MaterialINVO extends MaterialIN { |
67 | /**采购总价*/ | 67 | /**采购总价*/ |
68 | @TableField(exist = false) | 68 | @TableField(exist = false) |
69 | @ApiModelProperty(value = "采购总价") | 69 | @ApiModelProperty(value = "采购总价") |
70 | @Excel(name = "采购总价", width = 15) | ||
70 | private String purchaseTotalPrice; | 71 | private String purchaseTotalPrice; |
71 | /**价税合计*/ | 72 | /**价税合计*/ |
72 | @TableField(exist = false) | 73 | @TableField(exist = false) |
... | @@ -77,14 +78,6 @@ public class MaterialINVO extends MaterialIN { | ... | @@ -77,14 +78,6 @@ public class MaterialINVO extends MaterialIN { |
77 | private List<PurchaseMaterialVO> materiaList; | 78 | private List<PurchaseMaterialVO> materiaList; |
78 | 79 | ||
79 | 80 | ||
80 | public String getPurchaseTotalPrice() { | ||
81 | if(StringUtils.isNotEmpty(this.getPurchasePrice()) && StringUtils.isNotEmpty(this.getMaterialNum())){ | ||
82 | purchaseTotalPrice = JSUtils.multiply(purchasePrice ,this.getMaterialNum()) ; | ||
83 | } | ||
84 | return purchaseTotalPrice; | ||
85 | } | ||
86 | |||
87 | |||
88 | public String getTotalPriceTax() { | 81 | public String getTotalPriceTax() { |
89 | //不含税总价 = 含税总价 / (1 + 税率) | 82 | //不含税总价 = 含税总价 / (1 + 税率) |
90 | if(StringUtils.isNotEmpty(this.getTaxAmount()) && StringUtils.isNotEmpty(this.getDistributPrice()) && StringUtils.isNotEmpty(this.getMaterialNum())){ | 83 | if(StringUtils.isNotEmpty(this.getTaxAmount()) && StringUtils.isNotEmpty(this.getDistributPrice()) && StringUtils.isNotEmpty(this.getMaterialNum())){ | ... | ... |
... | @@ -111,6 +111,31 @@ public class EquipmentController { | ... | @@ -111,6 +111,31 @@ public class EquipmentController { |
111 | @Autowired | 111 | @Autowired |
112 | private Key2ValueService key2ValueService; | 112 | private Key2ValueService key2ValueService; |
113 | 113 | ||
114 | |||
115 | @AutoLog(value = "设备台账-分页") | ||
116 | @ApiOperation(value = "设备台账-分页", notes = "设备台账-分页列表") | ||
117 | @GetMapping(value = "/queryByPage") | ||
118 | public Result<IPage<EquipmentInfo>> allList(EquipmentInfo equipmentInfo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
119 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize ,HttpServletRequest req ) throws Exception { | ||
120 | Result<IPage<EquipmentInfo>> result = new Result<IPage<EquipmentInfo>>(); | ||
121 | QueryWrapper<EquipmentInfo> queryWrapper = QueryGenerator.initQueryWrapper(equipmentInfo, req.getParameterMap()); | ||
122 | // queryWrapper.eq("depart_id", BaseContextHandler.getRealDepartId()); | ||
123 | /* if(equipmentInfo.getDepartId()==null){ | ||
124 | equipmentInfo.setDepartId(BaseContextHandler.getDeparts()); | ||
125 | }*/ | ||
126 | /* if(model==1){ | ||
127 | queryWrapper.isNotNull("digital_twins_struct_code"); | ||
128 | queryWrapper.last(" and digital_twins_struct_code != ''"); | ||
129 | }*/ | ||
130 | Page<EquipmentInfo> page = new Page<EquipmentInfo>(pageNo, pageSize); | ||
131 | // queryWrapper.orderByDesc("create_time"); | ||
132 | IPage<EquipmentInfo> pageList = equipmentInfoService.page(page,queryWrapper); | ||
133 | result.setSuccess(true); | ||
134 | result.setResult(pageList); | ||
135 | return result; | ||
136 | } | ||
137 | |||
138 | |||
114 | @AutoLog(value = "设备台账-所有设备") | 139 | @AutoLog(value = "设备台账-所有设备") |
115 | @ApiOperation(value = "设备台账-所有设备", notes = "设备台账-所有设备") | 140 | @ApiOperation(value = "设备台账-所有设备", notes = "设备台账-所有设备") |
116 | @GetMapping(value = "/allList") | 141 | @GetMapping(value = "/allList") | ... | ... |
... | @@ -105,12 +105,13 @@ public class EquipmentInfoMonthReportController { | ... | @@ -105,12 +105,13 @@ public class EquipmentInfoMonthReportController { |
105 | maintainRepairReportVO.setMaintainTaskFormList(taskFormList); | 105 | maintainRepairReportVO.setMaintainTaskFormList(taskFormList); |
106 | 106 | ||
107 | equipmentRepairForm.setDepartId(departIdTemp); | 107 | equipmentRepairForm.setDepartId(departIdTemp); |
108 | |||
109 | //equipmentRepairForm.setFinishFlag("'ywx','yys'"); | ||
108 | repairFormList = equipmentRepairService.queryRepairFormList(equipmentRepairForm); | 110 | repairFormList = equipmentRepairService.queryRepairFormList(equipmentRepairForm); |
109 | maintainRepairReportVO.setEquipmentRepairFormList(repairFormList); | 111 | maintainRepairReportVO.setEquipmentRepairFormList(repairFormList); |
110 | dataList.add(maintainRepairReportVO ); | 112 | dataList.add(maintainRepairReportVO ); |
111 | } | 113 | } |
112 | 114 | ||
113 | |||
114 | result.setSuccess(true); | 115 | result.setSuccess(true); |
115 | result.setResult(dataList); | 116 | result.setResult(dataList); |
116 | return result; | 117 | return result; |
... | @@ -129,8 +130,8 @@ public class EquipmentInfoMonthReportController { | ... | @@ -129,8 +130,8 @@ public class EquipmentInfoMonthReportController { |
129 | sql = "select round(ifnull(sum(total_cost),0)/10000,2) 'repair_cost' from equipment_repair where reality_maintenance_end_time >= '"+startDate+" 00:00:00' and reality_maintenance_end_time <='"+endDate+" 23:59:59'"; | 130 | sql = "select round(ifnull(sum(total_cost),0)/10000,2) 'repair_cost' from equipment_repair where reality_maintenance_end_time >= '"+startDate+" 00:00:00' and reality_maintenance_end_time <='"+endDate+" 23:59:59'"; |
130 | String repair_cost = commonSqlService.queryForString(sql); | 131 | String repair_cost = commonSqlService.queryForString(sql); |
131 | dataMap.put("repairCost",repair_cost);//执行XX万元 | 132 | dataMap.put("repairCost",repair_cost);//执行XX万元 |
132 | 133 | String expression = "100 * "+ repair_cost +" /"+plan_cost; | |
133 | dataMap.put("executionRate","");//执行比例 | 134 | dataMap.put("executionRate",JSUtils.executeExpression(expression,"0.00"));//执行比例 |
134 | 135 | ||
135 | 136 | ||
136 | //本月计划开展大修技改项目XX项,完成XX项 | 137 | //本月计划开展大修技改项目XX项,完成XX项 |
... | @@ -159,7 +160,8 @@ public class EquipmentInfoMonthReportController { | ... | @@ -159,7 +160,8 @@ public class EquipmentInfoMonthReportController { |
159 | 160 | ||
160 | //水务公司设备管理统计表 | 161 | //水务公司设备管理统计表 |
161 | private List<Map<String,Object>> equipmentStatistics(String departIds,String startDate,String endDate){ | 162 | private List<Map<String,Object>> equipmentStatistics(String departIds,String startDate,String endDate){ |
162 | String sql = "select d.id depart_id , d.depart_name ,round(ifnull(aaa.intact,0),2) 'intact', round(ifnull(bbb.plan_cost,0),2) 'plan_cost', round(ifnull(ccc.repair_cost,0),2) 'repair_cost',"; | 163 | String sql = " select TTT.* from ( "; |
164 | sql += "select d.id depart_id , d.depart_name ,round(ifnull(aaa.intact,0),2) 'intact', round(ifnull(bbb.plan_cost,0),2) 'plan_cost', round(ifnull(ccc.repair_cost,0),2) 'repair_cost',"; | ||
163 | sql += " ifnull(ifnull(100 * eee.repair_form_complete_count,0) / ifnull(ddd.repair_form_total_count,9999999999999.99),0) 'repair_form_complete_rate', ifnull(eee.repair_form_complete_count,0) 'repair_form_complete_count', ifnull(ifnull(fff.complete_count,0)*100 / ifnull(ggg.total_count,9999999999999.99),0) 'inspection_complete_rate'"; | 165 | sql += " ifnull(ifnull(100 * eee.repair_form_complete_count,0) / ifnull(ddd.repair_form_total_count,9999999999999.99),0) 'repair_form_complete_rate', ifnull(eee.repair_form_complete_count,0) 'repair_form_complete_count', ifnull(ifnull(fff.complete_count,0)*100 / ifnull(ggg.total_count,9999999999999.99),0) 'inspection_complete_rate'"; |
164 | sql += " from sys_depart d "; | 166 | sql += " from sys_depart d "; |
165 | sql += " left join ( SELECT er.depart_id ,ifnull(( COUNT(id)*30 - IFNULL( SUM( UNIX_TIMESTAMP( reality_maintenance_end_time )- UNIX_TIMESTAMP( repair_date ) )/ 60 / 60 / 24, 0 )) *100/ (COUNT(id)*30) , 0) 'intact' FROM equipment_repair er "; | 167 | sql += " left join ( SELECT er.depart_id ,ifnull(( COUNT(id)*30 - IFNULL( SUM( UNIX_TIMESTAMP( reality_maintenance_end_time )- UNIX_TIMESTAMP( repair_date ) )/ 60 / 60 / 24, 0 )) *100/ (COUNT(id)*30) , 0) 'intact' FROM equipment_repair er "; |
... | @@ -175,41 +177,56 @@ public class EquipmentInfoMonthReportController { | ... | @@ -175,41 +177,56 @@ public class EquipmentInfoMonthReportController { |
175 | sql += " and d.id in ("+ JSUtils.quoteEach(departIds,",") +") "; | 177 | sql += " and d.id in ("+ JSUtils.quoteEach(departIds,",") +") "; |
176 | } | 178 | } |
177 | sql += " order by aaa.intact desc "; | 179 | sql += " order by aaa.intact desc "; |
180 | sql += " ) TTT where (TTT.intact+TTT.plan_cost+TTT.repair_cost+TTT.repair_form_complete_rate+TTT.repair_form_complete_count+TTT.inspection_complete_rate)>0"; | ||
178 | return commonSqlService.queryForList(sql); | 181 | return commonSqlService.queryForList(sql); |
179 | } | 182 | } |
180 | //设备大修、更新开展情况 | 183 | //2 设备大修、更新开展情况 |
181 | private List<Map<String,Object>> equipmentMaintainList(String departIds,String startDate,String endDate){ | 184 | private List<Map<String,Object>> equipmentMaintainList(String departIds,String startDate,String endDate){ |
182 | String sql = "select d.id depart_id , d.depart_name , ifnull(aaa.plan_name,'') 'plan_name' , round( ifnull(aaa.plan_cost,0), 2) 'plan_cost', round(ifnull(bbb.maintenance_cost,0),2) 'maintenance_cost' ,'' as 'reason' from sys_depart d "; | 185 | /* String sql = "select d.id depart_id , d.depart_name , ifnull(aaa.plan_name,'') 'plan_name' , round( ifnull(aaa.plan_cost,0), 2) 'plan_cost', round(ifnull(bbb.maintenance_cost,0),2) 'maintenance_cost' ,'' as 'reason' from sys_depart d "; |
183 | sql += " left join (select depart_id, GROUP_CONCAT(plan_name,',') 'plan_name' ,(sum(ifnull(plan_cost,0))/10000) 'plan_cost' from equipment_maintain_plan where maintenance_type = 'dxjg' and release_status='1' and start_time >= '"+startDate+" 00:00:00' and end_time <='"+endDate+" 23:59:59' group by depart_id )aaa on aaa.depart_id = d.id "; | 186 | sql += " left join (select depart_id, GROUP_CONCAT(plan_name,',') 'plan_name' ,(sum(ifnull(plan_cost,0))/10000) 'plan_cost' from equipment_maintain_plan where maintenance_type = 'dxjg' and release_status='1' and start_time >= '"+startDate+" 00:00:00' and end_time <='"+endDate+" 23:59:59' group by depart_id )aaa on aaa.depart_id = d.id "; |
184 | sql += " left join ( select emt.depart_id, sum(ifnull(maintenance_cost,0)) maintenance_cost from equipment_maintain_task emt ,equipment_maintain_plan emp where emt.plan_id = emp.id and emp.maintenance_type = 'dxjg' and emt.maintain_time >= '"+startDate+" 00:00:00' and emt.maintain_time <='"+endDate+" 23:59:59' group by emt.depart_id )bbb on bbb.depart_id = d.id "; | 187 | sql += " left join ( select emt.depart_id, sum(ifnull(maintenance_cost,0)) maintenance_cost from equipment_maintain_task emt ,equipment_maintain_plan emp where emt.plan_id = emp.id and emp.maintenance_type = 'dxjg' and emt.maintain_time >= '"+startDate+" 00:00:00' and emt.maintain_time <='"+endDate+" 23:59:59' group by emt.depart_id )bbb on bbb.depart_id = d.id "; |
185 | sql += " where d.depart_type = 1 "; | 188 | sql += " where d.depart_type = 1 ";*/ |
189 | String sql = "select d.depart_name, t.depart_id, t.plan_name , (t.plan_cost/10000) 'plan_cost' ,round(ifnull(aaa.maintenance_cost,0) ,2)maintenance_cost , '' as 'reason' from equipment_maintain_plan t "; | ||
190 | sql += " left join (select emt.plan_id, sum(ifnull(maintenance_cost,0)) maintenance_cost from equipment_maintain_task emt where emt.maintain_time >= '"+startDate+" 00:00:00' and emt.maintain_time <='"+endDate+" 23:59:59' group by emt.plan_id )aaa on aaa.plan_id = t.id "; | ||
191 | sql += " left join sys_depart d on t.depart_id = d.id "; | ||
192 | sql += " where t.maintenance_type = 'dxjg' and t.release_status='1' and t.start_time >= '"+startDate+" 00:00:00' and t.end_time <='"+endDate+" 23:59:59' "; | ||
186 | if(StringUtils.isNotEmpty(departIds)){ | 193 | if(StringUtils.isNotEmpty(departIds)){ |
187 | sql += " and d.id in ("+ JSUtils.quoteEach(departIds,",") +") "; | 194 | sql += " and t.depart_id in ("+ JSUtils.quoteEach(departIds,",") +") "; |
188 | } | 195 | } |
189 | return commonSqlService.queryForList(sql); | 196 | return commonSqlService.queryForList(sql); |
190 | } | 197 | } |
191 | //4、A类重点设备运行情况 | 198 | //4、A类重点设备运行情况 |
192 | private List<Map<String,Object>> equipmentARunList(String departIds,String startDate,String endDate){ | 199 | private List<Map<String,Object>> equipmentARunList(String departIds,String startDate,String endDate){ |
193 | String sql =" select d.id 'depart_id', d.depart_name , aaa.equipment_name, aaa.fault_library_id ,aaa.fault_content from sys_depart d"; | 200 | /*String sql =" select d.id 'depart_id', d.depart_name , aaa.equipment_name, aaa.fault_library_id ,aaa.fault_content from sys_depart d"; |
194 | sql += " left join (select er.id 'info_id', er.depart_id , ei.equipment_name , GROUP_CONCAT(er.fault_content) fault_content , GROUP_CONCAT( er.fault_library_id) fault_library_id from equipment_repair er , equipment_info ei "; | 201 | sql += " left join (select er.id 'info_id', er.depart_id , ei.equipment_name , GROUP_CONCAT(er.fault_content) fault_content , GROUP_CONCAT( er.fault_library_id) fault_library_id from equipment_repair er , equipment_info ei "; |
195 | sql += " where er.info_id = ei.id and ei.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c' and repair_date >= '"+startDate+" 00:00:00' and repair_date <='"+endDate+" 23:59:59' "; | 202 | sql += " where er.info_id = ei.id and ei.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c' and repair_date >= '"+startDate+" 00:00:00' and repair_date <='"+endDate+" 23:59:59' "; |
196 | sql += " group by er.depart_id ,er.info_id )aaa on aaa.depart_id = d.id "; | 203 | sql += " group by er.depart_id ,er.info_id )aaa on aaa.depart_id = d.id "; |
197 | sql += " where d.depart_type = 1 "; | 204 | sql += " where d.depart_type = 1 ";*/ |
205 | String sql = "select d.depart_name, aaa.* from ("; | ||
206 | sql += " select er.info_id, er.depart_id , ei.equipment_name , er.fault_content , er.fault_library_id from equipment_repair er , equipment_info ei "; | ||
207 | sql += " where er.info_id = ei.id and ei.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c' and repair_date >= '"+startDate+" 00:00:00' and repair_date <='"+endDate+" 23:59:59' "; | ||
208 | sql += " )aaa left join sys_depart d on aaa.depart_id = d.id "; | ||
209 | |||
198 | if(StringUtils.isNotEmpty(departIds)){ | 210 | if(StringUtils.isNotEmpty(departIds)){ |
199 | sql += " and d.id in ("+ JSUtils.quoteEach(departIds,",") +") "; | 211 | sql += " and aaa.id in ("+ JSUtils.quoteEach(departIds,",") +") "; |
200 | } | 212 | } |
201 | return commonSqlService.queryForList(sql); | 213 | return commonSqlService.queryForList(sql); |
202 | } | 214 | } |
203 | 215 | ||
204 | //5、设备更新情况 | 216 | //5、设备更新情况 |
205 | private List<Map<String,Object>> equipmentUpdateList(String departIds,String startDate,String endDate){ | 217 | private List<Map<String,Object>> equipmentUpdateList(String departIds,String startDate,String endDate){ |
206 | String sql = "select d.id 'depart_id', d.depart_name , aaa.equipment_name, aaa.asset_amount, aaa.equipment_level from sys_depart d"; | 218 | /* String sql = "select d.id 'depart_id', d.depart_name , aaa.equipment_name, aaa.asset_amount, aaa.equipment_level from sys_depart d"; |
207 | sql += " left join (select t.id 'info_id', t.depart_id , t.equipment_name, t.asset_amount, di.item_text 'equipment_level' from equipment_info t "; | 219 | sql += " left join (select t.id 'info_id', t.depart_id , t.equipment_name, t.asset_amount, di.item_text 'equipment_level' from equipment_info t "; |
208 | sql += " left join sys_dict_item di on di.item_value = t.equipment_level where t.install_date >= '"+startDate+"' and t.install_date <= '"+endDate+"' group by t.depart_id "; | 220 | sql += " left join sys_dict_item di on di.item_value = t.equipment_level where t.install_date >= '"+startDate+"' and t.install_date <= '"+endDate+"' group by t.depart_id "; |
209 | sql += " )aaa on aaa.depart_id = d.id "; | 221 | sql += " )aaa on aaa.depart_id = d.id "; |
210 | sql += " where d.depart_type = 1 "; | 222 | sql += " where d.depart_type = 1 ";*/ |
223 | String sql ="select d.depart_name, aaa.* from ("; | ||
224 | sql += " select t.id 'info_id', t.depart_id , t.equipment_name, t.asset_amount, di.item_text 'equipment_level' from equipment_info t "; | ||
225 | sql += " left join sys_dict_item di on di.item_value = t.equipment_level "; | ||
226 | sql += " where t.install_date >= '"+startDate+"' and t.install_date <= '"+endDate+"' "; | ||
227 | sql += ")aaa left join sys_depart d on aaa.depart_id = d.id "; | ||
211 | if(StringUtils.isNotEmpty(departIds)){ | 228 | if(StringUtils.isNotEmpty(departIds)){ |
212 | sql += " and d.id in ("+ JSUtils.quoteEach(departIds,",") +") "; | 229 | sql += " and aaa.id in ("+ JSUtils.quoteEach(departIds,",") +") "; |
213 | } | 230 | } |
214 | return commonSqlService.queryForList(sql); | 231 | return commonSqlService.queryForList(sql); |
215 | } | 232 | } | ... | ... |
... | @@ -8,9 +8,11 @@ import com.skua.modules.equipment.service.IEquipmentMaintainTaskService; | ... | @@ -8,9 +8,11 @@ import com.skua.modules.equipment.service.IEquipmentMaintainTaskService; |
8 | import com.skua.modules.equipment.service.IEquipmentRepairService; | 8 | import com.skua.modules.equipment.service.IEquipmentRepairService; |
9 | import com.skua.modules.equipment.vo.EquipmentMaintainTaskForm; | 9 | import com.skua.modules.equipment.vo.EquipmentMaintainTaskForm; |
10 | import com.skua.modules.equipment.vo.EquipmentRepairForm; | 10 | import com.skua.modules.equipment.vo.EquipmentRepairForm; |
11 | import com.skua.tool.util.JSUtils; | ||
11 | import io.swagger.annotations.Api; | 12 | import io.swagger.annotations.Api; |
12 | import io.swagger.annotations.ApiOperation; | 13 | import io.swagger.annotations.ApiOperation; |
13 | import lombok.extern.slf4j.Slf4j; | 14 | import lombok.extern.slf4j.Slf4j; |
15 | import org.apache.commons.lang.StringUtils; | ||
14 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
15 | import org.springframework.web.bind.annotation.GetMapping; | 17 | import org.springframework.web.bind.annotation.GetMapping; |
16 | import org.springframework.web.bind.annotation.RequestMapping; | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
... | @@ -43,6 +45,9 @@ public class EquipmentRepairReportController { | ... | @@ -43,6 +45,9 @@ public class EquipmentRepairReportController { |
43 | Result<IPage<EquipmentRepairForm>> result = new Result<IPage<EquipmentRepairForm>>(); | 45 | Result<IPage<EquipmentRepairForm>> result = new Result<IPage<EquipmentRepairForm>>(); |
44 | Page<EquipmentRepairForm> page = new Page<EquipmentRepairForm>(pageNo, pageSize); | 46 | Page<EquipmentRepairForm> page = new Page<EquipmentRepairForm>(pageNo, pageSize); |
45 | 47 | ||
48 | if(StringUtils.isNotEmpty(equipmentRepairForm.getFinishFlag())){ | ||
49 | equipmentRepairForm.setFinishFlag(JSUtils.quoteEach(equipmentRepairForm.getFinishFlag(),",")); | ||
50 | } | ||
46 | IPage<EquipmentRepairForm> pageList = equipmentRepairService.queryRepairFormByPage(page, equipmentRepairForm); | 51 | IPage<EquipmentRepairForm> pageList = equipmentRepairService.queryRepairFormByPage(page, equipmentRepairForm); |
47 | result.setSuccess(true); | 52 | result.setSuccess(true); |
48 | result.setResult(pageList); | 53 | result.setResult(pageList); | ... | ... |
1 | package com.skua.modules.equipment.controller; | 1 | package com.skua.modules.equipment.controller; |
2 | 2 | ||
3 | import com.skua.core.api.vo.Result; | 3 | import com.skua.core.api.vo.Result; |
4 | import com.skua.core.context.BaseContextHandler; | ||
5 | import com.skua.modules.equipment.service.IEquipmentInfoService; | ||
4 | import com.skua.modules.equipment.service.IEquipmentSingleStatisticsService; | 6 | import com.skua.modules.equipment.service.IEquipmentSingleStatisticsService; |
7 | import com.skua.modules.equipment.vo.EquipmentFailurelVO; | ||
8 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostDetailVO; | ||
9 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostVO; | ||
10 | import com.skua.tool.util.JSUtils; | ||
5 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
6 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
7 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
... | @@ -27,6 +33,8 @@ import java.util.Map; | ... | @@ -27,6 +33,8 @@ import java.util.Map; |
27 | public class EquipmentSingleStatisticsController { | 33 | public class EquipmentSingleStatisticsController { |
28 | @Autowired | 34 | @Autowired |
29 | private IEquipmentSingleStatisticsService equipmentSingleStatisticsService; | 35 | private IEquipmentSingleStatisticsService equipmentSingleStatisticsService; |
36 | @Autowired | ||
37 | private IEquipmentInfoService equipmentInfoService; | ||
30 | /** | 38 | /** |
31 | * <pre> | 39 | * <pre> |
32 | * 设备看板-设备故障分析 | 40 | * 设备看板-设备故障分析 |
... | @@ -52,6 +60,54 @@ public class EquipmentSingleStatisticsController { | ... | @@ -52,6 +60,54 @@ public class EquipmentSingleStatisticsController { |
52 | } | 60 | } |
53 | return result; | 61 | return result; |
54 | } | 62 | } |
63 | |||
64 | // | ||
65 | @ApiOperation(value = "设备看板-维修维护费用列表", notes = "设备看板-维修维护费用列表,") | ||
66 | @GetMapping(value = "/repairMaintainTaskCostList") | ||
67 | public Result<List<EquipmentRepairMaintainTaskCostVO>> repairMaintainTaskCostList( String startTime, String endTime) { | ||
68 | Result<List<EquipmentRepairMaintainTaskCostVO>> result = new Result<>(); | ||
69 | try { | ||
70 | String departIds = BaseContextHandler.getDeparts(); | ||
71 | List<EquipmentRepairMaintainTaskCostVO> dataList = equipmentSingleStatisticsService.repairMaintainTaskCostList(JSUtils.quoteEach(departIds,","),startTime,endTime); | ||
72 | result.setSuccess(true); | ||
73 | result.setResult(dataList); | ||
74 | } catch (Exception e) { | ||
75 | log.error("维修维护费用列表", e.getMessage()); | ||
76 | result.error500("维修维护费用列表"); | ||
77 | } | ||
78 | return result; | ||
79 | } | ||
80 | @ApiOperation(value = "设备看板-维修维护费用-详情列表", notes = "设备看板-维修维护费用-详情列表") | ||
81 | @GetMapping(value = "/repairMaintainTaskCostDetailList") | ||
82 | public Result<List<EquipmentRepairMaintainTaskCostDetailVO>> repairMaintainTaskCostList(String departId, String startTime, String endTime) { | ||
83 | Result<List<EquipmentRepairMaintainTaskCostDetailVO>> result = new Result<>(); | ||
84 | try { | ||
85 | List<EquipmentRepairMaintainTaskCostDetailVO> dataList = equipmentSingleStatisticsService.repairMaintainTaskCostDetailList(departId,startTime,endTime); | ||
86 | result.setSuccess(true); | ||
87 | result.setResult(dataList); | ||
88 | } catch (Exception e) { | ||
89 | log.error("维修维护费用列表", e.getMessage()); | ||
90 | result.error500("维修维护费用列表"); | ||
91 | } | ||
92 | return result; | ||
93 | } | ||
94 | /* @ApiOperation(value = "设备看板-设备故障分页列表", notes = "设备看板-设备故障分页列表") | ||
95 | @GetMapping(value = "/equipmentFailurePage") | ||
96 | public Result<List<EquipmentFailurelVO>> queryEquipmentFailurePage(String departId, String startTime, String endTime) { | ||
97 | Result<List<EquipmentFailurelVO>> result = new Result<>(); | ||
98 | try { | ||
99 | |||
100 | |||
101 | List<EquipmentFailurelVO> dataList = equipmentInfoService.queryEquipmentFailurePage(departId,startTime,endTime); | ||
102 | result.setSuccess(true); | ||
103 | result.setResult(dataList); | ||
104 | } catch (Exception e) { | ||
105 | log.error("维修维护费用列表", e.getMessage()); | ||
106 | result.error500("维修维护费用列表"); | ||
107 | } | ||
108 | return result; | ||
109 | }*/ | ||
110 | |||
55 | /** | 111 | /** |
56 | * <pre> | 112 | * <pre> |
57 | * 设备看板-故障类型分布 | 113 | * 设备看板-故障类型分布 | ... | ... |
... | @@ -198,6 +198,7 @@ public class EquipmentInfo { | ... | @@ -198,6 +198,7 @@ public class EquipmentInfo { |
198 | * 所属公司 | 198 | * 所属公司 |
199 | */ | 199 | */ |
200 | @ApiModelProperty(value = "所属公司") | 200 | @ApiModelProperty(value = "所属公司") |
201 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | ||
201 | private String createCmpy; | 202 | private String createCmpy; |
202 | /** | 203 | /** |
203 | * 删除标识,0:正常,1:删除 | 204 | * 删除标识,0:正常,1:删除 | ... | ... |
... | @@ -121,9 +121,11 @@ | ... | @@ -121,9 +121,11 @@ |
121 | <select id="queryRepairFormList" resultType="com.skua.modules.equipment.vo.EquipmentMaintainTaskForm"> | 121 | <select id="queryRepairFormList" resultType="com.skua.modules.equipment.vo.EquipmentMaintainTaskForm"> |
122 | select aaa.* from ( | 122 | select aaa.* from ( |
123 | select | 123 | select |
124 | er.depart_id , | ||
124 | ei.equipment_name , ec.des 'equipment_category', di.item_text 'maintenance_type', | 125 | ei.equipment_name , ec.des 'equipment_category', di.item_text 'maintenance_type', |
125 | ifnull(u.realname,'-') 'maintenance_user', | 126 | ifnull(u.realname,'-') 'maintenance_user', |
126 | er.depart_id,er.repair_date,er.fault_reason,er.is_stop,er.reality_maintenance_start_time,er.reality_maintenance_end_time, | 127 | er.repair_date,er.fault_reason,er.is_stop,er.reality_maintenance_start_time,er.reality_maintenance_end_time, |
128 | ifnull(EXTRACT(HOUR FROM (er.reality_maintenance_end_time - er.repair_date)),0) AS stopTime, | ||
127 | ifnull(er.fault_library_id,'-') 'repair_content' | 129 | ifnull(er.fault_library_id,'-') 'repair_content' |
128 | from equipment_repair er | 130 | from equipment_repair er |
129 | left join equipment_info ei on ei.id = er.info_id | 131 | left join equipment_info ei on ei.id = er.info_id |
... | @@ -146,7 +148,7 @@ | ... | @@ -146,7 +148,7 @@ |
146 | </if>--> | 148 | </if>--> |
147 | 149 | ||
148 | <if test="finishFlag != null and finishFlag !=''"> | 150 | <if test="finishFlag != null and finishFlag !=''"> |
149 | and aaa.finish_flag = #{finishFlag} | 151 | and aaa.finish_flag in (${finishFlag}) |
150 | </if> | 152 | </if> |
151 | 153 | ||
152 | <if test="repairDate != null and repairDate !=''"> | 154 | <if test="repairDate != null and repairDate !=''"> |
... | @@ -177,6 +179,8 @@ | ... | @@ -177,6 +179,8 @@ |
177 | and aaa.maintenance_type = #{maintenanceType} | 179 | and aaa.maintenance_type = #{maintenanceType} |
178 | </if> | 180 | </if> |
179 | </where> | 181 | </where> |
182 | |||
183 | order by aaa.repair_date desc | ||
180 | </select> | 184 | </select> |
181 | 185 | ||
182 | </mapper> | 186 | </mapper> | ... | ... |
... | @@ -3,6 +3,8 @@ package com.skua.modules.equipment.service; | ... | @@ -3,6 +3,8 @@ package com.skua.modules.equipment.service; |
3 | 3 | ||
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | import com.skua.modules.alarmtmp.entity.AlarmRecordHistory; | 5 | import com.skua.modules.alarmtmp.entity.AlarmRecordHistory; |
6 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostDetailVO; | ||
7 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostVO; | ||
6 | 8 | ||
7 | import java.util.List; | 9 | import java.util.List; |
8 | import java.util.Map; | 10 | import java.util.Map; |
... | @@ -112,4 +114,22 @@ public interface IEquipmentSingleStatisticsService extends IService<AlarmRecordH | ... | @@ -112,4 +114,22 @@ public interface IEquipmentSingleStatisticsService extends IService<AlarmRecordH |
112 | * @Description: TODO(这里描述这个方法的需求变更情况) | 114 | * @Description: TODO(这里描述这个方法的需求变更情况) |
113 | */ | 115 | */ |
114 | List<Map<String, Object>> getEquipmentSparepartInfo(String equipmentId, String timePeriod, String startTime,String endTime); | 116 | List<Map<String, Object>> getEquipmentSparepartInfo(String equipmentId, String timePeriod, String startTime,String endTime); |
117 | |||
118 | /** | ||
119 | * 维修维护费用列表 | ||
120 | * @param departIds | ||
121 | * @param startTime | ||
122 | * @param endTime | ||
123 | * @return | ||
124 | */ | ||
125 | List<EquipmentRepairMaintainTaskCostVO> repairMaintainTaskCostList(String departIds, String startTime, String endTime); | ||
126 | |||
127 | /*** | ||
128 | * 维修维护费用列表 明细列表 | ||
129 | * @param departId | ||
130 | * @param startTime | ||
131 | * @param endTime | ||
132 | * @return | ||
133 | */ | ||
134 | List<EquipmentRepairMaintainTaskCostDetailVO> repairMaintainTaskCostDetailList(String departId, String startTime, String endTime); | ||
115 | } | 135 | } | ... | ... |
... | @@ -11,6 +11,7 @@ import com.skua.core.context.BaseContextHandler; | ... | @@ -11,6 +11,7 @@ import com.skua.core.context.BaseContextHandler; |
11 | import com.skua.core.excel.CustomExcelUtil; | 11 | import com.skua.core.excel.CustomExcelUtil; |
12 | import com.skua.core.excel.CustomExcelUtil07; | 12 | import com.skua.core.excel.CustomExcelUtil07; |
13 | import com.skua.core.excel.entity.HeadEntity; | 13 | import com.skua.core.excel.entity.HeadEntity; |
14 | import com.skua.modules.common.service.ICommonSqlService; | ||
14 | import com.skua.modules.equipment.entity.EquipmentAsset; | 15 | import com.skua.modules.equipment.entity.EquipmentAsset; |
15 | import com.skua.modules.equipment.service.IEquipmentAssetService; | 16 | import com.skua.modules.equipment.service.IEquipmentAssetService; |
16 | import com.skua.modules.system.datestandard.mapper.SysStructDictMapper; | 17 | import com.skua.modules.system.datestandard.mapper.SysStructDictMapper; |
... | @@ -62,6 +63,8 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E | ... | @@ -62,6 +63,8 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E |
62 | private ISequenceService sequenceService; | 63 | private ISequenceService sequenceService; |
63 | @Autowired | 64 | @Autowired |
64 | private ICrudSqlService iCrudSqlService; | 65 | private ICrudSqlService iCrudSqlService; |
66 | @Autowired | ||
67 | private ICommonSqlService commonSqlService; | ||
65 | @Resource | 68 | @Resource |
66 | private ISysStructDictService sysStructDictService; | 69 | private ISysStructDictService sysStructDictService; |
67 | @Autowired | 70 | @Autowired |
... | @@ -90,6 +93,11 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E | ... | @@ -90,6 +93,11 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E |
90 | String[] items = equipmentInfo.getStartUseDate().split("-"); | 93 | String[] items = equipmentInfo.getStartUseDate().split("-"); |
91 | equipmentInfo.setAdviceReplaceDate(Integer.parseInt(items[0]) + equipmentInfo.getLimitUseYear() + "-" + items[1] + "-" + items[2]); | 94 | equipmentInfo.setAdviceReplaceDate(Integer.parseInt(items[0]) + equipmentInfo.getLimitUseYear() + "-" + items[1] + "-" + items[2]); |
92 | } | 95 | } |
96 | //为create_cmpy赋值 | ||
97 | if(StringUtils.isNotEmpty(equipmentInfo.getDepartId())){ | ||
98 | String createCmpy = commonSqlService.queryForString("select parent_id from sys_depart where id ='"+equipmentInfo.getDepartId()+"'"); | ||
99 | equipmentInfo.setCreateCmpy(createCmpy ) ; | ||
100 | } | ||
93 | iCrudSqlService.save(equipment); | 101 | iCrudSqlService.save(equipment); |
94 | EquipmentVO equipmentVO = EquipmentUtils.equipEntity2VO(equipment); | 102 | EquipmentVO equipmentVO = EquipmentUtils.equipEntity2VO(equipment); |
95 | //添加技术参数、补充信息 | 103 | //添加技术参数、补充信息 | ... | ... |
... | @@ -33,6 +33,7 @@ import com.skua.modules.flow.support.Kv; | ... | @@ -33,6 +33,7 @@ import com.skua.modules.flow.support.Kv; |
33 | import com.skua.modules.flow.utils.Func; | 33 | import com.skua.modules.flow.utils.Func; |
34 | import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesAdjustService; | 34 | import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesAdjustService; |
35 | import com.skua.tool.util.BeanExtUtils; | 35 | import com.skua.tool.util.BeanExtUtils; |
36 | import com.skua.tool.util.JSUtils; | ||
36 | import org.apache.commons.lang.StringUtils; | 37 | import org.apache.commons.lang.StringUtils; |
37 | import org.springframework.beans.factory.annotation.Autowired; | 38 | import org.springframework.beans.factory.annotation.Autowired; |
38 | import org.springframework.stereotype.Service; | 39 | import org.springframework.stereotype.Service; |
... | @@ -301,6 +302,7 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe | ... | @@ -301,6 +302,7 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe |
301 | * @return | 302 | * @return |
302 | */ | 303 | */ |
303 | public IPage<EquipmentRepairForm> queryRepairFormByPage(Page<EquipmentRepairForm> page, EquipmentRepairForm equipmentRepairForm){ | 304 | public IPage<EquipmentRepairForm> queryRepairFormByPage(Page<EquipmentRepairForm> page, EquipmentRepairForm equipmentRepairForm){ |
305 | |||
304 | List<EquipmentRepairForm> dataList = this.baseMapper.queryRepairFormList(equipmentRepairForm); | 306 | List<EquipmentRepairForm> dataList = this.baseMapper.queryRepairFormList(equipmentRepairForm); |
305 | page.setRecords(dataList); | 307 | page.setRecords(dataList); |
306 | return page; | 308 | return page; | ... | ... |
... | @@ -14,8 +14,12 @@ import com.skua.modules.alarmtmp.service.AlarmCustomRecordHistoryService; | ... | @@ -14,8 +14,12 @@ import com.skua.modules.alarmtmp.service.AlarmCustomRecordHistoryService; |
14 | import com.skua.modules.equipment.entity.EquipmentRepair; | 14 | import com.skua.modules.equipment.entity.EquipmentRepair; |
15 | import com.skua.modules.equipment.service.IEquipmentRepairService; | 15 | import com.skua.modules.equipment.service.IEquipmentRepairService; |
16 | import com.skua.modules.equipment.service.IEquipmentSingleStatisticsService; | 16 | import com.skua.modules.equipment.service.IEquipmentSingleStatisticsService; |
17 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostDetailVO; | ||
18 | import com.skua.modules.equipment.vo.EquipmentRepairMaintainTaskCostVO; | ||
19 | import com.skua.tool.util.JSUtils; | ||
17 | import org.apache.commons.lang.StringUtils; | 20 | import org.apache.commons.lang.StringUtils; |
18 | import org.springframework.beans.factory.annotation.Autowired; | 21 | import org.springframework.beans.factory.annotation.Autowired; |
22 | import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
19 | import org.springframework.jdbc.core.JdbcTemplate; | 23 | import org.springframework.jdbc.core.JdbcTemplate; |
20 | import org.springframework.stereotype.Service; | 24 | import org.springframework.stereotype.Service; |
21 | 25 | ||
... | @@ -580,6 +584,59 @@ public class EquipmentSingleStatisticsServiceImpl extends ServiceImpl<AlarmRecor | ... | @@ -580,6 +584,59 @@ public class EquipmentSingleStatisticsServiceImpl extends ServiceImpl<AlarmRecor |
580 | return masterDB.queryForList("select sparepart_name,sparepart_type,sparepart_type_name,sum(nums) as nums from("+sql+")aa group by sparepart_name,sparepart_type,sparepart_type_name"); | 584 | return masterDB.queryForList("select sparepart_name,sparepart_type,sparepart_type_name,sum(nums) as nums from("+sql+")aa group by sparepart_name,sparepart_type,sparepart_type_name"); |
581 | } | 585 | } |
582 | 586 | ||
587 | |||
588 | |||
589 | |||
590 | |||
591 | /** | ||
592 | * 维修维护费用列表 | ||
593 | * @param departIds | ||
594 | * @param startTime | ||
595 | * @param endTime | ||
596 | * @return | ||
597 | */ | ||
598 | public List<EquipmentRepairMaintainTaskCostVO> repairMaintainTaskCostList(String departIds, String startTime, String endTime){ | ||
599 | String sql = "select d.id depart_id , d.depart_name ,round(ifnull(aaa.repair_cost ,0),2) repair_cost, round(ifnull(bbb.dxjg_cost ,0),2) dxjg_cost,round(ifnull(bbb.sbwh_cost ,0),2) sbwh_cost,"; | ||
600 | sql += " round(ifnull(bbb.sbby_cost ,0),2) sbby_cost,round(ifnull(bbb.jjwx_cost ,0),2) jjwx_cost from sys_depart d "; | ||
601 | sql += " left join (select depart_id, sum(total_cost) 'repair_cost' from equipment_repair where repair_date >= '"+startTime+" 00:00:00' and repair_date <='"+endTime+" 23:59:59' group by depart_id ) aaa on aaa.depart_id = d.id "; | ||
602 | sql += " left join ( select emt.depart_id, ifnull( SUM( CASE WHEN emp.maintenance_type='dxjg' THEN emt.maintenance_cost ELSE 0 END ),0) as 'dxjg_cost', "; | ||
603 | sql += " ifnull( SUM( CASE WHEN emp.maintenance_type='sbwh' THEN emt.maintenance_cost ELSE 0 END ),0) as 'sbwh_cost', "; | ||
604 | sql += " ifnull( SUM( CASE WHEN emp.maintenance_type='sbby' THEN emt.maintenance_cost ELSE 0 END ),0) as 'sbby_cost', "; | ||
605 | sql += " ifnull( SUM( CASE WHEN emp.maintenance_type='jjwx' THEN emt.maintenance_cost ELSE 0 END ),0) as 'jjwx_cost' "; | ||
606 | sql += " from equipment_maintain_task emt ,equipment_maintain_plan emp where emt.plan_id = emp.id "; | ||
607 | sql += " and emt.maintain_time >= '"+startTime+" 00:00:00' and emt.maintain_time <='"+endTime+" 23:59:59' group by emt.depart_id "; | ||
608 | sql += ") bbb on bbb.depart_id = d.id where d.depart_type = 1 "; | ||
609 | if(org.apache.commons.lang3.StringUtils.isNotEmpty(departIds)){ | ||
610 | sql += " and d.id in ("+ departIds +") "; | ||
611 | } | ||
612 | List<EquipmentRepairMaintainTaskCostVO> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<EquipmentRepairMaintainTaskCostVO>(EquipmentRepairMaintainTaskCostVO.class)); | ||
613 | return dataList; | ||
614 | } | ||
615 | |||
616 | /*** | ||
617 | * 维修维护费用列表 明细列表 | ||
618 | * @param departId | ||
619 | * @param startTime | ||
620 | * @param endTime | ||
621 | * @return | ||
622 | */ | ||
623 | public List<EquipmentRepairMaintainTaskCostDetailVO> repairMaintainTaskCostDetailList(String departId, String startTime, String endTime){ | ||
624 | String sql = "select d.depart_name, aaa.* from ( "; | ||
625 | sql +=" select er.depart_id , ei.equipment_name 'name' , '维修费用' as 'cost_type',er.total_cost 'cost',er.repair_date 'time' from equipment_repair er , equipment_info ei "; | ||
626 | sql += " where er.info_id = ei.id and er.total_cost > 0 and er.repair_date >= '"+startTime+" 00:00:00' and er.repair_date <='"+endTime+" 23:59:59' and er.depart_id = '"+departId+"' "; | ||
627 | sql += " UNION " ; | ||
628 | sql += " select emt.depart_id, emt.maintain_plan_name 'name', emt.maintenance_cost 'cost', DATE_FORMAT(emt.maintain_time,'%Y-%m-%d') 'time',"; | ||
629 | sql += " CASE WHEN emp.maintenance_type ='dxjg' THEN '大修费用' "; | ||
630 | sql += " WHEN emp.maintenance_type='sbwh' THEN '维护费用'"; | ||
631 | sql += " WHEN emp.maintenance_type='sbby' THEN '保养费用'"; | ||
632 | sql += " WHEN emp.maintenance_type='jjwx' THEN '基建维修费用'"; | ||
633 | sql += " ELSE '其他保养' END AS cost_type "; | ||
634 | sql += " from equipment_maintain_task emt ,equipment_maintain_plan emp where emt.plan_id = emp.id "; | ||
635 | sql += " and emt.depart_id = '"+departId+"' and emt.maintain_time >= '"+startTime+" 00:00:00' and emt.maintain_time <='"+endTime+" 23:59:59' "; | ||
636 | sql += " ) aaa left join sys_depart d on d.id = aaa.depart_id "; | ||
637 | List<EquipmentRepairMaintainTaskCostDetailVO> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<EquipmentRepairMaintainTaskCostDetailVO>(EquipmentRepairMaintainTaskCostDetailVO.class)); | ||
638 | return dataList; | ||
639 | } | ||
583 | /** | 640 | /** |
584 | * <pre> | 641 | * <pre> |
585 | * 同/环比时间处理 | 642 | * 同/环比时间处理 |
... | @@ -696,4 +753,9 @@ public class EquipmentSingleStatisticsServiceImpl extends ServiceImpl<AlarmRecor | ... | @@ -696,4 +753,9 @@ public class EquipmentSingleStatisticsServiceImpl extends ServiceImpl<AlarmRecor |
696 | return sql; | 753 | return sql; |
697 | } | 754 | } |
698 | 755 | ||
756 | private JdbcTemplate getJdbcTemplate(){ | ||
757 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); | ||
758 | return masterDB; | ||
759 | } | ||
760 | |||
699 | } | 761 | } | ... | ... |
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | |||
8 | /** | ||
9 | * @auther kangwei | ||
10 | * @create 2025-03-07-17:56 | ||
11 | */ | ||
12 | |||
13 | /** | ||
14 | * 月度计划性维修维护内容 | ||
15 | */ | ||
16 | @Data | ||
17 | @ApiModel(value="EquipmentFailurelVO ", description="设备故障对象") | ||
18 | public class EquipmentFailurelVO { | ||
19 | |||
20 | @ApiModelProperty(value = "机构ID") | ||
21 | private String departId; | ||
22 | |||
23 | @ApiModelProperty(value = "机构名称") | ||
24 | private String departName; | ||
25 | |||
26 | @ApiModelProperty(value = "费用名称") | ||
27 | private String name; | ||
28 | |||
29 | @ApiModelProperty(value = "费用分类") | ||
30 | private String costType; | ||
31 | |||
32 | @ApiModelProperty(value = "费用时间") | ||
33 | private String time; | ||
34 | |||
35 | @ApiModelProperty(value = "费用") | ||
36 | private String cost; | ||
37 | |||
38 | |||
39 | } |
1 | package com.skua.modules.equipment.vo; | 1 | package com.skua.modules.equipment.vo; |
2 | 2 | ||
3 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
3 | import io.swagger.annotations.ApiModel; | 4 | import io.swagger.annotations.ApiModel; |
4 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
5 | import lombok.Data; | 6 | import lombok.Data; |
6 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
7 | import lombok.experimental.Accessors; | 8 | import lombok.experimental.Accessors; |
8 | import org.jeecgframework.poi.excel.annotation.Excel; | 9 | import org.jeecgframework.poi.excel.annotation.Excel; |
10 | import org.springframework.format.annotation.DateTimeFormat; | ||
11 | |||
12 | import java.util.Date; | ||
9 | 13 | ||
10 | /** | 14 | /** |
11 | * @auther kangwei | 15 | * @auther kangwei |
... | @@ -55,13 +59,19 @@ public class EquipmentMaintainTaskForm { | ... | @@ -55,13 +59,19 @@ public class EquipmentMaintainTaskForm { |
55 | @ApiModelProperty(value = "维护保养内容") | 59 | @ApiModelProperty(value = "维护保养内容") |
56 | private String maintenanceContent; | 60 | private String maintenanceContent; |
57 | 61 | ||
58 | @Excel(name = "计划开始时间", width = 15) | ||
59 | @ApiModelProperty(value = "计划开始时间") | 62 | @ApiModelProperty(value = "计划开始时间") |
60 | private String startTime; | 63 | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
64 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
65 | private Date startTime; | ||
61 | 66 | ||
62 | @Excel(name = "计划结束时间", width = 15) | ||
63 | @ApiModelProperty(value = "计划结束时间") | 67 | @ApiModelProperty(value = "计划结束时间") |
64 | private String endTime; | 68 | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
69 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
70 | private Date endTime; | ||
71 | |||
72 | @Excel(name = "停机时间(H)", width = 15) | ||
73 | @ApiModelProperty(value = "停机时间") | ||
74 | private String stopTime; | ||
65 | 75 | ||
66 | @Excel(name = "维修负责人", width = 15) | 76 | @Excel(name = "维修负责人", width = 15) |
67 | @ApiModelProperty(value = "维修负责人") | 77 | @ApiModelProperty(value = "维修负责人") | ... | ... |
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | |||
8 | /** | ||
9 | * @auther kangwei | ||
10 | * @create 2025-03-07-17:56 | ||
11 | */ | ||
12 | |||
13 | /** | ||
14 | * 月度计划性维修维护内容 | ||
15 | */ | ||
16 | @Data | ||
17 | @ApiModel(value="EquipmentRepairMaintainTaskCostVO对象 ", description="维修维护费用") | ||
18 | public class EquipmentRepairMaintainTaskCostDetailVO { | ||
19 | |||
20 | @ApiModelProperty(value = "机构ID") | ||
21 | private String departId; | ||
22 | |||
23 | @ApiModelProperty(value = "机构名称") | ||
24 | private String departName; | ||
25 | |||
26 | @ApiModelProperty(value = "费用名称") | ||
27 | private String name; | ||
28 | |||
29 | @ApiModelProperty(value = "费用分类") | ||
30 | private String costType; | ||
31 | |||
32 | @ApiModelProperty(value = "费用时间") | ||
33 | private String time; | ||
34 | |||
35 | @ApiModelProperty(value = "费用") | ||
36 | private String cost; | ||
37 | |||
38 | |||
39 | } |
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | |||
8 | /** | ||
9 | * @auther kangwei | ||
10 | * @create 2025-03-07-17:56 | ||
11 | */ | ||
12 | |||
13 | /** | ||
14 | * 月度计划性维修维护内容 | ||
15 | */ | ||
16 | @Data | ||
17 | @ApiModel(value="EquipmentRepairMaintainTaskCostVO对象 ", description="维修维护费用") | ||
18 | public class EquipmentRepairMaintainTaskCostVO { | ||
19 | |||
20 | @ApiModelProperty(value = "机构ID") | ||
21 | private String departId; | ||
22 | |||
23 | @ApiModelProperty(value = "机构名称") | ||
24 | private String departName; | ||
25 | |||
26 | @ApiModelProperty(value = "维修费用") | ||
27 | private String repairCost; | ||
28 | |||
29 | @ApiModelProperty(value = "大修费用") | ||
30 | private String dxjgCost; | ||
31 | |||
32 | @ApiModelProperty(value = "维护费用") | ||
33 | private String sbwhCost; | ||
34 | |||
35 | @ApiModelProperty(value = "保养费用") | ||
36 | private String sbbyCost; | ||
37 | |||
38 | @ApiModelProperty(value = "基建维修费用") | ||
39 | private String jjwxCost; | ||
40 | |||
41 | } |
... | @@ -27,9 +27,11 @@ public class SmsService { | ... | @@ -27,9 +27,11 @@ public class SmsService { |
27 | public void pushMsgNoProcessByRoleId(String messageTitle ,String messageBody ,String roleId,String forwardTag,String msgCategory){ | 27 | public void pushMsgNoProcessByRoleId(String messageTitle ,String messageBody ,String roleId,String forwardTag,String msgCategory){ |
28 | if(StringUtils.isNotEmpty(roleId)){ | 28 | if(StringUtils.isNotEmpty(roleId)){ |
29 | List<SysUser> sysUserList = userService.queryUserByRoleId(roleId); | 29 | List<SysUser> sysUserList = userService.queryUserByRoleId(roleId); |
30 | if(sysUserList != null && !sysUserList.isEmpty()){ | ||
30 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag,msgCategory); | 31 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag,msgCategory); |
31 | } | 32 | } |
32 | } | 33 | } |
34 | } | ||
33 | 35 | ||
34 | /*** | 36 | /*** |
35 | * 信息推送:包含手机,web推送 | 37 | * 信息推送:包含手机,web推送 |
... | @@ -73,6 +75,7 @@ public class SmsService { | ... | @@ -73,6 +75,7 @@ public class SmsService { |
73 | public void appPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){ | 75 | public void appPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){ |
74 | if(StringUtils.isNotEmpty(userIds)){ | 76 | if(StringUtils.isNotEmpty(userIds)){ |
75 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); | 77 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); |
78 | if(sysUserList != null && !sysUserList.isEmpty()){ | ||
76 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); | 79 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); |
77 | 80 | ||
78 | MessageEntity messageEntity = new MessageEntity(); | 81 | MessageEntity messageEntity = new MessageEntity(); |
... | @@ -86,6 +89,7 @@ public class SmsService { | ... | @@ -86,6 +89,7 @@ public class SmsService { |
86 | appPushService.pushMessage(messageEntity); | 89 | appPushService.pushMessage(messageEntity); |
87 | } | 90 | } |
88 | } | 91 | } |
92 | } | ||
89 | 93 | ||
90 | /*** | 94 | /*** |
91 | * web推送 | 95 | * web推送 |
... | @@ -97,9 +101,9 @@ public class SmsService { | ... | @@ -97,9 +101,9 @@ public class SmsService { |
97 | public void webPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag,String msgCategory){ | 101 | public void webPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag,String msgCategory){ |
98 | if(StringUtils.isNotEmpty(userIds)){ | 102 | if(StringUtils.isNotEmpty(userIds)){ |
99 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); | 103 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); |
100 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); | 104 | //List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); |
105 | if(sysUserList != null && !sysUserList.isEmpty()){ | ||
101 | List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList()); | 106 | List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList()); |
102 | |||
103 | MessageEntity messageEntity = new MessageEntity(); | 107 | MessageEntity messageEntity = new MessageEntity(); |
104 | messageEntity.setMessageTitle(messageTitle); | 108 | messageEntity.setMessageTitle(messageTitle); |
105 | messageEntity.setMessageBody(messageBody); | 109 | messageEntity.setMessageBody(messageBody); |
... | @@ -109,5 +113,7 @@ public class SmsService { | ... | @@ -109,5 +113,7 @@ public class SmsService { |
109 | 113 | ||
110 | webNoticePushServiceExt.pushMessage(messageEntity,msgCategory); | 114 | webNoticePushServiceExt.pushMessage(messageEntity,msgCategory); |
111 | } | 115 | } |
116 | |||
117 | } | ||
112 | } | 118 | } |
113 | } | 119 | } | ... | ... |
-
请 注册 或 登录 后发表评论