kangwei : 设备台账关联备品备件
修改bug
正在显示
20 个修改的文件
包含
366 行增加
和
33 行删除
... | @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; | ... | @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; |
10 | 10 | ||
11 | import com.skua.core.api.vo.Result; | 11 | import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 12 | import com.skua.core.aspect.annotation.AutoLog; |
13 | import com.skua.core.context.BaseContextHandler; | ||
13 | import com.skua.core.query.QueryGenerator; | 14 | import com.skua.core.query.QueryGenerator; |
14 | import com.skua.core.util.ConvertUtils; | 15 | import com.skua.core.util.ConvertUtils; |
15 | import com.skua.modules.ajh.entity.AjhMeetingSend; | 16 | import com.skua.modules.ajh.entity.AjhMeetingSend; |
... | @@ -91,6 +92,8 @@ public class AjhMeetingSendController { | ... | @@ -91,6 +92,8 @@ public class AjhMeetingSendController { |
91 | ajhMeetingSend.getMeetStartTime()+" 00:00:00",ajhMeetingSend.getMeetEndTime()+" 23:59:59"); | 92 | ajhMeetingSend.getMeetStartTime()+" 00:00:00",ajhMeetingSend.getMeetEndTime()+" 23:59:59"); |
92 | Page<AjhMeetingSend> page = new Page<AjhMeetingSend>(pageNo, pageSize); | 93 | Page<AjhMeetingSend> page = new Page<AjhMeetingSend>(pageNo, pageSize); |
93 | IPage<AjhMeetingSend> pageList = ajhMeetingSendService.queryPage(page, queryWrapper); | 94 | IPage<AjhMeetingSend> pageList = ajhMeetingSendService.queryPage(page, queryWrapper); |
95 | |||
96 | |||
94 | result.setSuccess(true); | 97 | result.setSuccess(true); |
95 | result.setResult(pageList); | 98 | result.setResult(pageList); |
96 | return result; | 99 | return result; |
... | @@ -344,7 +347,7 @@ public class AjhMeetingSendController { | ... | @@ -344,7 +347,7 @@ public class AjhMeetingSendController { |
344 | //导出文件名称 | 347 | //导出文件名称 |
345 | mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表"); | 348 | mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表"); |
346 | mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class); | 349 | mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class); |
347 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("会议记录列表数据", "导出人:Jeecg", "导出信息")); | 350 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("会议记录列表数据", "", "会议记录列表")); |
348 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | 351 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
349 | return mv; | 352 | return mv; |
350 | } | 353 | } | ... | ... |
... | @@ -31,7 +31,7 @@ public class AjhMeeting { | ... | @@ -31,7 +31,7 @@ public class AjhMeeting { |
31 | @ApiModelProperty(value = "主键") | 31 | @ApiModelProperty(value = "主键") |
32 | private String id; | 32 | private String id; |
33 | /**组织单位*/ | 33 | /**组织单位*/ |
34 | @Excel(name = "组织单位", width = 15) | 34 | @Excel(name = "所属机构", width = 15 ) |
35 | @ApiModelProperty(value = "组织单位") | 35 | @ApiModelProperty(value = "组织单位") |
36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
37 | private String departId; | 37 | private String departId; |
... | @@ -40,7 +40,7 @@ public class AjhMeeting { | ... | @@ -40,7 +40,7 @@ public class AjhMeeting { |
40 | @ApiModelProperty(value = "通知单位") | 40 | @ApiModelProperty(value = "通知单位") |
41 | private String departIds; | 41 | private String departIds; |
42 | /**会议标题*/ | 42 | /**会议标题*/ |
43 | @Excel(name = "会议标题", width = 15) | 43 | @Excel(name = "任务主题", width = 15 ,orderNum="2") |
44 | @ApiModelProperty(value = "会议标题") | 44 | @ApiModelProperty(value = "会议标题") |
45 | private String meetTitile; | 45 | private String meetTitile; |
46 | /**会议内容*/ | 46 | /**会议内容*/ | ... | ... |
... | @@ -34,78 +34,78 @@ public class AjhMeetingSend { | ... | @@ -34,78 +34,78 @@ public class AjhMeetingSend { |
34 | @ApiModelProperty(value = "会议ID") | 34 | @ApiModelProperty(value = "会议ID") |
35 | private String meetId; | 35 | private String meetId; |
36 | /**机构ID*/ | 36 | /**机构ID*/ |
37 | @Excel(name = "机构ID", width = 15) | 37 | @Excel(name = "所属机构", width = 15 ,dictTable = "sys_depart", dicCode="id", dicText = "depart_name" ,orderNum="1") |
38 | @ApiModelProperty(value = "机构ID") | 38 | @ApiModelProperty(value = "机构ID") |
39 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 39 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
40 | private String departId; | 40 | private String departId; |
41 | /**会议时间*/ | 41 | /**会议时间*/ |
42 | @Excel(name = "会议时间", width = 15) | 42 | @Excel(name = "拟定任务时间", width = 40 , orderNum = "3") |
43 | @ApiModelProperty(value = "会议时间") | 43 | @ApiModelProperty(value = "会议时间" ) |
44 | private String meetTime; | 44 | private String meetTime; |
45 | /**会议开始时间*/ | 45 | /**会议开始时间*/ |
46 | @Excel(name = "会议开始时间", width = 15) | 46 | @Excel(name = "开始时间", width = 15,orderNum = "4") |
47 | @ApiModelProperty(value = "会议开始时间") | 47 | @ApiModelProperty(value = "会议开始时间") |
48 | private String meetStartTime; | 48 | private String meetStartTime; |
49 | /**会议结束时间*/ | 49 | /**会议结束时间*/ |
50 | @Excel(name = "会议结束时间", width = 15) | 50 | @Excel(name = "结束时间", width = 15 ,orderNum = "5") |
51 | @ApiModelProperty(value = "会议结束时间") | 51 | @ApiModelProperty(value = "会议结束时间") |
52 | private String meetEndTime; | 52 | private String meetEndTime; |
53 | /**主持人*/ | 53 | /**主持人*/ |
54 | @Excel(name = "主持人", width = 15) | 54 | @Excel(name = "主持人", width = 15,orderNum = "8") |
55 | @ApiModelProperty(value = "主持人") | 55 | @ApiModelProperty(value = "主持人") |
56 | @Dict(dicCode = "id", dicText = "realname", dictTable = "sys_user") | 56 | @Dict(dicCode = "id", dicText = "realname", dictTable = "sys_user") |
57 | private String meetCompere; | 57 | private String meetCompere; |
58 | /**会议主题*/ | 58 | /**会议主题*/ |
59 | @Excel(name = "会议主题", width = 15) | 59 | @Excel(name = "任务主题", width = 15 ,orderNum = "2") |
60 | @ApiModelProperty(value = "会议主题") | 60 | @ApiModelProperty(value = "会议主题") |
61 | private String meetTitle; | 61 | private String meetTitle; |
62 | /**会议地点*/ | 62 | /**会议地点*/ |
63 | @Excel(name = "会议地点", width = 15) | 63 | @Excel(name = "任务地点", width = 15,orderNum = "6") |
64 | @ApiModelProperty(value = "会议地点") | 64 | @ApiModelProperty(value = "会议地点") |
65 | private String meetLocation; | 65 | private String meetLocation; |
66 | /**会议内容*/ | 66 | /**会议内容*/ |
67 | @Excel(name = "会议内容", width = 15) | 67 | @Excel(name = "会议内容", width = 15,orderNum = "11") |
68 | @ApiModelProperty(value = "会议内容") | 68 | @ApiModelProperty(value = "会议内容") |
69 | private String meetContent; | 69 | private String meetContent; |
70 | /**回执二维码*/ | 70 | /**回执二维码*/ |
71 | @Excel(name = "回执二维码", width = 15) | 71 | //@Excel(name = "回执二维码", width = 15) |
72 | @ApiModelProperty(value = "回执二维码") | 72 | @ApiModelProperty(value = "回执二维码") |
73 | private String meetHzQrcode; | 73 | private String meetHzQrcode; |
74 | /**签到二维码*/ | 74 | /**签到二维码*/ |
75 | @Excel(name = "签到二维码", width = 15) | 75 | //@Excel(name = "签到二维码", width = 15) |
76 | @ApiModelProperty(value = "签到二维码") | 76 | @ApiModelProperty(value = "签到二维码") |
77 | private String meetQdQrcode; | 77 | private String meetQdQrcode; |
78 | /**纪要模版*/ | 78 | /**纪要模版*/ |
79 | @Excel(name = "纪要模版", width = 15) | 79 | //@Excel(name = "纪要模版", width = 15) |
80 | @ApiModelProperty(value = "纪要模版") | 80 | @ApiModelProperty(value = "纪要模版") |
81 | private String minutesTemplate; | 81 | private String minutesTemplate; |
82 | /**参会人类型*/ | 82 | /**参会人类型*/ |
83 | @Excel(name = "参会人类型", width = 15) | 83 | //@Excel(name = "参会人类型", width = 15) |
84 | @ApiModelProperty(value = "参会人类型") | 84 | @ApiModelProperty(value = "参会人类型") |
85 | @Dict(dicCode = "meetting_user_type") | 85 | @Dict(dicCode = "meetting_user_type") |
86 | private String meetingType; | 86 | private String meetingType; |
87 | /**参与人*/ | 87 | /**参与人*/ |
88 | @Excel(name = "参与人", width = 15) | 88 | //@Excel(name = "参与人", width = 15) |
89 | @ApiModelProperty(value = "参与人") | 89 | @ApiModelProperty(value = "参与人") |
90 | private String userIds; | 90 | private String userIds; |
91 | /**接受状态(0拒绝,1接受,2暂定)*/ | 91 | /**接受状态(0拒绝,1接受,2暂定)*/ |
92 | @Excel(name = "接受状态(0拒绝,1接受,2暂定)", width = 15) | 92 | //@Excel(name = "接受状态(0拒绝,1接受,2暂定)", width = 15) |
93 | @ApiModelProperty(value = "接受状态(0拒绝,1接受,2暂定)") | 93 | @ApiModelProperty(value = "接受状态(0拒绝,1接受,2暂定)") |
94 | @Dict(dicCode = "accept_flag") | 94 | @Dict(dicCode = "accept_flag") |
95 | private String acceptFlag; | 95 | private String acceptFlag; |
96 | /**发布状态(0未发布,1已发布,2已撤销)*/ | 96 | /**发布状态(0未发布,1已发布,2已撤销)*/ |
97 | @Excel(name = "发布状态(0未发布,1已发布,2已撤销)", width = 15) | 97 | @Excel(name = "发布状态(0未发布,1已发布,2已撤销)", width = 15 ,dicCode = "meet_status" ,orderNum = "10") |
98 | @ApiModelProperty(value = "发布状态(0未发布,1已发布,2已撤销)") | 98 | @ApiModelProperty(value = "发布状态(0未发布,1已发布,2已撤销)") |
99 | @Dict(dicCode = "meet_status") | 99 | @Dict(dicCode = "meet_status") |
100 | private String sendStatus; | 100 | private String sendStatus; |
101 | /**接受时间*/ | 101 | /**接受时间*/ |
102 | @Excel(name = "接受时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | 102 | //@Excel(name = "接受时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
103 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | 103 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
104 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 104 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
105 | @ApiModelProperty(value = "接受时间") | 105 | @ApiModelProperty(value = "接受时间") |
106 | private Date acceptTime; | 106 | private Date acceptTime; |
107 | /**会议状态*/ | 107 | /**会议状态*/ |
108 | @Excel(name = "会议状态", width = 15) | 108 | @Excel(name = "任务状态", width = 15 ,dicCode = "meetting_status",orderNum = "9") |
109 | @ApiModelProperty(value = "会议状态") | 109 | @ApiModelProperty(value = "会议状态") |
110 | @Dict(dicCode = "meetting_status") | 110 | @Dict(dicCode = "meetting_status") |
111 | private Integer meetStatus; | 111 | private Integer meetStatus; |
... | @@ -131,10 +131,12 @@ public class AjhMeetingSend { | ... | @@ -131,10 +131,12 @@ public class AjhMeetingSend { |
131 | @ApiModelProperty(value = "机构名称") | 131 | @ApiModelProperty(value = "机构名称") |
132 | private java.lang.String departName; | 132 | private java.lang.String departName; |
133 | /**邀请人数*/ | 133 | /**邀请人数*/ |
134 | @Excel(name = "邀请人数", width = 15,orderNum = "7") | ||
134 | @TableField(exist = false) | 135 | @TableField(exist = false) |
135 | @ApiModelProperty(value = "邀请人数") | 136 | @ApiModelProperty(value = "邀请人数") |
136 | private java.lang.String inviteNum; | 137 | private java.lang.String inviteNum; |
137 | /**参与人数*/ | 138 | /**参与人数*/ |
139 | @Excel(name = "参与人数", width = 15,orderNum = "8") | ||
138 | @TableField(exist = false) | 140 | @TableField(exist = false) |
139 | @ApiModelProperty(value = "参与人数") | 141 | @ApiModelProperty(value = "参与人数") |
140 | private java.lang.String particNum; | 142 | private java.lang.String particNum; | ... | ... |
... | @@ -43,6 +43,7 @@ | ... | @@ -43,6 +43,7 @@ |
43 | <if test="ajhMeeting.meetCategory !=null and ajhMeeting.meetCategory!=''"> | 43 | <if test="ajhMeeting.meetCategory !=null and ajhMeeting.meetCategory!=''"> |
44 | AND m.meet_category = #{ajhMeeting.meetCategory} | 44 | AND m.meet_category = #{ajhMeeting.meetCategory} |
45 | </if> | 45 | </if> |
46 | order by m.create_time desc | ||
46 | </select> | 47 | </select> |
47 | 48 | ||
48 | <select id="getDataById" resultType="com.skua.modules.ajh.vo.AjhMeetingVO"> | 49 | <select id="getDataById" resultType="com.skua.modules.ajh.vo.AjhMeetingVO"> | ... | ... |
... | @@ -127,8 +127,6 @@ public class Paper { | ... | @@ -127,8 +127,6 @@ public class Paper { |
127 | @ApiModelProperty(value = "delFlag") | 127 | @ApiModelProperty(value = "delFlag") |
128 | private Integer delFlag; | 128 | private Integer delFlag; |
129 | 129 | ||
130 | |||
131 | @TableField(exist=false) | ||
132 | @ApiModelProperty(value = "考试人次") | 130 | @ApiModelProperty(value = "考试人次") |
133 | private Integer userCount ; | 131 | private Integer userCount ; |
134 | 132 | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | 4 | ||
5 | <!-- 我的考试列表 --> | 5 | <!-- 我的考试列表 --> |
6 | <select id="queryMyPaperByList" resultType="com.skua.modules.edu.entity.Paper"> | 6 | <select id="queryMyPaperByList" resultType="com.skua.modules.edu.entity.Paper"> |
7 | select d.depart_name ,p.*,( select count(1) from edu_user_paper up where up.paper_id = p.id ) 'user_count' | 7 | select d.depart_name ,p.* |
8 | from edu_paper p | 8 | from edu_paper p |
9 | left join sys_depart d on p.depart_id = d.id | 9 | left join sys_depart d on p.depart_id = d.id |
10 | where | 10 | where | ... | ... |
... | @@ -34,6 +34,8 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements | ... | @@ -34,6 +34,8 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements |
34 | private QuestionMapper questionMapper ; | 34 | private QuestionMapper questionMapper ; |
35 | 35 | ||
36 | @Resource | 36 | @Resource |
37 | private PaperMapper paperMapper; | ||
38 | @Resource | ||
37 | private UserPaperMapper userPaperMapper; | 39 | private UserPaperMapper userPaperMapper; |
38 | @Resource | 40 | @Resource |
39 | private UserAnswerMapper userAnswerMapper; | 41 | private UserAnswerMapper userAnswerMapper; |
... | @@ -183,6 +185,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements | ... | @@ -183,6 +185,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements |
183 | * 交卷 | 185 | * 交卷 |
184 | * @param paperVO | 186 | * @param paperVO |
185 | */ | 187 | */ |
188 | @Transactional | ||
186 | public String submitPaper(UserPaperVO paperVO){ | 189 | public String submitPaper(UserPaperVO paperVO){ |
187 | 190 | ||
188 | //创建用户答题记录 | 191 | //创建用户答题记录 |
... | @@ -207,6 +210,11 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements | ... | @@ -207,6 +210,11 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements |
207 | userPaper.setScore(totalScore ) ; | 210 | userPaper.setScore(totalScore ) ; |
208 | userPaperMapper.updateById( userPaper); | 211 | userPaperMapper.updateById( userPaper); |
209 | 212 | ||
213 | // 修改开始人次 | ||
214 | Paper paper = paperMapper.selectById( paperVO.getPaperId() ) ; | ||
215 | |||
216 | paper.setUserCount( paper.getUserCount() + 1 ) ; | ||
217 | paperMapper.updateById( paper ) ; | ||
210 | //计算分数 | 218 | //计算分数 |
211 | // answer.setScore( totalScore ); | 219 | // answer.setScore( totalScore ); |
212 | // answerMapper.updateById( answer ) ; | 220 | // answerMapper.updateById( answer ) ; | ... | ... |
... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
41 | purchase_price,distribut_price,sum(purchase_total_price) 'purchase_total_price',sum(distribut_total_price) 'distribut_total_price',sum(total_price_tax) 'total_price_tax' | 41 | purchase_price,distribut_price,sum(purchase_total_price) 'purchase_total_price',sum(distribut_total_price) 'distribut_total_price',sum(total_price_tax) 'total_price_tax' |
42 | from erp_material_in | 42 | from erp_material_in |
43 | <where> | 43 | <where> |
44 | mi.audit_status =3 | 44 | audit_status =3 |
45 | <if test="materialIN.startTime != null and materialIN.startTime !=''"> | 45 | <if test="materialIN.startTime != null and materialIN.startTime !=''"> |
46 | and arrive_time >= #{materialIN.startTime} | 46 | and arrive_time >= #{materialIN.startTime} |
47 | </if> | 47 | </if> | ... | ... |
... | @@ -60,18 +60,18 @@ | ... | @@ -60,18 +60,18 @@ |
60 | 60 | ||
61 | <!-- 药剂入库查询结果:物料清单--> | 61 | <!-- 药剂入库查询结果:物料清单--> |
62 | <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO"> | 62 | <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO"> |
63 | select dm.distribut_price ,dm.distribut_total_price ,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', | 63 | select dm.distribut_price ,dm.distribut_total_price , st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', |
64 | aaa.* from ( | 64 | aaa.* |
65 | select pm.* ,pc.depart_id | 65 | from ( |
66 | select pm.* ,pc.depart_id,pc.contract_code 'purchase_contract_code',pc.project_name | ||
66 | from erp_purchase_material pm , erp_purchase_contract pc | 67 | from erp_purchase_material pm , erp_purchase_contract pc |
67 | where pm.contract_id =pc.id | 68 | where pm.contract_id =pc.id and pc.id = #{param.purchaseContractId} |
68 | <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pc.departs like concat('%', #{param.departId}, '%')</if> | 69 | <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pc.departs like '%' #{param.departId}'%'</if> |
69 | <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pm.sparepart_code =#{param.sparepartCode}</if> | 70 | <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pm.sparepart_code =#{param.sparepartCode}</if> |
70 | <if test="param.sparepartType != null and param.sparepartType !=''"> and pm.sparepart_type in (${param.sparepartType}) </if> | 71 | <if test="param.sparepartType != null and param.sparepartType !=''"> and pm.sparepart_type in (${param.sparepartType}) </if> |
71 | <if test="param.sparepartName != null and param.sparepartName !=''"> and pm.sparepart_name like concat('%', #{param.sparepartName}, '%')</if> | 72 | <if test="param.sparepartName != null and param.sparepartName !=''"> and pm.sparepart_name like '%' #{param.sparepartName}'%'</if> |
72 | )aaa | 73 | )aaa |
73 | left join erp_distribut_material dm on (aaa.good_code = dm.good_code and aaa.depart_id) | 74 | left join erp_distribut_material dm on (aaa.good_code = dm.good_code and aaa.depart_id) |
74 | left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id | ||
75 | left join equipment_sparepart_type st on st.id = aaa.sparepart_type | 75 | left join equipment_sparepart_type st on st.id = aaa.sparepart_type |
76 | left join ajh_supplier_manage sm on sm.id = aaa.supplier_id | 76 | left join ajh_supplier_manage sm on sm.id = aaa.supplier_id |
77 | 77 | ... | ... |
... | @@ -12,6 +12,10 @@ import lombok.experimental.Accessors; | ... | @@ -12,6 +12,10 @@ import lombok.experimental.Accessors; |
12 | @Accessors(chain = true) | 12 | @Accessors(chain = true) |
13 | @ApiModel(value="Material物料查询对象", description="Material物料查询对象") | 13 | @ApiModel(value="Material物料查询对象", description="Material物料查询对象") |
14 | public class MaterialSearchVO { | 14 | public class MaterialSearchVO { |
15 | |||
16 | @ApiModelProperty(value = "采购合同编号") | ||
17 | private String purchaseContractId; | ||
18 | |||
15 | @ApiModelProperty(value = "物料编号") | 19 | @ApiModelProperty(value = "物料编号") |
16 | private String sparepartCode; | 20 | private String sparepartCode; |
17 | 21 | ... | ... |
... | @@ -95,4 +95,17 @@ public class PurchaseMaterialVO { | ... | @@ -95,4 +95,17 @@ public class PurchaseMaterialVO { |
95 | @ApiModelProperty(value = "厂站名称") | 95 | @ApiModelProperty(value = "厂站名称") |
96 | private String departName; | 96 | private String departName; |
97 | 97 | ||
98 | @ApiModelProperty(value = "转换属性:单价") | ||
99 | private String purchasePrice; | ||
100 | |||
101 | |||
102 | @ApiModelProperty(value = "转换属性:采购总价") | ||
103 | private String purchaseTotalPrice; | ||
104 | |||
105 | public String getPurchasePrice() { | ||
106 | return this.unitPrice; | ||
107 | } | ||
108 | public String getPurchaseTotalPrice() { | ||
109 | return this.totalPrice; | ||
110 | } | ||
98 | } | 111 | } | ... | ... |
1 | package com.skua.modules.equipment.controller; | ||
2 | |||
3 | |||
4 | import javax.servlet.http.HttpServletRequest; | ||
5 | import com.skua.core.api.vo.Result; | ||
6 | import com.skua.core.aspect.annotation.AutoLog; | ||
7 | import com.skua.modules.equipment.entity.EquipmentBindSparepart; | ||
8 | import com.skua.modules.equipment.entity.EquipmentSparepart; | ||
9 | import com.skua.modules.equipment.service.IEquipmentBindSparepartService; | ||
10 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
11 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
12 | import lombok.extern.slf4j.Slf4j; | ||
13 | import org.springframework.beans.factory.annotation.Autowired; | ||
14 | import org.springframework.web.bind.annotation.*;; | ||
15 | import io.swagger.annotations.Api; | ||
16 | import io.swagger.annotations.ApiOperation; | ||
17 | |||
18 | /** | ||
19 | * <pre> | ||
20 | * 设备关联备品备件 | ||
21 | * </pre> | ||
22 | * @author 开发者姓名 | ||
23 | * @version V0.1, 开发时间 | ||
24 | */ | ||
25 | @Slf4j | ||
26 | @Api(tags="设备关联备品备件") | ||
27 | @RestController("webEquipmentBindSparepartController") | ||
28 | @RequestMapping("/web/equipment/equipmentBindSparepart") | ||
29 | public class EquipmentBindSparepartController { | ||
30 | @Autowired | ||
31 | private IEquipmentBindSparepartService equipmentBindSparepartService; | ||
32 | |||
33 | @AutoLog(value = "设备关联备品备件-分页列表查询") | ||
34 | @ApiOperation(value="设备关联备品备件-分页列表查询", notes="设备关联备品备件-分页列表查询") | ||
35 | @GetMapping(value = "/list") | ||
36 | public Result<IPage<EquipmentSparepart>> queryPageList( | ||
37 | @RequestParam(name="equipmentId", defaultValue="1") String equipmentId, | ||
38 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
39 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
40 | HttpServletRequest req) { | ||
41 | Result<IPage<EquipmentSparepart>> result = new Result<IPage<EquipmentSparepart>>(); | ||
42 | |||
43 | Page<EquipmentSparepart> page = new Page<EquipmentSparepart>(pageNo, pageSize); | ||
44 | IPage<EquipmentSparepart> pageList = equipmentBindSparepartService.querySparepartListByEquipmentId(page,equipmentId); | ||
45 | result.setSuccess(true); | ||
46 | result.setResult(pageList); | ||
47 | return result; | ||
48 | } | ||
49 | |||
50 | |||
51 | @AutoLog(value = "设备关联备品备件-添加修改") | ||
52 | @ApiOperation(value="设备关联备品备件-添加修改", notes="设备关联备品备件-添加修改") | ||
53 | @PostMapping(value = "/saveOrUpdate") | ||
54 | public Result<EquipmentBindSparepart> saveOrUpdate(@RequestBody EquipmentBindSparepart equipmentBindSparepart) { | ||
55 | Result<EquipmentBindSparepart> result = new Result<EquipmentBindSparepart>(); | ||
56 | try { | ||
57 | equipmentBindSparepartService.updateEquipmentBindSparepart(equipmentBindSparepart); | ||
58 | result.success("添加成功!"); | ||
59 | } catch (Exception e) { | ||
60 | log.error(e.getMessage(),e); | ||
61 | result.error500("操作失败"); | ||
62 | } | ||
63 | return result; | ||
64 | } | ||
65 | |||
66 | } |
... | @@ -441,6 +441,10 @@ public class EquipmentController { | ... | @@ -441,6 +441,10 @@ public class EquipmentController { |
441 | String isSpecial = equipmentDTO.getEquipmentInfo().getIsSpecial(); | 441 | String isSpecial = equipmentDTO.getEquipmentInfo().getIsSpecial(); |
442 | String departId = equipmentDTO.getEquipmentInfo().getDepartId(); | 442 | String departId = equipmentDTO.getEquipmentInfo().getDepartId(); |
443 | 443 | ||
444 | String energyLevel = equipmentDTO.getEquipmentInfo().getEnergyLevel();//能耗等级 | ||
445 | //Integer isSpecial = equipmentDTO.getEquipmentInfo().getIsSpecial(); | ||
446 | String isMeterage = equipmentDTO.getEquipmentInfo().getIsMeterage();//是否计量设备 | ||
447 | |||
444 | List<String> equipmentLevelList = null; | 448 | List<String> equipmentLevelList = null; |
445 | Base base = BaseFactory.JOIN().select(EquipmentAsset.class).select(EquipmentInfo.class).select(EquipmentBrand.class).select(EquipmentCategory.class) | 449 | Base base = BaseFactory.JOIN().select(EquipmentAsset.class).select(EquipmentInfo.class).select(EquipmentBrand.class).select(EquipmentCategory.class) |
446 | .select(" (SELECT MAX(real_start_time) FROM equipment_maintain_task WHERE equipment_id = equipment_info.id and results_enforcement='4') as equipmentExt_maintainLastTime ") | 450 | .select(" (SELECT MAX(real_start_time) FROM equipment_maintain_task WHERE equipment_id = equipment_info.id and results_enforcement='4') as equipmentExt_maintainLastTime ") |
... | @@ -456,13 +460,16 @@ public class EquipmentController { | ... | @@ -456,13 +460,16 @@ public class EquipmentController { |
456 | .eq(StringUtils.isNotEmpty(installWay), "install_way", installWay) | 460 | .eq(StringUtils.isNotEmpty(installWay), "install_way", installWay) |
457 | .eq(StringUtils.isNotEmpty(equipmentId), "equipment_info.id", equipmentId) | 461 | .eq(StringUtils.isNotEmpty(equipmentId), "equipment_info.id", equipmentId) |
458 | .eq(StringUtils.isNotEmpty(equipmentLevel), "equipment_level", equipmentLevel) | 462 | .eq(StringUtils.isNotEmpty(equipmentLevel), "equipment_level", equipmentLevel) |
459 | .eq(StringUtils.isNotEmpty(isSpecial), "is_special", isSpecial) | 463 | .eq(StringUtils.isNotEmpty(isSpecial), "is_special", isSpecial)//特种设备 |
464 | .eq(StringUtils.isNotEmpty(isMeterage), "is_meterage", isMeterage) //计量设备 | ||
465 | .eq(StringUtils.isNotEmpty(energyLevel), "energy_level", energyLevel) // 能耗等级 | ||
460 | .eq(StringUtils.isNotEmpty(departId), "depart_id", departId) | 466 | .eq(StringUtils.isNotEmpty(departId), "depart_id", departId) |
461 | .eq(StringUtils.isNotEmpty(structures), "structures", structures) | 467 | .eq(StringUtils.isNotEmpty(structures), "structures", structures) |
462 | .like(StringUtils.isNotEmpty(equipmentName), "equipment_name", equipmentName) | 468 | .like(StringUtils.isNotEmpty(equipmentName), "equipment_name", equipmentName) |
463 | .like(StringUtils.isNotEmpty(equipmentCode), "equipment_code", equipmentCode) | 469 | .like(StringUtils.isNotEmpty(equipmentCode), "equipment_code", equipmentCode) |
464 | .eq(StringUtils.isNotEmpty(equipmentStatus), "equipment_status", equipmentStatus) | 470 | .eq(StringUtils.isNotEmpty(equipmentStatus), "equipment_status", equipmentStatus) |
465 | .like(StringUtils.isNotEmpty(installPosition), EquipmentInfo::getInstallPosition, installPosition) | 471 | .like(StringUtils.isNotEmpty(installPosition), EquipmentInfo::getInstallPosition, installPosition) |
472 | |||
466 | .eq(StringUtils.isNotEmpty(equipmentDTO.getEquipmentInfo().getId()), "equipment_info.id", equipmentDTO.getEquipmentInfo().getId()); | 473 | .eq(StringUtils.isNotEmpty(equipmentDTO.getEquipmentInfo().getId()), "equipment_info.id", equipmentDTO.getEquipmentInfo().getId()); |
467 | 474 | ||
468 | Page<Map<String, Object>> mapPage = (Page<Map<String, Object>>) base.queryForPage(new Page<>(equipmentDTO.getPageNo(), equipmentDTO.getPageSize())); | 475 | Page<Map<String, Object>> mapPage = (Page<Map<String, Object>>) base.queryForPage(new Page<>(equipmentDTO.getPageNo(), equipmentDTO.getPageSize())); | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/entity/EquipmentBindSparepart.java
0 → 100644
1 | package com.skua.modules.equipment.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 io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.springframework.format.annotation.DateTimeFormat; | ||
16 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
17 | |||
18 | /** | ||
19 | * 设备关联备品备件 | ||
20 | */ | ||
21 | @Data | ||
22 | @TableName("equipment_info_bind_sparepart") | ||
23 | @EqualsAndHashCode(callSuper = false) | ||
24 | @Accessors(chain = true) | ||
25 | @ApiModel(value="equipment_info_bind_sparepart对象", description="设备关联备品备件") | ||
26 | public class EquipmentBindSparepart { | ||
27 | |||
28 | /**id*/ | ||
29 | @TableId(type = IdType.ID_WORKER_STR) | ||
30 | @ApiModelProperty(value = "id") | ||
31 | private String id; | ||
32 | /**货主组织*/ | ||
33 | @Excel(name = "货主组织", width = 15) | ||
34 | @ApiModelProperty(value = "货主组织") | ||
35 | private String departId; | ||
36 | /**备品备件id*/ | ||
37 | @Excel(name = "备品备件id", width = 15) | ||
38 | @ApiModelProperty(value = "备品备件id") | ||
39 | private String equipmentId; | ||
40 | /**物料编号*/ | ||
41 | @Excel(name = "物料编号", width = 15) | ||
42 | @ApiModelProperty(value = "备品备件编号") | ||
43 | private String sparepartId; | ||
44 | |||
45 | @TableField(exist=false) | ||
46 | @ApiModelProperty(value = "备品备件编号集合") | ||
47 | private String sparepartIdList; | ||
48 | } |
... | @@ -157,6 +157,13 @@ public class EquipmentInfo { | ... | @@ -157,6 +157,13 @@ public class EquipmentInfo { |
157 | @ApiModelProperty(value = "是否为特种设备") | 157 | @ApiModelProperty(value = "是否为特种设备") |
158 | @Dict(dicCode = "yn") | 158 | @Dict(dicCode = "yn") |
159 | private String isSpecial; | 159 | private String isSpecial; |
160 | |||
161 | /** | ||
162 | * 是否为特种设备 | ||
163 | */ | ||
164 | @ApiModelProperty(value = "是否为计量设备") | ||
165 | @Dict(dicCode = "yn") | ||
166 | private String isMeterage; | ||
160 | /** | 167 | /** |
161 | * 创建人id | 168 | * 创建人id |
162 | */ | 169 | */ | ... | ... |
1 | package com.skua.modules.equipment.mapper; | ||
2 | |||
3 | |||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
6 | import com.skua.modules.equipment.entity.EquipmentSparepart; | ||
7 | import org.apache.ibatis.annotations.Param; | ||
8 | import com.skua.modules.equipment.entity.EquipmentBindSparepart; | ||
9 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
10 | |||
11 | /** | ||
12 | * 设备关联备品备件 | ||
13 | */ | ||
14 | public interface EquipmentBindSparepartMapper extends BaseMapper<EquipmentBindSparepart> { | ||
15 | |||
16 | /** | ||
17 | * 删除 | ||
18 | * @param equipmentId | ||
19 | */ | ||
20 | public void delByEquipmentId(@Param("equipmentId") String equipmentId); | ||
21 | |||
22 | /*** | ||
23 | * 根据设备台账编号,查询关联的备品备件 | ||
24 | * @param equipmentId | ||
25 | * @return | ||
26 | */ | ||
27 | public IPage<EquipmentSparepart> querySparepartListByEquipmentId(Page<EquipmentSparepart> page, @Param("equipmentId") String equipmentId); | ||
28 | |||
29 | } |
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.equipment.mapper.EquipmentBindSparepartMapper"> | ||
4 | |||
5 | <delete id="delByEquipmentId"> | ||
6 | delete from equipment_info_bind_sparepart where equipment_id =#{equipmentId} | ||
7 | </delete> | ||
8 | |||
9 | <!-- 根据设备台账编号,查询备件库 --> | ||
10 | <select id="querySparepartListByEquipmentId" resultType="com.skua.modules.equipment.entity.EquipmentSparepart"> | ||
11 | select s.* from equipment_info_bind_sparepart t , equipment_sparepart s | ||
12 | where t.sparepart_id = s.supplies_id and t.depart_id = s.depart_id | ||
13 | and t.equipment_id = #{equipmentId} | ||
14 | order by s.create_time desc | ||
15 | </select> | ||
16 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | package com.skua.modules.equipment.service; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
5 | import com.skua.modules.equipment.entity.EquipmentBindSparepart; | ||
6 | import com.baomidou.mybatisplus.extension.service.IService; | ||
7 | import com.skua.modules.equipment.entity.EquipmentSparepart; | ||
8 | |||
9 | /** | ||
10 | * 设备关联备品备件 | ||
11 | */ | ||
12 | public interface IEquipmentBindSparepartService extends IService<EquipmentBindSparepart> { | ||
13 | |||
14 | /** | ||
15 | * 新增 | ||
16 | * @param equipmentBindSparepart | ||
17 | */ | ||
18 | void saveEquipmentBindSparepart(EquipmentBindSparepart equipmentBindSparepart); | ||
19 | /** | ||
20 | * 修改 | ||
21 | * @param equipmentBindSparepart | ||
22 | */ | ||
23 | void updateEquipmentBindSparepart(EquipmentBindSparepart equipmentBindSparepart); | ||
24 | /*** | ||
25 | * 根据设备台账编号,查询关联的备品备件 | ||
26 | * @param equipmentId | ||
27 | * @return | ||
28 | */ | ||
29 | IPage<EquipmentSparepart> querySparepartListByEquipmentId(Page<EquipmentSparepart> page, String equipmentId); | ||
30 | } |
1 | package com.skua.modules.equipment.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
5 | import com.skua.modules.equipment.entity.EquipmentBindSparepart; | ||
6 | import com.skua.modules.equipment.entity.EquipmentSparepart; | ||
7 | import com.skua.modules.equipment.mapper.EquipmentBindSparepartMapper; | ||
8 | import com.skua.modules.equipment.service.IEquipmentBindSparepartService; | ||
9 | import org.apache.commons.lang3.StringUtils; | ||
10 | import org.springframework.stereotype.Service; | ||
11 | |||
12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
13 | import org.springframework.transaction.annotation.Transactional; | ||
14 | |||
15 | /** | ||
16 | * 设备关联备品备件 | ||
17 | */ | ||
18 | @Service | ||
19 | public class EquipmentBindSparepartServiceImpl extends ServiceImpl<EquipmentBindSparepartMapper, EquipmentBindSparepart> implements IEquipmentBindSparepartService { | ||
20 | |||
21 | /*** | ||
22 | * 新增绑定 | ||
23 | * @param equipmentBindSparepart | ||
24 | */ | ||
25 | @Transactional | ||
26 | public void saveEquipmentBindSparepart(EquipmentBindSparepart equipmentBindSparepart){ | ||
27 | if(StringUtils.isNotEmpty( equipmentBindSparepart.getSparepartId() ) ){ | ||
28 | this.baseMapper.insert( equipmentBindSparepart); | ||
29 | } | ||
30 | if(StringUtils.isNotEmpty( equipmentBindSparepart.getSparepartIdList() ) ){ | ||
31 | String[] sparepartIdList = equipmentBindSparepart.getSparepartIdList().split(","); | ||
32 | for(String sparepartId : sparepartIdList){ | ||
33 | if(StringUtils.isNotEmpty(sparepartId)){ | ||
34 | equipmentBindSparepart.setId(null); | ||
35 | equipmentBindSparepart.setSparepartId(sparepartId); | ||
36 | this.baseMapper.insert(equipmentBindSparepart ) ; | ||
37 | } | ||
38 | } | ||
39 | } | ||
40 | } | ||
41 | |||
42 | /*** | ||
43 | * 修改 | ||
44 | * @param equipmentBindSparepart | ||
45 | */ | ||
46 | @Transactional | ||
47 | public void updateEquipmentBindSparepart(EquipmentBindSparepart equipmentBindSparepart){ | ||
48 | //根据设备编号删除关联备品备件 | ||
49 | this.baseMapper.delByEquipmentId( equipmentBindSparepart.getEquipmentId() ); | ||
50 | this.saveEquipmentBindSparepart(equipmentBindSparepart); | ||
51 | } | ||
52 | |||
53 | /*** | ||
54 | * 根据设备台账编号,查询关联的备品备件 | ||
55 | * @param equipmentId | ||
56 | * @return | ||
57 | */ | ||
58 | public IPage<EquipmentSparepart> querySparepartListByEquipmentId(Page<EquipmentSparepart> page,String equipmentId){ | ||
59 | return this.baseMapper.querySparepartListByEquipmentId(page,equipmentId); | ||
60 | } | ||
61 | } |
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/EquipmentBindSparepartVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
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 io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.springframework.format.annotation.DateTimeFormat; | ||
16 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
17 | |||
18 | /** | ||
19 | * 设备关联备品备件 | ||
20 | */ | ||
21 | @Data | ||
22 | @ApiModel(value="equipment_info_bind_sparepart数据传输对象", description="设备关联备品备件") | ||
23 | public class EquipmentBindSparepartVO { | ||
24 | |||
25 | /**id*/ | ||
26 | @ApiModelProperty(value = "id") | ||
27 | private String id; | ||
28 | /**货主组织*/ | ||
29 | @Excel(name = "货主组织", width = 15) | ||
30 | @ApiModelProperty(value = "货主组织") | ||
31 | private String departId; | ||
32 | /**备品备件id*/ | ||
33 | @Excel(name = "备品备件id", width = 15) | ||
34 | @ApiModelProperty(value = "备品备件id") | ||
35 | private String equipmentId; | ||
36 | /**物料编号*/ | ||
37 | @Excel(name = "物料编号", width = 15) | ||
38 | @ApiModelProperty(value = "物料编号") | ||
39 | private String sparepartId; | ||
40 | } |
-
请 注册 或 登录 后发表评论