kangwei: 数据问题上报功能开发-后端(主表、处理日志表两表)
正在显示
19 个修改的文件
包含
511 行增加
和
37 行删除
此文件的差异被折叠,
点击展开。
... | @@ -89,8 +89,8 @@ public class ErpSettlementController { | ... | @@ -89,8 +89,8 @@ public class ErpSettlementController { |
89 | result.error500("请选择记录进行结算"); | 89 | result.error500("请选择记录进行结算"); |
90 | return result; | 90 | return result; |
91 | } | 91 | } |
92 | 92 | //校验供应商 | |
93 | List<ErpSettlementVO> settlementVOList = erpSettlementService.supplierSettlement(JSUtils.quoteEach(ids,",")); | 93 | List<ErpSettlementVO> settlementVOList = erpSettlementService.checkSettlementBySupplier(JSUtils.quoteEach(ids,",")); |
94 | if(settlementVOList==null || settlementVOList.isEmpty()) { | 94 | if(settlementVOList==null || settlementVOList.isEmpty()) { |
95 | result.error500("根据供应商与合同号未找到实体"); | 95 | result.error500("根据供应商与合同号未找到实体"); |
96 | return result; | 96 | return result; |
... | @@ -102,7 +102,7 @@ public class ErpSettlementController { | ... | @@ -102,7 +102,7 @@ public class ErpSettlementController { |
102 | erpSettlementVO = settlementVO; | 102 | erpSettlementVO = settlementVO; |
103 | erpSettlementVO.setSettlementType("0"); | 103 | erpSettlementVO.setSettlementType("0"); |
104 | if(supplierName.length() >0 ) supplierName+=","; | 104 | if(supplierName.length() >0 ) supplierName+=","; |
105 | supplierName += settlementVO.getSupplierName(); | 105 | supplierName += ConvertUtils.getString(settlementVO.getSupplierName(),""); |
106 | contractCode += settlementVO.getContractCode(); | 106 | contractCode += settlementVO.getContractCode(); |
107 | } | 107 | } |
108 | } | 108 | } |
... | @@ -135,7 +135,7 @@ public class ErpSettlementController { | ... | @@ -135,7 +135,7 @@ public class ErpSettlementController { |
135 | return result; | 135 | return result; |
136 | } | 136 | } |
137 | 137 | ||
138 | List<ErpSettlementVO> settlementVOList = erpSettlementService.waterDepartSettlement(JSUtils.quoteEach(ids,",")); | 138 | List<ErpSettlementVO> settlementVOList = erpSettlementService.checkSettlementByWaterDepart(JSUtils.quoteEach(ids,",")); |
139 | if(settlementVOList==null || settlementVOList.isEmpty()) { | 139 | if(settlementVOList==null || settlementVOList.isEmpty()) { |
140 | result.error500("根据部门与合同号未找到实体"); | 140 | result.error500("根据部门与合同号未找到实体"); |
141 | return result; | 141 | return result; | ... | ... |
1 | package com.skua.modules.erp.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | ||
10 | import io.swagger.annotations.ApiModel; | ||
11 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import lombok.Data; | ||
13 | import lombok.EqualsAndHashCode; | ||
14 | import lombok.experimental.Accessors; | ||
15 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 数据问题上报 | ||
21 | */ | ||
22 | @Data | ||
23 | @TableName("erp_problem") | ||
24 | @EqualsAndHashCode(callSuper = false) | ||
25 | @Accessors(chain = true) | ||
26 | @ApiModel(value="erp_problem对象", description="数据问题上报") | ||
27 | public class ErpProblem { | ||
28 | |||
29 | /**id*/ | ||
30 | @TableId(type = IdType.ID_WORKER_STR) | ||
31 | @ApiModelProperty(value = "id") | ||
32 | private String id; | ||
33 | /**所属厂站*/ | ||
34 | @Excel(name = "所属厂站", width = 15) | ||
35 | @ApiModelProperty(value = "所属厂站") | ||
36 | @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") | ||
37 | private String departId; | ||
38 | /**问题描述*/ | ||
39 | @Excel(name = "问题描述", width = 15) | ||
40 | @ApiModelProperty(value = "问题描述") | ||
41 | private String problemContent; | ||
42 | /**功能名称*/ | ||
43 | @Excel(name = "功能名称", width = 15) | ||
44 | @ApiModelProperty(value = "功能名称") | ||
45 | private String functionName; | ||
46 | /**问题类型*/ | ||
47 | @Excel(name = "问题类型", width = 15) | ||
48 | @ApiModelProperty(value = "问题类型") | ||
49 | @Dict(dicCode = "erp_problem_type") | ||
50 | private String problemType; | ||
51 | /**问题截图*/ | ||
52 | @Excel(name = "问题截图", width = 15) | ||
53 | @ApiModelProperty(value = "问题截图") | ||
54 | private String problemPic; | ||
55 | /**动态截图*/ | ||
56 | @Excel(name = "动态截图", width = 15) | ||
57 | @ApiModelProperty(value = "动态截图") | ||
58 | private String problemExtPic; | ||
59 | /**上报人*/ | ||
60 | @Excel(name = "上报人", width = 15) | ||
61 | @ApiModelProperty(value = "上报人") | ||
62 | @Dict(dicCode = "id",dictTable="sys_user",dicText="realname") | ||
63 | private String reportUserId; | ||
64 | /**上报时间*/ | ||
65 | @ApiModelProperty(value = "上报时间") | ||
66 | private Date reportDate; | ||
67 | /**处理状态(0:未提交,1:已提交,2退回,3已处理,4 关闭)*/ | ||
68 | @Excel(name = "处理状态(0:未提交,1:待处理,2退回,3已处理,4 关闭)", width = 15) | ||
69 | @ApiModelProperty(value = "处理状态(0:未提交,1:待处理,2退回,3已处理,4 关闭)") | ||
70 | @Dict(dicCode = "erp_problem_handle_status") | ||
71 | private Integer handleStatus; | ||
72 | /**审批意见*/ | ||
73 | @Excel(name = "审批意见", width = 15) | ||
74 | @ApiModelProperty(value = "审批意见") | ||
75 | private String approveMessage; | ||
76 | |||
77 | @ApiModelProperty(value = "复核原因") | ||
78 | private String reviewReason ; | ||
79 | |||
80 | /**处理人*/ | ||
81 | @Excel(name = "处理人", width = 15) | ||
82 | @ApiModelProperty(value = "处理人") | ||
83 | private String handleUser; | ||
84 | /**处理时间*/ | ||
85 | @Excel(name = "处理时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
86 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
87 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
88 | @ApiModelProperty(value = "处理时间") | ||
89 | private Date handleTime; | ||
90 | /**备注*/ | ||
91 | @Excel(name = "备注", width = 15) | ||
92 | @ApiModelProperty(value = "备注") | ||
93 | private String remark; | ||
94 | /**创建人Id*/ | ||
95 | @Excel(name = "创建人Id", width = 15) | ||
96 | @ApiModelProperty(value = "创建人Id") | ||
97 | private String createBy; | ||
98 | /**创建时间*/ | ||
99 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
100 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
101 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
102 | @ApiModelProperty(value = "创建时间") | ||
103 | private Date createTime; | ||
104 | /**修改人Id*/ | ||
105 | @Excel(name = "修改人Id", width = 15) | ||
106 | @ApiModelProperty(value = "修改人Id") | ||
107 | private String updateBy; | ||
108 | /**修改时间*/ | ||
109 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
110 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
111 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
112 | @ApiModelProperty(value = "修改时间") | ||
113 | private Date updateTime; | ||
114 | /**删除标识,1有效,0删除*/ | ||
115 | @Excel(name = "删除标识,1有效,0删除", width = 15) | ||
116 | @ApiModelProperty(value = "删除标识,1有效,0删除") | ||
117 | private Integer delFlag; | ||
118 | } |
1 | package com.skua.modules.erp.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | ||
10 | import io.swagger.annotations.ApiModel; | ||
11 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import lombok.Data; | ||
13 | import lombok.EqualsAndHashCode; | ||
14 | import lombok.experimental.Accessors; | ||
15 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 数据问题上报详情 | ||
21 | */ | ||
22 | @Data | ||
23 | @TableName("erp_problem_detail") | ||
24 | @EqualsAndHashCode(callSuper = false) | ||
25 | @Accessors(chain = true) | ||
26 | @ApiModel(value="erp_problem_detail对象", description="数据问题上报处理日志") | ||
27 | public class ErpProblemDetail { | ||
28 | |||
29 | /**id*/ | ||
30 | @TableId(type = IdType.ID_WORKER_STR) | ||
31 | @ApiModelProperty(value = "id") | ||
32 | private String id; | ||
33 | /**问题编号*/ | ||
34 | @Excel(name = "问题编号", width = 15) | ||
35 | @ApiModelProperty(value = "问题编号") | ||
36 | private String problemId; | ||
37 | /**处理人*/ | ||
38 | @Excel(name = "处理人", width = 15) | ||
39 | @ApiModelProperty(value = "处理人") | ||
40 | @Dict(dicCode = "id",dictTable="sys_user",dicText="realname") | ||
41 | private String handleUserId; | ||
42 | /**处理人名称*/ | ||
43 | @Excel(name = "处理人名称", width = 15) | ||
44 | @ApiModelProperty(value = "处理人名称") | ||
45 | private String handleUserName; | ||
46 | /**处理时间*/ | ||
47 | @Excel(name = "处理时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
48 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
49 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
50 | @ApiModelProperty(value = "处理时间") | ||
51 | private Date handleTime; | ||
52 | /**处理状态(0:未提交,1:已提交,2退回,3已处理,4 关闭)*/ | ||
53 | @Excel(name = "处理状态(2退回,3已处理,4 关闭)", width = 15) | ||
54 | @ApiModelProperty(value = "处理状态(2退回,3已处理,4 关闭)") | ||
55 | @Dict(dicCode = "erp_problem_detail_handle_status") | ||
56 | private Integer handleStatus; | ||
57 | /**处理截图*/ | ||
58 | @Excel(name = "处理截图", width = 15) | ||
59 | @ApiModelProperty(value = "处理截图") | ||
60 | private String handlePic; | ||
61 | /**备注*/ | ||
62 | @Excel(name = "备注", width = 15) | ||
63 | @ApiModelProperty(value = "备注") | ||
64 | private String remark; | ||
65 | /**创建人Id*/ | ||
66 | @Excel(name = "创建人Id", width = 15) | ||
67 | @ApiModelProperty(value = "创建人Id") | ||
68 | private String createBy; | ||
69 | /**创建时间*/ | ||
70 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
71 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
72 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
73 | @ApiModelProperty(value = "创建时间") | ||
74 | private Date createTime; | ||
75 | /**修改人Id*/ | ||
76 | @Excel(name = "修改人Id", width = 15) | ||
77 | @ApiModelProperty(value = "修改人Id") | ||
78 | private String updateBy; | ||
79 | /**修改时间*/ | ||
80 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
81 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
82 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
83 | @ApiModelProperty(value = "修改时间") | ||
84 | private Date updateTime; | ||
85 | } |
... | @@ -66,8 +66,8 @@ public class ErpSettlement { | ... | @@ -66,8 +66,8 @@ public class ErpSettlement { |
66 | @ApiModelProperty(value = "税额") | 66 | @ApiModelProperty(value = "税额") |
67 | private String taxAmount; | 67 | private String taxAmount; |
68 | /**价税合计*/ | 68 | /**价税合计*/ |
69 | @Excel(name = "价税合计", width = 15) | 69 | @Excel(name = "总价不含税", width = 15) |
70 | @ApiModelProperty(value = "价税合计") | 70 | @ApiModelProperty(value = "总价不含税") |
71 | private String totalPriceTax; | 71 | private String totalPriceTax; |
72 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ | 72 | /**签字状态(1-申请,2-验收签字,3-经理签字)*/ |
73 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) | 73 | @Excel(name = "签字状态(1-申请,2-验收签字,3-经理签字)", width = 15) |
... | @@ -86,7 +86,6 @@ public class ErpSettlement { | ... | @@ -86,7 +86,6 @@ public class ErpSettlement { |
86 | @ApiModelProperty(value = "结算日期") | 86 | @ApiModelProperty(value = "结算日期") |
87 | private String settlementTime; | 87 | private String settlementTime; |
88 | 88 | ||
89 | |||
90 | /**申请人签字*/ | 89 | /**申请人签字*/ |
91 | @Excel(name = "申请人签字", width = 15) | 90 | @Excel(name = "申请人签字", width = 15) |
92 | @ApiModelProperty(value = "申请人签字") | 91 | @ApiModelProperty(value = "申请人签字") | ... | ... |
1 | package com.skua.modules.erp.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.erp.entity.ErpProblemDetail; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 数据问题上报详情 | ||
11 | */ | ||
12 | public interface ErpProblemDetailMapper extends BaseMapper<ErpProblemDetail> { | ||
13 | |||
14 | void deleteByProblemId(@Param("problemId") String problemId); | ||
15 | |||
16 | List<ErpProblemDetail> queryByProblemId(@Param("problemId") String problemId); | ||
17 | } |
... | @@ -13,10 +13,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ... | @@ -13,10 +13,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
13 | * 药剂结算单详情 | 13 | * 药剂结算单详情 |
14 | */ | 14 | */ |
15 | public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> { | 15 | public interface ErpSettlementMapper extends BaseMapper<ErpSettlement> { |
16 | //供应商结算 | 16 | //供应商结算--校验供应商 |
17 | List<ErpSettlementVO> supplierSettlement(@Param("ids") String ids); | 17 | List<ErpSettlementVO> checkSettlementBySupplier(@Param("ids") String ids); |
18 | //水厂结算 | 18 | //水厂结算--校验水厂 |
19 | List<ErpSettlementVO> waterDepartSettlement(@Param("ids")String ids); | 19 | List<ErpSettlementVO> checkSettlementByWaterDepart(@Param("ids")String ids); |
20 | 20 | ||
21 | // 根据入库单ids,获取【供应商】结算单详情 | 21 | // 根据入库单ids,获取【供应商】结算单详情 |
22 | List<ErpSettlementItemVO> querySupplierSettlementByMaterialIds(@Param("ids") String materialIds); | 22 | List<ErpSettlementItemVO> querySupplierSettlementByMaterialIds(@Param("ids") String materialIds); | ... | ... |
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | <mapper namespace="com.skua.modules.erp.mapper.ErpProblemDetailMapper"> | ||
4 | |||
5 | <delete id="deleteByProblemId"> | ||
6 | delete from erp_problem_detail where problem_id = #{problemId} | ||
7 | </delete> | ||
8 | |||
9 | <select id="queryByProblemId" resultType="com.skua.modules.erp.entity.ErpProblemDetail"> | ||
10 | select * from erp_problem_detail where problem_id = #{problemId} order by create_time asc | ||
11 | </select> | ||
12 | |||
13 | </mapper> |
... | @@ -2,24 +2,21 @@ | ... | @@ -2,24 +2,21 @@ |
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 | <!--根据ids获取:供应商结算单 --> | 4 | <!--根据ids获取:供应商结算单 --> |
5 | <select id="supplierSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> | 5 | <select id="checkSettlementBySupplier" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> |
6 | select sm.supp_name 'supplierName', d.depart_name ,aaa.* from ( | 6 | select sm.supp_name 'supplierName' ,aaa.* from ( |
7 | select pm.supplier_id ,pc.contract_code, mi.purchase_contract_id ,pc.project_name, mi.depart_id, | 7 | select pm.supplier_id ,pc.contract_code |
8 | sum(mi.material_num) material_num, round(sum(pm.unit_price * mi.material_num),2) total_price, | ||
9 | round(sum(pm.unit_price * mi.material_num *(100 + pm.tax_amount) /100),2) total_price_tax | ||
10 | from erp_material_in mi ,erp_purchase_contract pc , erp_purchase_material pm | 8 | from erp_material_in mi ,erp_purchase_contract pc , erp_purchase_material pm |
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 | 9 | 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 | and mi.id in (${ids}) | 10 | and mi.id in (${ids}) |
13 | group by pm.supplier_id ,pc.contract_code | 11 | group by pm.supplier_id ,pc.contract_code |
14 | )aaa | 12 | )aaa |
15 | left join ajh_supplier_manage sm on aaa.supplier_id = sm.id | 13 | left join ajh_supplier_manage sm on aaa.supplier_id = sm.id |
16 | left join sys_depart d on aaa.depart_id = d.id | ||
17 | </select> | 14 | </select> |
18 | <!-- 根据入库单ids,获取供应商结算单详情--> | 15 | <!-- 根据入库单ids,获取供应商结算单详情--> |
19 | <select id="querySupplierSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> | 16 | <select id="querySupplierSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> |
20 | select sm.supp_name 'supplierName',d.depart_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, | 17 | select sm.supp_name 'supplierName',d.depart_name, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, |
21 | pc.contract_name,pc.contract_code,pc.project_name , mi.purchase_contract_id , pm.good_brand , pm.good_origin, pm.unit_price ,mi.material_num, pm.tax_amount ,round(pm.unit_price * mi.material_num,2) total_price, | 18 | pc.contract_name,pc.contract_code,pc.project_name , mi.purchase_contract_id , pm.good_brand , pm.good_origin, pm.unit_price ,mi.material_num, pm.tax_amount ,round(pm.unit_price * mi.material_num,2) total_price, |
22 | round(pm.unit_price * mi.material_num *(100+pm.tax_amount) /100 ,2) total_price_tax, | 19 | round(pm.unit_price * mi.material_num *100 /(100+ ifnull(pm.tax_amount,0)) ,2) total_price_tax, |
23 | 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' | 20 | 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' |
24 | from erp_material_in mi | 21 | from erp_material_in mi |
25 | left join erp_purchase_contract pc on mi.purchase_contract_id = pc.id | 22 | left join erp_purchase_contract pc on mi.purchase_contract_id = pc.id |
... | @@ -33,10 +30,9 @@ | ... | @@ -33,10 +30,9 @@ |
33 | </select> | 30 | </select> |
34 | 31 | ||
35 | <!-- 根据ids获取:水厂结算单 --> | 32 | <!-- 根据ids获取:水厂结算单 --> |
36 | <select id="waterDepartSettlement" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> | 33 | <select id="checkSettlementByWaterDepart" resultType="com.skua.modules.erp.vo.ErpSettlementVO"> |
37 | select d.depart_name ,aaa.* from ( | 34 | select d.depart_name ,aaa.* from ( |
38 | 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, | 35 | select mi.depart_id ,dc.contract_code |
39 | round(sum(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100),2) total_price_tax | ||
40 | from erp_material_in mi ,erp_distribut_contract dc , erp_distribut_material dm | 36 | from erp_material_in mi ,erp_distribut_contract dc , erp_distribut_material dm |
41 | 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 | 37 | 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 |
42 | and mi.id in (${ids}) | 38 | and mi.id in (${ids}) |
... | @@ -47,8 +43,8 @@ | ... | @@ -47,8 +43,8 @@ |
47 | <!-- 根据入库单ids,获取水厂结算单详情--> | 43 | <!-- 根据入库单ids,获取水厂结算单详情--> |
48 | <select id="queryWaterDepartSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> | 44 | <select id="queryWaterDepartSettlementByMaterialIds" resultType="com.skua.modules.erp.vo.ErpSettlementItemVO"> |
49 | select d.depart_name, dc.contract_name ,dc.project_name, dc.contract_code, dm.distribut_price 'unit_price' , pm.good_brand , pm.good_origin, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, dm.tax_amount , | 45 | select d.depart_name, dc.contract_name ,dc.project_name, dc.contract_code, dm.distribut_price 'unit_price' , pm.good_brand , pm.good_origin, mf.jishu_file_path, mf.appearance_info, mf.matched_info ,mf.handle_msg,mf.sender_sign,mf.receiver_sign, dm.tax_amount , |
50 | round(dm.distribut_price * mi.material_num,2) total_price, | 46 | round(dm.distribut_price * mi.material_num,2) total_price, round(pm.distribut_price * mi.material_num *100 /(100+ ifnull(dm.tax_amount,0)) ,2) total_price_tax, |
51 | round(dm.distribut_price * mi.material_num *(100+dm.tax_amount) /100,2) total_price_tax, mi.depart_id , mi.distribut_contract_id ,mi.purchase_contract_id, mi.material_num, | 47 | mi.depart_id , mi.distribut_contract_id ,mi.purchase_contract_id, mi.material_num, |
52 | 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' | 48 | 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' |
53 | from erp_material_in mi | 49 | from erp_material_in mi |
54 | left join erp_distribut_material dm on (dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id) | 50 | left join erp_distribut_material dm on (dm.good_code = mi.good_code and dm.contract_id = mi.distribut_contract_id) | ... | ... |
1 | package com.skua.modules.erp.service; | ||
2 | |||
3 | import com.skua.modules.erp.entity.ErpProblem; | ||
4 | import com.baomidou.mybatisplus.extension.service.IService; | ||
5 | import com.skua.modules.erp.vo.ErpProblemVO; | ||
6 | |||
7 | /** | ||
8 | * 数据问题上报 | ||
9 | */ | ||
10 | public interface IErpProblemService extends IService<ErpProblem> { | ||
11 | /** | ||
12 | * 新增 | ||
13 | * @param erpProblemVO | ||
14 | */ | ||
15 | void saveErpProblem(ErpProblemVO erpProblemVO); | ||
16 | |||
17 | /** | ||
18 | * 修改 | ||
19 | * @param erpProblemVO | ||
20 | * @return | ||
21 | */ | ||
22 | boolean updateErpProblem(ErpProblemVO erpProblemVO); | ||
23 | |||
24 | /*** | ||
25 | * 删除 | ||
26 | * @param id | ||
27 | */ | ||
28 | void delById(String id); | ||
29 | |||
30 | /*** | ||
31 | * 根据id获取记录 | ||
32 | * @param id | ||
33 | * @return | ||
34 | */ | ||
35 | ErpProblemVO queryById(String id); | ||
36 | } |
... | @@ -38,10 +38,10 @@ public interface IErpSettlementService extends IService<ErpSettlement> { | ... | @@ -38,10 +38,10 @@ public interface IErpSettlementService extends IService<ErpSettlement> { |
38 | // 根据入库单ids,获取【水厂】结算单详情 | 38 | // 根据入库单ids,获取【水厂】结算单详情 |
39 | List<ErpSettlementItemVO> queryWaterDepartSettlementByMaterialIds( String materialInIds); | 39 | List<ErpSettlementItemVO> queryWaterDepartSettlementByMaterialIds( String materialInIds); |
40 | 40 | ||
41 | //供应商结算 | 41 | //供应商结算--校验供应商 |
42 | List<ErpSettlementVO> supplierSettlement(String materialInIds); | 42 | List<ErpSettlementVO> checkSettlementBySupplier(String materialInIds); |
43 | //水厂结算 | 43 | //水厂结算--校验水厂 |
44 | List<ErpSettlementVO> waterDepartSettlement(String materialInIds); | 44 | List<ErpSettlementVO> checkSettlementByWaterDepart(String materialInIds); |
45 | 45 | ||
46 | /***结算:修改 药剂入库结算状态*/ | 46 | /***结算:修改 药剂入库结算状态*/ |
47 | boolean updateMaterialInSettlementFlag(ErpSettlement erpSettlementEntity,String settlementFlag); | 47 | boolean updateMaterialInSettlementFlag(ErpSettlement erpSettlementEntity,String settlementFlag); | ... | ... |
1 | package com.skua.modules.erp.service.impl; | ||
2 | |||
3 | import com.skua.modules.erp.entity.ErpProblem; | ||
4 | import com.skua.modules.erp.entity.ErpProblemDetail; | ||
5 | import com.skua.modules.erp.mapper.ErpProblemDetailMapper; | ||
6 | import com.skua.modules.erp.mapper.ErpProblemMapper; | ||
7 | import com.skua.modules.erp.service.IErpProblemService; | ||
8 | import com.skua.modules.erp.vo.ErpProblemVO; | ||
9 | import org.apache.commons.lang3.StringUtils; | ||
10 | import org.springframework.beans.BeanUtils; | ||
11 | import org.springframework.stereotype.Service; | ||
12 | |||
13 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
14 | import org.springframework.transaction.annotation.Transactional; | ||
15 | |||
16 | import javax.annotation.Resource; | ||
17 | import java.util.Date; | ||
18 | import java.util.List; | ||
19 | |||
20 | /** | ||
21 | * 数据问题上报 | ||
22 | */ | ||
23 | @Service | ||
24 | public class ErpProblemServiceImpl extends ServiceImpl<ErpProblemMapper, ErpProblem> implements IErpProblemService { | ||
25 | @Resource | ||
26 | private ErpProblemDetailMapper problemDetailMapper; | ||
27 | /** | ||
28 | * 新增 | ||
29 | * @param erpProblemVO | ||
30 | */ | ||
31 | //@Transactional | ||
32 | public void saveErpProblem(ErpProblemVO erpProblemVO){ | ||
33 | ErpProblem problem = new ErpProblem(); | ||
34 | //BeanUtils.copyProperties(有值的对象, 要被赋值的对象); | ||
35 | BeanUtils.copyProperties(erpProblemVO, problem); | ||
36 | this.baseMapper.insert(problem); | ||
37 | erpProblemVO.setId(problem.getId()); | ||
38 | |||
39 | if(erpProblemVO.getProblemDetailList() != null && !erpProblemVO.getProblemDetailList().isEmpty()){ | ||
40 | for(ErpProblemDetail problemDetail : erpProblemVO.getProblemDetailList()){ | ||
41 | problemDetail.setProblemId(problem.getId()); | ||
42 | problemDetailMapper.insert(problemDetail); | ||
43 | } | ||
44 | } | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * 修改 | ||
49 | * @param erpProblemVO | ||
50 | * @return | ||
51 | */ | ||
52 | //@Transactional | ||
53 | public boolean updateErpProblem(ErpProblemVO erpProblemVO){ | ||
54 | ErpProblem problem = new ErpProblem(); | ||
55 | //BeanUtils.copyProperties(有值的对象, 要被赋值的对象); | ||
56 | BeanUtils.copyProperties(erpProblemVO, problem); | ||
57 | |||
58 | problemDetailMapper.deleteByProblemId(erpProblemVO.getId()); | ||
59 | // 删除后批量新增 | ||
60 | Integer handleStatus = null; | ||
61 | Date handleTime = null; | ||
62 | if(erpProblemVO.getProblemDetailList() != null && !erpProblemVO.getProblemDetailList().isEmpty()){ | ||
63 | for(ErpProblemDetail problemDetail : erpProblemVO.getProblemDetailList()){ | ||
64 | problemDetail.setProblemId(problem.getId()); | ||
65 | |||
66 | handleStatus = problemDetail.getHandleStatus(); | ||
67 | handleTime = problemDetail.getHandleTime(); | ||
68 | problemDetailMapper.insert(problemDetail); | ||
69 | } | ||
70 | } | ||
71 | if(handleStatus != null ){ | ||
72 | problem.setHandleStatus(handleStatus); | ||
73 | } | ||
74 | if(handleTime != null){ | ||
75 | problem.setHandleTime(handleTime); | ||
76 | } | ||
77 | this.baseMapper.updateById(problem); | ||
78 | return true; | ||
79 | } | ||
80 | /*** | ||
81 | * 根据id获取记录 | ||
82 | * @param id | ||
83 | * @return | ||
84 | */ | ||
85 | public ErpProblemVO queryById(String id){ | ||
86 | ErpProblem erpProblem = this.baseMapper.selectById(id); | ||
87 | ErpProblemVO problemVO = new ErpProblemVO(); | ||
88 | //BeanUtils.copyProperties(有值的对象, 要被赋值的对象); | ||
89 | BeanUtils.copyProperties(erpProblem, problemVO); | ||
90 | |||
91 | List<ErpProblemDetail> problemDetailList = problemDetailMapper.queryByProblemId(id); | ||
92 | if(problemDetailList != null && !problemDetailList.isEmpty()){ | ||
93 | problemVO.setProblemDetailList(problemDetailList); | ||
94 | } | ||
95 | return problemVO; | ||
96 | } | ||
97 | |||
98 | /*** | ||
99 | * 删除 | ||
100 | * @param id | ||
101 | */ | ||
102 | @Transactional | ||
103 | public void delById(String id){ | ||
104 | problemDetailMapper.deleteByProblemId(id); | ||
105 | this.baseMapper.deleteById(id); | ||
106 | } | ||
107 | } |
... | @@ -138,12 +138,12 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E | ... | @@ -138,12 +138,12 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E |
138 | } | 138 | } |
139 | 139 | ||
140 | //供应商结算 | 140 | //供应商结算 |
141 | public List<ErpSettlementVO> supplierSettlement(String materialInIds){ | 141 | public List<ErpSettlementVO> checkSettlementBySupplier(String materialInIds){ |
142 | return this.baseMapper.supplierSettlement( materialInIds ); | 142 | return this.baseMapper.checkSettlementBySupplier( materialInIds ); |
143 | } | 143 | } |
144 | //水厂结算 | 144 | //水厂结算 |
145 | public List<ErpSettlementVO> waterDepartSettlement(String materialInIds){ | 145 | public List<ErpSettlementVO> checkSettlementByWaterDepart(String materialInIds){ |
146 | return this.baseMapper.waterDepartSettlement( materialInIds ); | 146 | return this.baseMapper.checkSettlementByWaterDepart( materialInIds ); |
147 | } | 147 | } |
148 | 148 | ||
149 | 149 | ... | ... |
1 | package com.skua.modules.erp.vo; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import java.util.List; | ||
6 | |||
7 | import com.baomidou.mybatisplus.annotation.IdType; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | ||
9 | import com.baomidou.mybatisplus.annotation.TableName; | ||
10 | import com.baomidou.mybatisplus.annotation.TableField; | ||
11 | import com.skua.modules.erp.entity.ErpProblemDetail; | ||
12 | import io.swagger.annotations.ApiModel; | ||
13 | import io.swagger.annotations.ApiModelProperty; | ||
14 | import lombok.Data; | ||
15 | import lombok.EqualsAndHashCode; | ||
16 | import lombok.experimental.Accessors; | ||
17 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
18 | import org.springframework.format.annotation.DateTimeFormat; | ||
19 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
20 | |||
21 | /** | ||
22 | * 数据问题上报 | ||
23 | */ | ||
24 | @Data | ||
25 | @ApiModel(value="erp_problem数据传输对象", description="数据问题上报") | ||
26 | public class ErpProblemVO { | ||
27 | |||
28 | /**id*/ | ||
29 | @ApiModelProperty(value = "id") | ||
30 | private String id; | ||
31 | /**所属厂站*/ | ||
32 | @Excel(name = "所属厂站", width = 15) | ||
33 | @ApiModelProperty(value = "所属厂站") | ||
34 | private String departId; | ||
35 | /**问题描述*/ | ||
36 | @Excel(name = "问题描述", width = 15) | ||
37 | @ApiModelProperty(value = "问题描述") | ||
38 | private String problemContent; | ||
39 | /**功能名称*/ | ||
40 | @Excel(name = "功能名称", width = 15) | ||
41 | @ApiModelProperty(value = "功能名称") | ||
42 | private String functionName; | ||
43 | /**问题类型*/ | ||
44 | @Excel(name = "问题类型", width = 15) | ||
45 | @ApiModelProperty(value = "问题类型") | ||
46 | private String problemType; | ||
47 | /**问题截图*/ | ||
48 | @Excel(name = "问题截图", width = 15) | ||
49 | @ApiModelProperty(value = "问题截图") | ||
50 | private String problemPic; | ||
51 | /**动态截图*/ | ||
52 | @Excel(name = "动态截图", width = 15) | ||
53 | @ApiModelProperty(value = "动态截图") | ||
54 | private String problemExtPic; | ||
55 | /**上报人*/ | ||
56 | @Excel(name = "上报人", width = 15) | ||
57 | @ApiModelProperty(value = "上报人") | ||
58 | private String reportUserId; | ||
59 | /**上报时间*/ | ||
60 | @ApiModelProperty(value = "上报时间") | ||
61 | private Date reportDate; | ||
62 | /**处理状态(0:未提交,1:已提交,2退回,3已处理,4 关闭)*/ | ||
63 | @Excel(name = "处理状态(0:未提交,1:已提交,2退回,3已处理,4 关闭)", width = 15) | ||
64 | @ApiModelProperty(value = "处理状态(0:未提交,1:已提交,2退回,3已处理,4 关闭)") | ||
65 | private Integer handleStatus; | ||
66 | /**审批意见*/ | ||
67 | @Excel(name = "审批意见", width = 15) | ||
68 | @ApiModelProperty(value = "审批意见") | ||
69 | private String approveMessage; | ||
70 | /**处理人*/ | ||
71 | @Excel(name = "处理人", width = 15) | ||
72 | @ApiModelProperty(value = "处理人") | ||
73 | private String handleUser; | ||
74 | /**处理时间*/ | ||
75 | @Excel(name = "处理时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
76 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
77 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
78 | @ApiModelProperty(value = "处理时间") | ||
79 | private Date handleTime; | ||
80 | /**备注*/ | ||
81 | @Excel(name = "备注", width = 15) | ||
82 | @ApiModelProperty(value = "备注") | ||
83 | private String remark; | ||
84 | |||
85 | |||
86 | @ApiModelProperty(value = "处理日志集合") | ||
87 | private List<ErpProblemDetail> problemDetailList ; | ||
88 | } |
... | @@ -421,8 +421,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -421,8 +421,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
421 | JnhbReportData lastMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastMonthStartTime(),dataVO.getLastMonthEndTime()); | 421 | JnhbReportData lastMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastMonthStartTime(),dataVO.getLastMonthEndTime()); |
422 | JnhbReportData lastYearMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastYearMonthStartTime(),dataVO.getLastYearMonthEndTime()); | 422 | JnhbReportData lastYearMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastYearMonthStartTime(),dataVO.getLastYearMonthEndTime()); |
423 | //ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb) | 423 | //ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb) |
424 | reduceStatisticsList.add( new ResultNumberVO( "cod", "吨",nowMonthData.getCodxjl(),lastMonthData.getCodxjl(),lastYearMonthData.getCodxjl() ) );//COD消减量(吨) codxjl | 424 | reduceStatisticsList.add( new ResultNumberVO( "COD", "吨",nowMonthData.getCodxjl(),lastMonthData.getCodxjl(),lastYearMonthData.getCodxjl() ) );//COD消减量(吨) codxjl |
425 | reduceStatisticsList.add( new ResultNumberVO( "NH3-N","吨",nowMonthData.getAdxjl(),lastMonthData.getAdxjl(),lastYearMonthData.getAdxjl() ));//NH3-N消减量(吨)adxjl | 425 | reduceStatisticsList.add( new ResultNumberVO( "NH₃-N","吨",nowMonthData.getAdxjl(),lastMonthData.getAdxjl(),lastYearMonthData.getAdxjl() ));//NH3-N消减量(吨)adxjl |
426 | reduceStatisticsList.add( new ResultNumberVO( "TP","吨",nowMonthData.getTpxjl(),lastMonthData.getTpxjl(),lastYearMonthData.getTpxjl() ));//TP消减量(吨)tpxjl | 426 | reduceStatisticsList.add( new ResultNumberVO( "TP","吨",nowMonthData.getTpxjl(),lastMonthData.getTpxjl(),lastYearMonthData.getTpxjl() ));//TP消减量(吨)tpxjl |
427 | reduceStatisticsList.add( new ResultNumberVO( "TN","吨",nowMonthData.getTnxjl(),lastMonthData.getTnxjl(),lastYearMonthData.getTnxjl() ));//TN消减量(吨)tnxjl | 427 | reduceStatisticsList.add( new ResultNumberVO( "TN","吨",nowMonthData.getTnxjl(),lastMonthData.getTnxjl(),lastYearMonthData.getTnxjl() ));//TN消减量(吨)tnxjl |
428 | 428 | ... | ... |
... | @@ -104,7 +104,6 @@ public class WaterCountAnalysisNewController { | ... | @@ -104,7 +104,6 @@ public class WaterCountAnalysisNewController { |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * 查询运行负荷率分析 | 106 | * 查询运行负荷率分析 |
107 | * | ||
108 | * @return | 107 | * @return |
109 | */ | 108 | */ |
110 | @AutoLog(value = "查询自来水消耗量") | 109 | @AutoLog(value = "查询自来水消耗量") | ... | ... |
... | @@ -166,9 +166,9 @@ | ... | @@ -166,9 +166,9 @@ |
166 | </select> | 166 | </select> |
167 | <select id="getYhData" resultType="com.skua.modules.report.vo.DepartDrugResult"> | 167 | <select id="getYhData" resultType="com.skua.modules.report.vo.DepartDrugResult"> |
168 | SELECT | 168 | SELECT |
169 | IFNULL(dh.yjdh,0) AS zyh, | 169 | round(IFNULL(dh.yjdh,0)/10000,2) AS zyh, |
170 | IFNULL(dhtb.yjdh,0) AS zyh_tb, | 170 | round(IFNULL(dhtb.yjdh,0)/10000,2) AS zyh_tb, |
171 | IFNULL(dhhb.yjdh,0) AS zyh_hb | 171 | round(IFNULL(dhhb.yjdh,0)/10000,2) AS zyh_hb |
172 | FROM | 172 | FROM |
173 | ( | 173 | ( |
174 | SELECT | 174 | SELECT | ... | ... |
-
请 注册 或 登录 后发表评论