kangwei: 工作进度统计:1、自营水厂和恩菲水厂分开展示,可以用tab切换
物料信息增加一个库存详情:点击【库存详情】,弹框显示这些库存具体都是哪个水厂、哪个仓库的库存清单
正在显示
13 个修改的文件
包含
259 行增加
和
26 行删除
... | @@ -146,17 +146,7 @@ public class MaterialAcceptanceFormController { | ... | @@ -146,17 +146,7 @@ public class MaterialAcceptanceFormController { |
146 | if(StringUtils.isNotEmpty(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotEmpty(materialAcceptanceForm.getReceiverSign()) ){ | 146 | if(StringUtils.isNotEmpty(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotEmpty(materialAcceptanceForm.getReceiverSign()) ){ |
147 | materialAcceptanceForm.setConfirmStatus("9"); | 147 | materialAcceptanceForm.setConfirmStatus("9"); |
148 | } | 148 | } |
149 | MaterialAcceptanceForm materialAcceptanceFormEntity = materialAcceptanceFormService.getById(materialAcceptanceForm.getId()); | 149 | materialAcceptanceFormService.saveOrUpdateMaterialAcceptanceForm(materialAcceptanceForm); |
150 | if(materialAcceptanceFormEntity==null) { | ||
151 | //result.error500("未找到对应实体"); | ||
152 | materialAcceptanceFormService.save(materialAcceptanceForm); | ||
153 | }else { | ||
154 | materialAcceptanceFormService.updateById(materialAcceptanceForm); | ||
155 | } | ||
156 | MaterialIN materialIN =materialINService.getById(materialAcceptanceForm.getId()); | ||
157 | materialIN.setConfirmStatus(materialAcceptanceForm.getConfirmStatus()); | ||
158 | materialINService.updateById( materialIN); | ||
159 | |||
160 | //TODO 返回false说明什么? | 150 | //TODO 返回false说明什么? |
161 | result.success("修改成功!"); | 151 | result.success("修改成功!"); |
162 | return result; | 152 | return result; | ... | ... |
... | @@ -18,4 +18,11 @@ public interface MaterialAcceptanceFormMapper extends BaseMapper<MaterialAccepta | ... | @@ -18,4 +18,11 @@ public interface MaterialAcceptanceFormMapper extends BaseMapper<MaterialAccepta |
18 | * @return | 18 | * @return |
19 | */ | 19 | */ |
20 | public List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN); | 20 | public List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN); |
21 | |||
22 | /*** | ||
23 | * 修改药剂入库的确认状态 | ||
24 | * @param materialInId | ||
25 | * @param confirmStatus | ||
26 | */ | ||
27 | void updateMaterialINConfirmStatus(@Param("materialInId") String materialInId, @Param("confirmStatus")String confirmStatus); | ||
21 | } | 28 | } | ... | ... |
... | @@ -26,4 +26,9 @@ | ... | @@ -26,4 +26,9 @@ |
26 | </where> | 26 | </where> |
27 | order by maf.create_time asc | 27 | order by maf.create_time asc |
28 | </select> | 28 | </select> |
29 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
29 | |||
30 | <!-- 修改药剂入库的确认状态 --> | ||
31 | <update id="updateMaterialINConfirmStatus" > | ||
32 | update erp_material_in set confirm_status = #{confirmStatus} where id=#{materialInId} | ||
33 | </update> | ||
34 | </mapper> | ... | ... |
... | @@ -18,4 +18,6 @@ public interface IMaterialAcceptanceFormService extends IService<MaterialAccepta | ... | @@ -18,4 +18,6 @@ public interface IMaterialAcceptanceFormService extends IService<MaterialAccepta |
18 | * @return | 18 | * @return |
19 | */ | 19 | */ |
20 | List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN); | 20 | List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN); |
21 | |||
22 | void saveOrUpdateMaterialAcceptanceForm(MaterialAcceptanceForm materialAcceptanceForm); | ||
21 | } | 23 | } | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialAcceptanceFormServiceImpl.java
... | @@ -7,6 +7,7 @@ import com.skua.modules.erp.service.IMaterialAcceptanceFormService; | ... | @@ -7,6 +7,7 @@ import com.skua.modules.erp.service.IMaterialAcceptanceFormService; |
7 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
8 | 8 | ||
9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
10 | import org.springframework.transaction.annotation.Transactional; | ||
10 | 11 | ||
11 | import java.util.List; | 12 | import java.util.List; |
12 | 13 | ||
... | @@ -24,4 +25,19 @@ public class MaterialAcceptanceFormServiceImpl extends ServiceImpl<MaterialAccep | ... | @@ -24,4 +25,19 @@ public class MaterialAcceptanceFormServiceImpl extends ServiceImpl<MaterialAccep |
24 | public List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN){ | 25 | public List<MaterialAcceptanceForm> queryArrivalRecordByList(MaterialIN materialIN){ |
25 | return this.baseMapper.queryArrivalRecordByList(materialIN); | 26 | return this.baseMapper.queryArrivalRecordByList(materialIN); |
26 | } | 27 | } |
28 | |||
29 | @Transactional | ||
30 | @Override | ||
31 | public void saveOrUpdateMaterialAcceptanceForm(MaterialAcceptanceForm materialAcceptanceForm) { | ||
32 | MaterialAcceptanceForm materialAcceptanceFormEntity = baseMapper.selectById(materialAcceptanceForm.getId()); | ||
33 | if(materialAcceptanceFormEntity==null) { | ||
34 | //result.error500("未找到对应实体"); | ||
35 | baseMapper.insert(materialAcceptanceForm); | ||
36 | }else { | ||
37 | baseMapper.updateById(materialAcceptanceForm); | ||
38 | } | ||
39 | //修改药剂入库的确认状态 | ||
40 | baseMapper.updateMaterialINConfirmStatus(materialAcceptanceForm.getId(),materialAcceptanceForm.getConfirmStatus()); | ||
41 | |||
42 | } | ||
27 | } | 43 | } | ... | ... |
... | @@ -31,15 +31,21 @@ import java.util.List; | ... | @@ -31,15 +31,21 @@ import java.util.List; |
31 | public class WorkAnalysisController { | 31 | public class WorkAnalysisController { |
32 | 32 | ||
33 | 33 | ||
34 | @ApiOperation(value = "工作进度列表", notes = "工作进度列表 timeType = 1 表示月份,timeType=2 表示年") | 34 | @ApiOperation(value = "工作进度列表", notes = "工作进度列表 departType = 1 自营水厂 departType=2 表示恩菲水厂 timeType = 1 表示月份,timeType=2 表示年") |
35 | @GetMapping("/analysisByWorkProgress") | 35 | @GetMapping("/analysisByWorkProgress") |
36 | public Result<List<WorkProgressVO>> analysisByWorkProgress(@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { | 36 | public Result<List<WorkProgressVO>> analysisByWorkProgress(@RequestParam(defaultValue = "1") Integer departType,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { |
37 | Result<List<WorkProgressVO>> result = new Result<>(); | 37 | Result<List<WorkProgressVO>> result = new Result<>(); |
38 | String month = DateUtils.formatDate(startTime,"YYYY-MM"); | 38 | String month = DateUtils.formatDate(startTime,"YYYY-MM"); |
39 | if(2 == timeType){//表示年 | 39 | if(2 == timeType){//表示年 |
40 | month = DateUtils.formatDate(startTime,"YYYY"); | 40 | month = DateUtils.formatDate(startTime,"YYYY"); |
41 | } | 41 | } |
42 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) | 42 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) |
43 | if(departType == 1){//自营水厂 | ||
44 | departIds = getSelfDepartIds(); | ||
45 | } | ||
46 | if(departType == 2){//恩菲水厂 | ||
47 | departIds = getEFDepartIds(); | ||
48 | } | ||
43 | String sql = "select d.id 'depart_id' , d.depart_name , (DATEDIFF('"+endTime+"', '"+startTime+"') +1) 'day_num' , (month('"+endTime+"') - month('"+startTime+"') + 1) month_num,ifnull(aaa.count,0) 'nh_num' ,ifnull(bbb.count,0) 'szsl_num' ,ifnull(ccc.count,0) 'hy_num' ,ifnull(ddd.count,0) 'yy_month_num',ifnull(fff.count,0) 'df_month_num' ,ifnull(ggg.count,0) 'year_target_num' from sys_depart d "; | 49 | String sql = "select d.id 'depart_id' , d.depart_name , (DATEDIFF('"+endTime+"', '"+startTime+"') +1) 'day_num' , (month('"+endTime+"') - month('"+startTime+"') + 1) month_num,ifnull(aaa.count,0) 'nh_num' ,ifnull(bbb.count,0) 'szsl_num' ,ifnull(ccc.count,0) 'hy_num' ,ifnull(ddd.count,0) 'yy_month_num',ifnull(fff.count,0) 'df_month_num' ,ifnull(ggg.count,0) 'year_target_num' from sys_depart d "; |
44 | sql += getWorkProgressSql(departIds, startTime, endTime, month); | 50 | sql += getWorkProgressSql(departIds, startTime, endTime, month); |
45 | sql += " where d.depart_type =1 "; | 51 | sql += " where d.depart_type =1 "; |
... | @@ -48,7 +54,7 @@ public class WorkAnalysisController { | ... | @@ -48,7 +54,7 @@ public class WorkAnalysisController { |
48 | } | 54 | } |
49 | sql += " order by (ifnull(aaa.count,0) + ifnull(bbb.count,0)+ifnull(ccc.count,0) +ifnull(ddd.count,0)+ifnull(fff.count,0) +ifnull(ggg.count,0) ) asc "; | 55 | sql += " order by (ifnull(aaa.count,0) + ifnull(bbb.count,0)+ifnull(ccc.count,0) +ifnull(ddd.count,0)+ifnull(fff.count,0) +ifnull(ggg.count,0) ) asc "; |
50 | 56 | ||
51 | System.out.println("sql = "+sql); | 57 | // System.out.println("sql = "+sql); |
52 | JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); | 58 | JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); |
53 | List<WorkProgressVO> dataList = jdbcTemplate.query(sql,new BeanPropertyRowMapper<WorkProgressVO>(WorkProgressVO.class)); | 59 | List<WorkProgressVO> dataList = jdbcTemplate.query(sql,new BeanPropertyRowMapper<WorkProgressVO>(WorkProgressVO.class)); |
54 | result.setResult(dataList); | 60 | result.setResult(dataList); |
... | @@ -58,7 +64,7 @@ public class WorkAnalysisController { | ... | @@ -58,7 +64,7 @@ public class WorkAnalysisController { |
58 | 64 | ||
59 | @ApiOperation(value = "工作进度统计-数量统计", notes = "工作进度-数量统计 timeType = 1 表示月份,timeType=2 表示年") | 65 | @ApiOperation(value = "工作进度统计-数量统计", notes = "工作进度-数量统计 timeType = 1 表示月份,timeType=2 表示年") |
60 | @GetMapping("/analysisTotalByWorkProgress") | 66 | @GetMapping("/analysisTotalByWorkProgress") |
61 | public Result<WorkProgressVO> analysisTotalByWorkProgress(@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { | 67 | public Result<WorkProgressVO> analysisTotalByWorkProgress(@RequestParam(defaultValue = "1") Integer departType,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { |
62 | Result<WorkProgressVO> result = new Result<>(); | 68 | Result<WorkProgressVO> result = new Result<>(); |
63 | WorkProgressVO workProgressVO = null; | 69 | WorkProgressVO workProgressVO = null; |
64 | String month = DateUtils.formatDate(startTime,"YYYY-MM"); | 70 | String month = DateUtils.formatDate(startTime,"YYYY-MM"); |
... | @@ -66,6 +72,12 @@ public class WorkAnalysisController { | ... | @@ -66,6 +72,12 @@ public class WorkAnalysisController { |
66 | month = DateUtils.formatDate(startTime,"YYYY"); | 72 | month = DateUtils.formatDate(startTime,"YYYY"); |
67 | } | 73 | } |
68 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) | 74 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) |
75 | if(departType == 1){//自营水厂 | ||
76 | departIds = getSelfDepartIds(); | ||
77 | } | ||
78 | if(departType == 2){//恩菲水厂 | ||
79 | departIds = getEFDepartIds(); | ||
80 | } | ||
69 | String sql = "select count(d.id) 'departNum', (DATEDIFF('"+endTime+"', '"+startTime+"') +1) 'day_num' , (month('"+endTime+"') - month('"+startTime+"') + 1) month_num,"; | 81 | String sql = "select count(d.id) 'departNum', (DATEDIFF('"+endTime+"', '"+startTime+"') +1) 'day_num' , (month('"+endTime+"') - month('"+startTime+"') + 1) month_num,"; |
70 | sql += " ifnull(sum(aaa.count),0) 'nh_num' ,ifnull(sum(bbb.count),0) 'szsl_num' ,ifnull(sum(ccc.count),0) 'hy_num' ,ifnull(sum(ddd.count),0) 'yy_month_num',ifnull(sum(fff.count),0) 'df_month_num' ,ifnull(sum(ggg.count),0) 'year_target_num' "; | 82 | sql += " ifnull(sum(aaa.count),0) 'nh_num' ,ifnull(sum(bbb.count),0) 'szsl_num' ,ifnull(sum(ccc.count),0) 'hy_num' ,ifnull(sum(ddd.count),0) 'yy_month_num',ifnull(sum(fff.count),0) 'df_month_num' ,ifnull(sum(ggg.count),0) 'year_target_num' "; |
71 | sql += " from sys_depart d "; | 83 | sql += " from sys_depart d "; |
... | @@ -88,10 +100,16 @@ public class WorkAnalysisController { | ... | @@ -88,10 +100,16 @@ public class WorkAnalysisController { |
88 | 100 | ||
89 | @ApiOperation(value = "安全管理进度-数据列表", notes = "安全管理进度-数据列表 timeType = 1 表示月份,timeType=2 表示年") | 101 | @ApiOperation(value = "安全管理进度-数据列表", notes = "安全管理进度-数据列表 timeType = 1 表示月份,timeType=2 表示年") |
90 | @GetMapping("/analysisBySafeProgress") | 102 | @GetMapping("/analysisBySafeProgress") |
91 | public Result<List<SafeProgressVO>> analysisBySafeProgress(@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { | 103 | public Result<List<SafeProgressVO>> analysisBySafeProgress(@RequestParam(defaultValue = "1") Integer departType,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { |
92 | Result<List<SafeProgressVO>> result = new Result<>(); | 104 | Result<List<SafeProgressVO>> result = new Result<>(); |
93 | JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); | 105 | JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); |
94 | String departIds = null; | 106 | String departIds = null; |
107 | if(departType == 1){//自营水厂 | ||
108 | departIds = getSelfDepartIds(); | ||
109 | } | ||
110 | if(departType == 2){//恩菲水厂 | ||
111 | departIds = getEFDepartIds(); | ||
112 | } | ||
95 | String sql = "select d.id 'depart_id' , d.depart_name , ifnull(aaa.count,0) 'meet_num', ifnull(bbb.count,0) 'meet_total', ifnull(ccc.count,0) 'exam_num', ifnull(ddd.count,0) 'exam_total',ifnull(eee.count, 0) 'frequency_num' , ifnull(fff.count , 0) 'frequency_total'"; | 113 | String sql = "select d.id 'depart_id' , d.depart_name , ifnull(aaa.count,0) 'meet_num', ifnull(bbb.count,0) 'meet_total', ifnull(ccc.count,0) 'exam_num', ifnull(ddd.count,0) 'exam_total',ifnull(eee.count, 0) 'frequency_num' , ifnull(fff.count , 0) 'frequency_total'"; |
96 | sql += " from sys_depart d "; | 114 | sql += " from sys_depart d "; |
97 | sql += getSafeProgressSql(departIds, startTime,endTime); | 115 | sql += getSafeProgressSql(departIds, startTime,endTime); |
... | @@ -108,9 +126,15 @@ public class WorkAnalysisController { | ... | @@ -108,9 +126,15 @@ public class WorkAnalysisController { |
108 | } | 126 | } |
109 | @ApiOperation(value = "安全管理进度统计-数量统计", notes = "安全管理进度-数量统计 timeType = 1 表示月份,timeType=2 表示年") | 127 | @ApiOperation(value = "安全管理进度统计-数量统计", notes = "安全管理进度-数量统计 timeType = 1 表示月份,timeType=2 表示年") |
110 | @GetMapping("/analysisTotalBySafeProgress") | 128 | @GetMapping("/analysisTotalBySafeProgress") |
111 | public Result<SafeProgressVO> analysisTotalBySafeProgress(@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { | 129 | public Result<SafeProgressVO> analysisTotalBySafeProgress(@RequestParam(defaultValue = "1") Integer departType,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { |
112 | Result<SafeProgressVO> result = new Result<>(); | 130 | Result<SafeProgressVO> result = new Result<>(); |
113 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) | 131 | String departIds = null;//DAY(LAST_DAY('"+startTime+"')) |
132 | if(departType == 1){//自营水厂 | ||
133 | departIds = getSelfDepartIds(); | ||
134 | } | ||
135 | if(departType == 2){//恩菲水厂 | ||
136 | departIds = getEFDepartIds(); | ||
137 | } | ||
114 | String sql = "select count(d.id) 'departNum', ifnull(sum(aaa.count),0) 'meet_num' ,ifnull(sum(bbb.count),0) 'meet_total' ,ifnull(sum(ccc.count),0) 'exam_num' ,ifnull(sum(ddd.count),0) 'exam_total',ifnull(sum(eee.count),0) 'frequency_num' ,ifnull(sum(fff.count),0) 'frequency_total' "; | 138 | String sql = "select count(d.id) 'departNum', ifnull(sum(aaa.count),0) 'meet_num' ,ifnull(sum(bbb.count),0) 'meet_total' ,ifnull(sum(ccc.count),0) 'exam_num' ,ifnull(sum(ddd.count),0) 'exam_total',ifnull(sum(eee.count),0) 'frequency_num' ,ifnull(sum(fff.count),0) 'frequency_total' "; |
115 | sql += " from sys_depart d "; | 139 | sql += " from sys_depart d "; |
116 | sql += getSafeProgressSql(departIds, startTime,endTime); | 140 | sql += getSafeProgressSql(departIds, startTime,endTime); |
... | @@ -164,7 +188,7 @@ public class WorkAnalysisController { | ... | @@ -164,7 +188,7 @@ public class WorkAnalysisController { |
164 | sql += " left join (select cc.depart_id ,count(1) 'count' from "+viewbffaSql+ " cc group by cc.depart_id )ccc on ccc.depart_id = d.id "; | 188 | sql += " left join (select cc.depart_id ,count(1) 'count' from "+viewbffaSql+ " cc group by cc.depart_id )ccc on ccc.depart_id = d.id "; |
165 | 189 | ||
166 | //电费月报 | 190 | //电费月报 |
167 | sql += " left join( select ec.depart_id , ec.cost , count(1) 'count' from report_electric_cost ec where ec.month like '"+month+"%' group by ec.depart_id) ddd on ddd.depart_id = d.id "; | 191 | sql += " left join( select ec.depart_id , ec.cost , count(1) 'count' from report_electric_cost ec where ec.month like '"+month+"%' and ec.cost > '0' group by ec.depart_id ) ddd on ddd.depart_id = d.id "; |
168 | 192 | ||
169 | //生产运营月报表 | 193 | //生产运营月报表 |
170 | String view4411Sql = ReportViewUtil.buildView(ReportConstant.view4411,"yyf,ysfsl",departIds,startTime,endTime); | 194 | String view4411Sql = ReportViewUtil.buildView(ReportConstant.view4411,"yyf,ysfsl",departIds,startTime,endTime); |
... | @@ -176,4 +200,18 @@ public class WorkAnalysisController { | ... | @@ -176,4 +200,18 @@ public class WorkAnalysisController { |
176 | return sql; | 200 | return sql; |
177 | } | 201 | } |
178 | 202 | ||
203 | |||
204 | private String getSelfDepartIds(){ | ||
205 | String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id <> '1818215543140909056'"; | ||
206 | return getJdbcTemplate().queryForObject(sql,String.class); | ||
207 | } | ||
208 | private String getEFDepartIds(){//获取恩菲水厂编号 | ||
209 | String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id = '1818215543140909056'"; | ||
210 | return getJdbcTemplate().queryForObject(sql,String.class); | ||
211 | } | ||
212 | |||
213 | private JdbcTemplate getJdbcTemplate(){ | ||
214 | JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); | ||
215 | return jdbcTemplate; | ||
216 | } | ||
179 | } | 217 | } | ... | ... |
... | @@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; | ... | @@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; |
13 | 13 | ||
14 | import com.skua.core.context.BaseContextHandler; | 14 | import com.skua.core.context.BaseContextHandler; |
15 | import com.skua.core.util.ConvertUtils; | 15 | import com.skua.core.util.ConvertUtils; |
16 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; | ||
16 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 17 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
17 | import com.skua.tool.dfs.MapDFS; | 18 | import com.skua.tool.dfs.MapDFS; |
18 | import com.skua.tool.util.JSUtils; | 19 | import com.skua.tool.util.JSUtils; |
... | @@ -207,7 +208,35 @@ public class EquipmentSparepartController { | ... | @@ -207,7 +208,35 @@ public class EquipmentSparepartController { |
207 | result.setResult(mapPage); | 208 | result.setResult(mapPage); |
208 | return result; | 209 | return result; |
209 | } | 210 | } |
211 | @AutoLog(value = "备品备件表-入库详情") | ||
212 | @ApiOperation(value = "备品备件表-入库详情", notes = "备品备件表-入库详情") | ||
213 | @GetMapping(value = "/inOrderDetail") | ||
214 | public Result<IPage<EquipmentInOutDetailVO>> inOrderDetail(String sparepartId,String sparepartCode, | ||
215 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
216 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { | ||
217 | Result<IPage<EquipmentInOutDetailVO>> result = new Result<>(); | ||
218 | Page<EquipmentInOutDetailVO> page = new Page<EquipmentInOutDetailVO>(pageNo, pageSize); | ||
219 | IPage<EquipmentInOutDetailVO> pageList = equipmentSparepartService.inOrderDetail(page,sparepartId,sparepartCode); | ||
210 | 220 | ||
221 | result.setSuccess(true); | ||
222 | result.setResult(pageList); | ||
223 | return result; | ||
224 | } | ||
225 | @AutoLog(value = "备品备件表-出库详情") | ||
226 | @ApiOperation(value = "备品备件表-出库详情", notes = "备品备件表-出库详情") | ||
227 | @GetMapping(value = "/outOrderDetail") | ||
228 | public Result<IPage<EquipmentInOutDetailVO>> outOrderDetail(String sparepartId, String sparepartCode, | ||
229 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
230 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { | ||
231 | |||
232 | Result<IPage<EquipmentInOutDetailVO>> result = new Result<>(); | ||
233 | Page<EquipmentInOutDetailVO> page = new Page<EquipmentInOutDetailVO>(pageNo, pageSize); | ||
234 | IPage<EquipmentInOutDetailVO> pageList = equipmentSparepartService.outOrderDetail(page,sparepartId,sparepartCode); | ||
235 | |||
236 | result.setSuccess(true); | ||
237 | result.setResult(pageList); | ||
238 | return result; | ||
239 | } | ||
211 | /** | 240 | /** |
212 | * 分页列表查询 | 241 | * 分页列表查询 |
213 | * | 242 | * | ... | ... |
... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
6 | import com.skua.modules.equipment.dto.EquipmentSparepartDTO; | 6 | import com.skua.modules.equipment.dto.EquipmentSparepartDTO; |
7 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 7 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
8 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; | ||
8 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 9 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
9 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 10 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
10 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 11 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
... | @@ -27,4 +28,20 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> | ... | @@ -27,4 +28,20 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> |
27 | * @return | 28 | * @return |
28 | */ | 29 | */ |
29 | IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO); | 30 | IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO); |
31 | |||
32 | /*** | ||
33 | * 备品备件表-入库详情 | ||
34 | * @param page | ||
35 | * @param sparepartId | ||
36 | * @return | ||
37 | */ | ||
38 | IPage<EquipmentInOutDetailVO> inOrderDetail(@Param("page")Page<EquipmentInOutDetailVO> page, @Param("sparepartId") String sparepartId,@Param("sparepartCode") String sparepartCode); | ||
39 | |||
40 | /** | ||
41 | * 备品备件表-出库详情 | ||
42 | * @param page | ||
43 | * @param sparepartId | ||
44 | * @return | ||
45 | */ | ||
46 | IPage<EquipmentInOutDetailVO> outOrderDetail(@Param("page")Page<EquipmentInOutDetailVO> page, @Param("sparepartId") String sparepartId,@Param("sparepartCode") String sparepartCode); | ||
30 | } | 47 | } | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentSparepartMapper.xml
... | @@ -12,11 +12,12 @@ | ... | @@ -12,11 +12,12 @@ |
12 | left join sys_depart d on sw.depart_id = d.id | 12 | left join sys_depart d on sw.depart_id = d.id |
13 | where es.supplies_warehouse_id = sw.id and sw.depart_id in (${param.departIds}) | 13 | where es.supplies_warehouse_id = sw.id and sw.depart_id in (${param.departIds}) |
14 | <if test="param.suppliesWarehouseId != null and param.suppliesWarehouseId !=''"> and es.supplies_warehouse_id =#{param.suppliesWarehouseId}</if> | 14 | <if test="param.suppliesWarehouseId != null and param.suppliesWarehouseId !=''"> and es.supplies_warehouse_id =#{param.suppliesWarehouseId}</if> |
15 | <if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code like '%${param.sparepartCode}%'</if> | 15 | <if test="param.sparepartId != null and param.sparepartId !=''"> and es.supplies_id =#{param.sparepartId}</if> |
16 | <if test="param.sparepartType != null and param.sparepartType !=''">and es.sparepart_type in (${param.sparepartType}) </if> | 16 | <if test="param.sparepartCode != null and param.sparepartCode !=''"> and es.sparepart_code like '%${param.sparepartCode}%'</if> |
17 | <if test="param.sparepartName != null and param.sparepartName !=''">and es.sparepart_name like '%${param.sparepartName}%'</if> | 17 | <if test="param.sparepartType != null and param.sparepartType !=''"> and es.sparepart_type in (${param.sparepartType}) </if> |
18 | <if test="param.specification != null and param.specification !=''">and es.specification like '%${param.specification}%'</if> | 18 | <if test="param.sparepartName != null and param.sparepartName !=''"> and es.sparepart_name like '%${param.sparepartName}%'</if> |
19 | <if test="param.sparepartAttribute != null and param.sparepartAttribute !=''">and es.sparepart_attribute like '%${param.sparepartAttribute}%'</if> | 19 | <if test="param.specification != null and param.specification !=''"> and es.specification like '%${param.specification}%'</if> |
20 | <if test="param.sparepartAttribute != null and param.sparepartAttribute !=''"> and es.sparepart_attribute like '%${param.sparepartAttribute}%'</if> | ||
20 | order by sw.depart_id asc , es.inventory_update_time desc | 21 | order by sw.depart_id asc , es.inventory_update_time desc |
21 | </select> | 22 | </select> |
22 | 23 | ||
... | @@ -29,4 +30,24 @@ | ... | @@ -29,4 +30,24 @@ |
29 | <if test="param.specification != null and param.specification !=''">and es.specification like '%${param.specification}%'</if> | 30 | <if test="param.specification != null and param.specification !=''">and es.specification like '%${param.specification}%'</if> |
30 | order by es.inventory_update_time desc | 31 | order by es.inventory_update_time desc |
31 | </select> | 32 | </select> |
33 | <!-- 分页查询:物料的入库详情 --> | ||
34 | <select id="inOrderDetail" resultType="com.skua.modules.equipment.vo.EquipmentInOutDetailVO"> | ||
35 | select eic.sparepart_id,es.sparepart_name,es.sparepart_code,es.depart_id ,'入库' as direction , eic.in_num 'inOutNum' ,es.storage_num , ei.use_by as useBy ,ei.in_order as inOutOrder | ||
36 | from equipment_sparepart_supplies es | ||
37 | left join equipment_in_child eic on eic.sparepart_id = es.id | ||
38 | left join equipment_in ei on ei.id= eic.in_id | ||
39 | where 1=1 | ||
40 | <if test="sparepartId != null and sparepartId !=''">and eic.sparepart_id = #{sparepartId}</if> | ||
41 | <if test="sparepartCode != null and sparepartCode !=''">and es.sparepart_code = #{sparepartCode}</if> | ||
42 | </select> | ||
43 | <!-- 分页查询:物料的入库详情 --> | ||
44 | <select id="outOrderDetail" resultType="com.skua.modules.equipment.vo.EquipmentInOutDetailVO"> | ||
45 | select eoc.sparepart_id,es.sparepart_name,es.sparepart_code,es.depart_id ,'出库' as direction , eoc.out_num 'inOutNum' ,es.storage_num , eo.use_by as useBy ,eo.out_order as inOutOrder | ||
46 | from equipment_sparepart_supplies es | ||
47 | left join equipment_out_child eoc on eoc.sparepart_id = es.id | ||
48 | left join equipment_out eo on eo.id= eoc.out_id | ||
49 | where 1=1 | ||
50 | <if test="sparepartId != null and sparepartId !=''">and eic.sparepart_id = #{sparepartId}</if> | ||
51 | <if test="sparepartCode != null and sparepartCode !=''">and es.sparepart_code = #{sparepartCode}</if> | ||
52 | </select> | ||
32 | </mapper> | 53 | </mapper> | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IEquipmentSparepartService.java
... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
5 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | import com.skua.modules.equipment.dto.EquipmentSparepartDTO; | 6 | import com.skua.modules.equipment.dto.EquipmentSparepartDTO; |
7 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 7 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
8 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; | ||
8 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 9 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
9 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 10 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
10 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 11 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
... | @@ -25,4 +26,20 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> | ... | @@ -25,4 +26,20 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> |
25 | * @return | 26 | * @return |
26 | */ | 27 | */ |
27 | IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO); | 28 | IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO); |
29 | |||
30 | /*** | ||
31 | * 备品备件表-入库详情 | ||
32 | * @param page | ||
33 | * @param sparepartId | ||
34 | * @return | ||
35 | */ | ||
36 | IPage<EquipmentInOutDetailVO> inOrderDetail(Page<EquipmentInOutDetailVO> page, String sparepartId, String sparepartCode); | ||
37 | |||
38 | /** | ||
39 | * 备品备件表-出库详情 | ||
40 | * @param page | ||
41 | * @param sparepartId | ||
42 | * @return | ||
43 | */ | ||
44 | IPage<EquipmentInOutDetailVO> outOrderDetail(Page<EquipmentInOutDetailVO> page, String sparepartId, String sparepartCode); | ||
28 | } | 45 | } | ... | ... |
... | @@ -3,13 +3,12 @@ package com.skua.modules.equipment.service.impl; | ... | @@ -3,13 +3,12 @@ package com.skua.modules.equipment.service.impl; |
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; |
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
6 | import com.skua.modules.equipment.dto.EquipmentSparepartDTO; | ||
7 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 6 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
8 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; | 7 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; |
9 | import com.skua.modules.equipment.service.IEquipmentSparepartService; | 8 | import com.skua.modules.equipment.service.IEquipmentSparepartService; |
9 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; | ||
10 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 10 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
11 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 11 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
12 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | ||
13 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
14 | 13 | ||
15 | /** | 14 | /** |
... | @@ -41,4 +40,23 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar | ... | @@ -41,4 +40,23 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar |
41 | public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){ | 40 | public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){ |
42 | return baseMapper.queryPageRelationList(page,sparepartSearchVO); | 41 | return baseMapper.queryPageRelationList(page,sparepartSearchVO); |
43 | } | 42 | } |
43 | /*** | ||
44 | * 备品备件表-入库详情 | ||
45 | * @param page | ||
46 | * @param sparepartId | ||
47 | * @return | ||
48 | */ | ||
49 | public IPage<EquipmentInOutDetailVO> inOrderDetail(Page<EquipmentInOutDetailVO> page, String sparepartId, String sparepartCode){ | ||
50 | return baseMapper.inOrderDetail(page,sparepartId,sparepartCode); | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * 备品备件表-出库详情 | ||
55 | * @param page | ||
56 | * @param sparepartId | ||
57 | * @return | ||
58 | */ | ||
59 | public IPage<EquipmentInOutDetailVO> outOrderDetail(Page<EquipmentInOutDetailVO> page, String sparepartId, String sparepartCode){ | ||
60 | return baseMapper.outOrderDetail(page,sparepartId,sparepartCode); | ||
61 | } | ||
44 | } | 62 | } | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/EquipmentInOutDetailVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.TableName; | ||
4 | import com.skua.core.aspect.annotation.Dict; | ||
5 | import com.skua.tool.annotation.BeanAnno; | ||
6 | import com.skua.tool.annotation.JoinSqlQueryAnno; | ||
7 | import com.skua.tool.enums.JoinSqlQueryEnum; | ||
8 | import io.swagger.annotations.ApiModel; | ||
9 | import io.swagger.annotations.ApiModelProperty; | ||
10 | import lombok.Data; | ||
11 | import lombok.EqualsAndHashCode; | ||
12 | import lombok.experimental.Accessors; | ||
13 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
14 | |||
15 | import java.math.BigDecimal; | ||
16 | |||
17 | /** | ||
18 | * @auther kangwei | ||
19 | * @create 2025-02-17-11:00 | ||
20 | */ | ||
21 | @Data | ||
22 | @ApiModel(value = "物料出入库详情", description = "物料出入库详情") | ||
23 | public class EquipmentInOutDetailVO { | ||
24 | /** | ||
25 | * 所属厂站 | ||
26 | */ | ||
27 | @Excel(name = "所属厂站", width = 15) | ||
28 | @ApiModelProperty(value = "所属厂站") | ||
29 | @Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name") | ||
30 | private String departId; | ||
31 | |||
32 | @ApiModelProperty(value = "出入库说明") | ||
33 | private String direction; | ||
34 | |||
35 | @ApiModelProperty(value = "备件编号") | ||
36 | private String sparepartId; | ||
37 | /** | ||
38 | * 备件编号 | ||
39 | */ | ||
40 | @ApiModelProperty(value = "备件编号") | ||
41 | private String sparepartCode; | ||
42 | /** | ||
43 | * 备件名称 | ||
44 | */ | ||
45 | @ApiModelProperty(value = "备件名称") | ||
46 | private String sparepartName; | ||
47 | /** | ||
48 | * 备件类型 | ||
49 | */ | ||
50 | @ApiModelProperty(value = "备件类型") | ||
51 | @Dict(dictTable = "equipment_sparepart_Type",dicCode = "id",dicText = "item_text") | ||
52 | @JoinSqlQueryAnno(joinSqlQueryEnum = JoinSqlQueryEnum.EQ) | ||
53 | private String sparepartType; | ||
54 | |||
55 | @ApiModelProperty(value = "当前库存") | ||
56 | private BigDecimal storageNum; | ||
57 | |||
58 | |||
59 | @ApiModelProperty(value = "出/入库单号") | ||
60 | private String inOutOrder; | ||
61 | |||
62 | @ApiModelProperty(value = "出/入库数量") | ||
63 | private BigDecimal inOutNum; | ||
64 | |||
65 | @ApiModelProperty(value = "经办人") | ||
66 | @Dict(dicCode = "id", dictTable = "sys_user", dicText = "realname") | ||
67 | private String useBy; | ||
68 | |||
69 | } |
... | @@ -25,9 +25,13 @@ public class EquipmentSparepartSearchVO { | ... | @@ -25,9 +25,13 @@ public class EquipmentSparepartSearchVO { |
25 | @ApiModelProperty(value = "物料名称") | 25 | @ApiModelProperty(value = "物料名称") |
26 | private String sparepartName; | 26 | private String sparepartName; |
27 | 27 | ||
28 | @ApiModelProperty(value = "物料编号") | ||
29 | private String sparepartId; | ||
30 | |||
28 | @ApiModelProperty(value = "物料Code") | 31 | @ApiModelProperty(value = "物料Code") |
29 | public String sparepartCode; | 32 | public String sparepartCode; |
30 | 33 | ||
34 | |||
31 | @ApiModelProperty(value = "权限下的部门编号集合") | 35 | @ApiModelProperty(value = "权限下的部门编号集合") |
32 | private String departIds; | 36 | private String departIds; |
33 | 37 | ... | ... |
-
请 注册 或 登录 后发表评论