kangwei: 备品备件---入库记录、出库记录
正在显示
6 个修改的文件
包含
213 行增加
和
3 行删除
... | @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; | ... | @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; |
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.EquipmentInOutDetailVO; |
17 | import com.skua.modules.equipment.vo.EquipmentInOutRecordVO; | ||
17 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 18 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
18 | import com.skua.tool.dfs.MapDFS; | 19 | import com.skua.tool.dfs.MapDFS; |
19 | import com.skua.tool.util.JSUtils; | 20 | import com.skua.tool.util.JSUtils; |
... | @@ -208,8 +209,40 @@ public class EquipmentSparepartController { | ... | @@ -208,8 +209,40 @@ public class EquipmentSparepartController { |
208 | result.setResult(mapPage); | 209 | result.setResult(mapPage); |
209 | return result; | 210 | return result; |
210 | } | 211 | } |
211 | @AutoLog(value = "备品备件表-入库详情") | 212 | |
212 | @ApiOperation(value = "备品备件表-入库详情", notes = "备品备件表-入库详情") | 213 | @AutoLog(value = "备品备件表-入库记录列表") |
214 | @ApiOperation(value = "备品备件表-入库记录列表", notes = "备品备件表-入库记录列表") | ||
215 | @GetMapping(value = "/queryEquipmentInList") | ||
216 | public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentInList(String sparepartId, | ||
217 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
218 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { | ||
219 | Result<IPage<EquipmentInOutRecordVO>> result = new Result<>(); | ||
220 | Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize); | ||
221 | IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentInList(page,sparepartId); | ||
222 | |||
223 | result.setSuccess(true); | ||
224 | result.setResult(pageList); | ||
225 | return result; | ||
226 | } | ||
227 | |||
228 | @AutoLog(value = "备品备件表-出库记录列表") | ||
229 | @ApiOperation(value = "备品备件表-出库记录列表", notes = "备品备件表-出库记录列表") | ||
230 | @GetMapping(value = "/queryEquipmentOutList") | ||
231 | public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentOutList(String sparepartId, | ||
232 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
233 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { | ||
234 | Result<IPage<EquipmentInOutRecordVO>> result = new Result<>(); | ||
235 | Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize); | ||
236 | IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentOutList(page,sparepartId); | ||
237 | |||
238 | result.setSuccess(true); | ||
239 | result.setResult(pageList); | ||
240 | return result; | ||
241 | } | ||
242 | |||
243 | |||
244 | @AutoLog(value = "备品备件表-入库库存详情") | ||
245 | @ApiOperation(value = "备品备件表-入库库存详情", notes = "备品备件表-入库库存详情") | ||
213 | @GetMapping(value = "/inOrderDetail") | 246 | @GetMapping(value = "/inOrderDetail") |
214 | public Result<IPage<EquipmentInOutDetailVO>> inOrderDetail(String sparepartId,String sparepartCode, | 247 | public Result<IPage<EquipmentInOutDetailVO>> inOrderDetail(String sparepartId,String sparepartCode, |
215 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 248 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
... | @@ -223,7 +256,7 @@ public class EquipmentSparepartController { | ... | @@ -223,7 +256,7 @@ public class EquipmentSparepartController { |
223 | return result; | 256 | return result; |
224 | } | 257 | } |
225 | @AutoLog(value = "备品备件表-出库详情") | 258 | @AutoLog(value = "备品备件表-出库详情") |
226 | @ApiOperation(value = "备品备件表-出库详情", notes = "备品备件表-出库详情") | 259 | @ApiOperation(value = "备品备件表-出库库存详情", notes = "备品备件表-出库库存详情") |
227 | @GetMapping(value = "/outOrderDetail") | 260 | @GetMapping(value = "/outOrderDetail") |
228 | public Result<IPage<EquipmentInOutDetailVO>> outOrderDetail(String sparepartId, String sparepartCode, | 261 | public Result<IPage<EquipmentInOutDetailVO>> outOrderDetail(String sparepartId, String sparepartCode, |
229 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 262 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ... | ... |
... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -6,6 +6,7 @@ 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.EquipmentInOutDetailVO; |
9 | import com.skua.modules.equipment.vo.EquipmentInOutRecordVO; | ||
9 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 10 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
10 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 11 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
11 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 12 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
... | @@ -30,6 +31,21 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> | ... | @@ -30,6 +31,21 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> |
30 | IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO); | 31 | IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO); |
31 | 32 | ||
32 | /*** | 33 | /*** |
34 | * 备品备件表-入库记录列表 | ||
35 | * @param page | ||
36 | * @param sparepartId | ||
37 | * @return | ||
38 | */ | ||
39 | public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId); | ||
40 | |||
41 | /*** | ||
42 | * 备品备件表-出库记录列表 | ||
43 | * @param page | ||
44 | * @param sparepartId | ||
45 | * @return | ||
46 | */ | ||
47 | public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId); | ||
48 | /*** | ||
33 | * 备品备件表-入库详情 | 49 | * 备品备件表-入库详情 |
34 | * @param page | 50 | * @param page |
35 | * @param sparepartId | 51 | * @param sparepartId | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentSparepartMapper.xml
... | @@ -30,6 +30,35 @@ | ... | @@ -30,6 +30,35 @@ |
30 | <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> |
31 | order by es.inventory_update_time desc | 31 | order by es.inventory_update_time desc |
32 | </select> | 32 | </select> |
33 | |||
34 | |||
35 | <!-- 备品备件(入库单列表) --> | ||
36 | <select id="queryEquipmentInList" resultType="com.skua.modules.equipment.vo.EquipmentInOutRecordVO"> | ||
37 | select ei.depart_id,ei.in_order 'in_out_order' ,ei.in_type,ei.in_date 'inOutDate',ei.use_by,ei.choose_time,ei.supplies_warehouse_id,sw.warehouse_name, | ||
38 | mic.sparepart_id , mic.cur_storage_num 'storageNum', mic.in_num 'inOutNum' ,mic.quality,mic.batch_num, | ||
39 | ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name' | ||
40 | |||
41 | from equipment_in_child mic | ||
42 | left join equipment_in ei on ei.id = mic.in_id | ||
43 | left join supplies_warehouse sw on sw.id = ei.supplies_warehouse_id | ||
44 | left join equipment_sparepart_supplies ss on ss.id = mic.sparepart_id | ||
45 | left join equipment_sparepart_type st on st.id = ss.sparepart_type | ||
46 | where mic.sparepart_id = #{sparepartId} | ||
47 | </select> | ||
48 | |||
49 | <select id="queryEquipmentOutList" resultType="com.skua.modules.equipment.vo.EquipmentInOutRecordVO"> | ||
50 | select eo.depart_id,eo.out_order 'in_out_order' ,eo.out_date 'inOutDate' ,eo.use_by,eo.choose_time,eo.supplies_warehouse_id,sw.warehouse_name, | ||
51 | moc.sparepart_id , moc.actual_num 'storageNum',moc.out_num 'inOutNum',moc.batch_num, | ||
52 | ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name' | ||
53 | |||
54 | from equipment_out_child moc | ||
55 | left join equipment_out eo on eo.id = moc.out_id | ||
56 | left join supplies_warehouse sw on sw.id = eo.supplies_warehouse_id | ||
57 | left join equipment_sparepart_supplies ss on ss.id = moc.sparepart_id | ||
58 | left join equipment_sparepart_type st on st.id = ss.sparepart_type | ||
59 | where moc.sparepart_id = #{sparepartId} | ||
60 | </select> | ||
61 | |||
33 | <!-- 分页查询:物料的入库详情 --> | 62 | <!-- 分页查询:物料的入库详情 --> |
34 | <select id="inOrderDetail" resultType="com.skua.modules.equipment.vo.EquipmentInOutDetailVO"> | 63 | <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 | 64 | 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 | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IEquipmentSparepartService.java
... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; | ... | @@ -6,6 +6,7 @@ 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.EquipmentInOutDetailVO; |
9 | import com.skua.modules.equipment.vo.EquipmentInOutRecordVO; | ||
9 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 10 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
10 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 11 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
11 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 12 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
... | @@ -27,6 +28,23 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> | ... | @@ -27,6 +28,23 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> |
27 | */ | 28 | */ |
28 | IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO); | 29 | IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO); |
29 | 30 | ||
31 | |||
32 | /*** | ||
33 | * 备品备件表-入库记录列表 | ||
34 | * @param page | ||
35 | * @param sparepartId | ||
36 | * @return | ||
37 | */ | ||
38 | public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, String sparepartId); | ||
39 | |||
40 | /*** | ||
41 | * 备品备件表-出库记录列表 | ||
42 | * @param page | ||
43 | * @param sparepartId | ||
44 | * @return | ||
45 | */ | ||
46 | public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, String sparepartId); | ||
47 | |||
30 | /*** | 48 | /*** |
31 | * 备品备件表-入库详情 | 49 | * 备品备件表-入库详情 |
32 | * @param page | 50 | * @param page | ... | ... |
... | @@ -7,6 +7,7 @@ import com.skua.modules.equipment.entity.EquipmentSparepart; | ... | @@ -7,6 +7,7 @@ import com.skua.modules.equipment.entity.EquipmentSparepart; |
7 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; | 7 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; |
8 | import com.skua.modules.equipment.service.IEquipmentSparepartService; | 8 | import com.skua.modules.equipment.service.IEquipmentSparepartService; |
9 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; | 9 | import com.skua.modules.equipment.vo.EquipmentInOutDetailVO; |
10 | import com.skua.modules.equipment.vo.EquipmentInOutRecordVO; | ||
10 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; | 11 | import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO; |
11 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; | 12 | import com.skua.modules.equipment.vo.EquipmentSparepartVO; |
12 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
... | @@ -40,6 +41,27 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar | ... | @@ -40,6 +41,27 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar |
40 | public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){ | 41 | public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){ |
41 | return baseMapper.queryPageRelationList(page,sparepartSearchVO); | 42 | return baseMapper.queryPageRelationList(page,sparepartSearchVO); |
42 | } | 43 | } |
44 | |||
45 | /*** | ||
46 | * 备品备件表-入库记录列表 | ||
47 | * @param page | ||
48 | * @param sparepartId | ||
49 | * @return | ||
50 | */ | ||
51 | public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, String sparepartId){ | ||
52 | return baseMapper.queryEquipmentInList(page,sparepartId); | ||
53 | } | ||
54 | |||
55 | /*** | ||
56 | * 备品备件表-出库记录列表 | ||
57 | * @param page | ||
58 | * @param sparepartId | ||
59 | * @return | ||
60 | */ | ||
61 | public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, String sparepartId){ | ||
62 | return baseMapper.queryEquipmentOutList(page,sparepartId); | ||
63 | } | ||
64 | |||
43 | /*** | 65 | /*** |
44 | * 备品备件表-入库详情 | 66 | * 备品备件表-入库详情 |
45 | * @param page | 67 | * @param page | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/EquipmentInOutRecordVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import com.skua.core.aspect.annotation.Dict; | ||
4 | import com.skua.tool.annotation.BeanAnno; | ||
5 | import com.skua.tool.annotation.JoinSqlQueryAnno; | ||
6 | import com.skua.tool.enums.JoinSqlQueryEnum; | ||
7 | import io.swagger.annotations.ApiModel; | ||
8 | import io.swagger.annotations.ApiModelProperty; | ||
9 | import lombok.Data; | ||
10 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
11 | |||
12 | import java.math.BigDecimal; | ||
13 | |||
14 | /** | ||
15 | * @auther kangwei | ||
16 | * @create 2025-02-17-11:00 | ||
17 | */ | ||
18 | @Data | ||
19 | @ApiModel(value = "物料出入库记录", description = "物料出入库记录") | ||
20 | public class EquipmentInOutRecordVO { | ||
21 | /** | ||
22 | * 所属厂站 | ||
23 | */ | ||
24 | @Excel(name = "所属厂站", width = 15) | ||
25 | @ApiModelProperty(value = "所属厂站") | ||
26 | @Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name") | ||
27 | private String departId; | ||
28 | |||
29 | @ApiModelProperty(value = "出/入库单号") | ||
30 | private String inOutOrder; | ||
31 | |||
32 | |||
33 | @ApiModelProperty(value = "入库时间") | ||
34 | private String inOutDate; | ||
35 | |||
36 | @ApiModelProperty(value = "经办人") | ||
37 | @BeanAnno(targetFieldName = "useByName") | ||
38 | @Dict(dicCode = "id", dictTable = "sys_user", dicText = "realname") | ||
39 | private String useBy; | ||
40 | @ApiModelProperty(value = "经办时间") | ||
41 | private String chooseTime; | ||
42 | |||
43 | @ApiModelProperty(value = "所属仓库") | ||
44 | private String suppliesWarehouseId; | ||
45 | |||
46 | @ApiModelProperty(value = "所属仓库名称") | ||
47 | private String warehouseName; | ||
48 | |||
49 | @Excel(name = "当前库存量", width = 15) | ||
50 | @ApiModelProperty(value = "当前库存量") | ||
51 | private String storageNum; | ||
52 | |||
53 | @ApiModelProperty(value = "出/入库数量") | ||
54 | private String inOutNum; | ||
55 | /** | ||
56 | * 批次号 | ||
57 | */ | ||
58 | @Excel(name = "批次号", width = 15) | ||
59 | @ApiModelProperty(value = "批次号") | ||
60 | private String batchNum;; | ||
61 | |||
62 | @ApiModelProperty(value = "备件编号") | ||
63 | private String sparepartId; | ||
64 | |||
65 | /** | ||
66 | * 备件编号 | ||
67 | */ | ||
68 | @ApiModelProperty(value = "备件编号") | ||
69 | private String sparepartCode; | ||
70 | /** | ||
71 | * 备件名称 | ||
72 | */ | ||
73 | @ApiModelProperty(value = "备件名称") | ||
74 | private String sparepartName; | ||
75 | /** | ||
76 | * 备件类型 | ||
77 | */ | ||
78 | @ApiModelProperty(value = "备件类型") | ||
79 | private String sparepartType; | ||
80 | @ApiModelProperty(value = "备件类型名称") | ||
81 | private String sparepartTypeName; | ||
82 | |||
83 | @ApiModelProperty(value = "规格型号") | ||
84 | private String specification; | ||
85 | |||
86 | @ApiModelProperty(value = "计量单位") | ||
87 | private String measuringUnit; | ||
88 | |||
89 | |||
90 | |||
91 | |||
92 | } |
-
请 注册 或 登录 后发表评论