fda2696d 康伟

kangwei:

设备维修任务:点击【处理】,选择备件新接口
/skboot/web/equipment/equipmentSparepart/equipmentRelationList?infoId=设备编号
1 个父辈 21f077e7
...@@ -142,7 +142,6 @@ public class PurchaseContractController { ...@@ -142,7 +142,6 @@ public class PurchaseContractController {
142 result.success("修改成功!"); 142 result.success("修改成功!");
143 } 143 }
144 } 144 }
145
146 return result; 145 return result;
147 } 146 }
148 147
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 </select> 67 </select>
68 <!-- 根据id或code校验合同编号是否唯一--> 68 <!-- 根据id或code校验合同编号是否唯一-->
69 <select id="checkContractCode" resultType="java.lang.Integer"> 69 <select id="checkContractCode" resultType="java.lang.Integer">
70 select count(1) from erp_purchase_contract where contract_code = #{contractCode} 70 select count(1) from erp_purchase_contract where use_flag =1 and start_time gt; now() and ent_time lt; now() and contract_code = #{contractCode}
71 </select> 71 </select>
72 72
73 </mapper> 73 </mapper>
......
...@@ -242,13 +242,10 @@ public class EquipmentSparepartController { ...@@ -242,13 +242,10 @@ public class EquipmentSparepartController {
242 } 242 }
243 } 243 }
244 } 244 }
245 //部门子集
246 //后续补充
247
248 Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize); 245 Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize);
249 //权限部门 246 //权限部门
250 if(StringUtils.isNotEmpty(sparepartSearchVO.getDepartId())){ 247 if(StringUtils.isNotEmpty(sparepartSearchVO.getDepartId())){
251 String departIds = iCommonSqlService.getChildDepartId(sparepartSearchVO.getDepartId() ) ; 248 String departIds = iCommonSqlService.getChildDepartId(sparepartSearchVO.getDepartId() ) ;//部门子集
252 sparepartSearchVO.setDepartIds(departIds ) ; 249 sparepartSearchVO.setDepartIds(departIds ) ;
253 }else{ 250 }else{
254 sparepartSearchVO.setDepartIds( JSUtils.quoteEach(BaseContextHandler.getDeparts() ,",")) ;//非管理员,获取权限部门集合 251 sparepartSearchVO.setDepartIds( JSUtils.quoteEach(BaseContextHandler.getDeparts() ,",")) ;//非管理员,获取权限部门集合
...@@ -322,6 +319,23 @@ public class EquipmentSparepartController { ...@@ -322,6 +319,23 @@ public class EquipmentSparepartController {
322 */ 319 */
323 320
324 } 321 }
322 //equipmentRelation
323 @AutoLog(value = "备品备件表-分页列表查询:关联的备品备件")
324 @ApiOperation(value = "备品备件表-分页列表查询:关联的备品备件", notes = "备品备件表-分页列表查询:关联的备品备件")
325 @GetMapping(value = "/equipmentRelationList")
326 public Result<IPage<EquipmentSparepartVO>> queryPageRelationList(EquipmentSparepartSearchVO sparepartSearchVO,
327 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
328 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
329 HttpServletRequest req) throws Exception {
330 Result<IPage<EquipmentSparepartVO>> result = new Result<>();
331 Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize);
332 IPage<EquipmentSparepartVO> pageList = equipmentSparepartService.queryPageRelationList(page,sparepartSearchVO);
333
334 result.setSuccess(true);
335 result.setResult(pageList);
336 return result;
337
338 }
325 339
326 /** 340 /**
327 * 添加 341 * 添加
......
...@@ -224,6 +224,7 @@ public class EquipmentSparepart { ...@@ -224,6 +224,7 @@ public class EquipmentSparepart {
224 */ 224 */
225 @Excel(name = "仓库id", width = 15) 225 @Excel(name = "仓库id", width = 15)
226 @ApiModelProperty(value = "仓库id") 226 @ApiModelProperty(value = "仓库id")
227 @Dict(dictTable = "supplies_warehouse",dicCode = "id",dicText = "warehouse_name")
227 private String suppliesWarehouseId; 228 private String suppliesWarehouseId;
228 229
229 /** 230 /**
...@@ -231,6 +232,7 @@ public class EquipmentSparepart { ...@@ -231,6 +232,7 @@ public class EquipmentSparepart {
231 */ 232 */
232 @Excel(name = "所属厂站", width = 15) 233 @Excel(name = "所属厂站", width = 15)
233 @ApiModelProperty(value = "所属厂站") 234 @ApiModelProperty(value = "所属厂站")
235 @Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name")
234 private String departId; 236 private String departId;
235 237
236 /** 物料属性 */ 238 /** 物料属性 */
......
...@@ -19,4 +19,12 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> ...@@ -19,4 +19,12 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart>
19 19
20 //分页检索 20 //分页检索
21 IPage<EquipmentSparepartVO> queryByPage(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO); 21 IPage<EquipmentSparepartVO> queryByPage(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO);
22
23 /***
24 * 分页查询:设备关联的备品备件集合
25 * @param page
26 * @param sparepartSearchVO
27 * @return
28 */
29 IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO);
22 } 30 }
......
...@@ -19,7 +19,14 @@ ...@@ -19,7 +19,14 @@
19 19
20 order by es.inventory_update_time desc 20 order by es.inventory_update_time desc
21 </select> 21 </select>
22 <!-- </if>
23 suppliesWarehouseId-->
24 22
23 <!-- 分页查询:设备关联的备品备件集合-->
24 <select id="queryPageRelationList" resultType="com.skua.modules.equipment.vo.EquipmentSparepartVO" >
25 select es.* from equipment_relation er , equipment_sparepart es
26 where er.sparepart_id = es.id and er.info_id = #{param.infoId}
27 <if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code like '%' #{param.sparepartCode}'%'</if>
28 <if test="param.sparepartName != null and param.sparepartName !=''">and es.sparepart_name like '%' #{param.sparepartName}'%'</if>
29 <if test="param.specification != null and param.specification !=''">and es.specification like '%' #{param.specification}'%'</if>
30 order by es.inventory_update_time desc
31 </select>
25 </mapper> 32 </mapper>
......
...@@ -18,4 +18,11 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> ...@@ -18,4 +18,11 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart>
18 18
19 IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO); 19 IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
20 20
21 /***
22 * 分页查询:设备关联的备品备件
23 * @param page
24 * @param sparepartSearchVO
25 * @return
26 */
27 IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
21 } 28 }
......
...@@ -26,10 +26,19 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar ...@@ -26,10 +26,19 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar
26 /*** 26 /***
27 * 分页查询 27 * 分页查询
28 * @param page 28 * @param page
29 * @param equipmentSparepartDTO 29 * @param sparepartSearchVO
30 * @return 30 * @return
31 */ 31 */
32 public IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){ 32 public IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
33 return baseMapper.queryByPage(page,sparepartSearchVO); 33 return baseMapper.queryByPage(page,sparepartSearchVO);
34 } 34 }
35 /***
36 * 分页查询:设备关联的备品备件
37 * @param page
38 * @param sparepartSearchVO
39 * @return
40 */
41 public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
42 return baseMapper.queryPageRelationList(page,sparepartSearchVO);
43 }
35 } 44 }
......
...@@ -15,6 +15,10 @@ public class EquipmentSparepartSearchVO { ...@@ -15,6 +15,10 @@ public class EquipmentSparepartSearchVO {
15 @ApiModelProperty(value = "厂站") 15 @ApiModelProperty(value = "厂站")
16 private String departId; 16 private String departId;
17 17
18
19 @ApiModelProperty(value = "设备编号")
20 private String infoId;
21
18 @ApiModelProperty(value = "物料类别编号") 22 @ApiModelProperty(value = "物料类别编号")
19 private String sparepartType; 23 private String sparepartType;
20 24
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!