fda2696d 康伟

kangwei:

设备维修任务:点击【处理】,选择备件新接口
/skboot/web/equipment/equipmentSparepart/equipmentRelationList?infoId=设备编号
1 个父辈 21f077e7
......@@ -142,7 +142,6 @@ public class PurchaseContractController {
result.success("修改成功!");
}
}
return result;
}
......
......@@ -67,7 +67,7 @@
</select>
<!-- 根据id或code校验合同编号是否唯一-->
<select id="checkContractCode" resultType="java.lang.Integer">
select count(1) from erp_purchase_contract where contract_code = #{contractCode}
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}
</select>
</mapper>
......
......@@ -242,13 +242,10 @@ public class EquipmentSparepartController {
}
}
}
//部门子集
//后续补充
Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize);
//权限部门
if(StringUtils.isNotEmpty(sparepartSearchVO.getDepartId())){
String departIds = iCommonSqlService.getChildDepartId(sparepartSearchVO.getDepartId() ) ;
String departIds = iCommonSqlService.getChildDepartId(sparepartSearchVO.getDepartId() ) ;//部门子集
sparepartSearchVO.setDepartIds(departIds ) ;
}else{
sparepartSearchVO.setDepartIds( JSUtils.quoteEach(BaseContextHandler.getDeparts() ,",")) ;//非管理员,获取权限部门集合
......@@ -322,6 +319,23 @@ public class EquipmentSparepartController {
*/
}
//equipmentRelation
@AutoLog(value = "备品备件表-分页列表查询:关联的备品备件")
@ApiOperation(value = "备品备件表-分页列表查询:关联的备品备件", notes = "备品备件表-分页列表查询:关联的备品备件")
@GetMapping(value = "/equipmentRelationList")
public Result<IPage<EquipmentSparepartVO>> queryPageRelationList(EquipmentSparepartSearchVO sparepartSearchVO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) throws Exception {
Result<IPage<EquipmentSparepartVO>> result = new Result<>();
Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize);
IPage<EquipmentSparepartVO> pageList = equipmentSparepartService.queryPageRelationList(page,sparepartSearchVO);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
/**
* 添加
......
......@@ -224,6 +224,7 @@ public class EquipmentSparepart {
*/
@Excel(name = "仓库id", width = 15)
@ApiModelProperty(value = "仓库id")
@Dict(dictTable = "supplies_warehouse",dicCode = "id",dicText = "warehouse_name")
private String suppliesWarehouseId;
/**
......@@ -231,6 +232,7 @@ public class EquipmentSparepart {
*/
@Excel(name = "所属厂站", width = 15)
@ApiModelProperty(value = "所属厂站")
@Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name")
private String departId;
/** 物料属性 */
......
......@@ -19,4 +19,12 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart>
//分页检索
IPage<EquipmentSparepartVO> queryByPage(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO);
/***
* 分页查询:设备关联的备品备件集合
* @param page
* @param sparepartSearchVO
* @return
*/
IPage<EquipmentSparepartVO> queryPageRelationList(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO);
}
......
......@@ -19,7 +19,14 @@
order by es.inventory_update_time desc
</select>
<!-- </if>
suppliesWarehouseId-->
<!-- 分页查询:设备关联的备品备件集合-->
<select id="queryPageRelationList" resultType="com.skua.modules.equipment.vo.EquipmentSparepartVO" >
select es.* from equipment_relation er , equipment_sparepart es
where er.sparepart_id = es.id and er.info_id = #{param.infoId}
<if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code like '%' #{param.sparepartCode}'%'</if>
<if test="param.sparepartName != null and param.sparepartName !=''">and es.sparepart_name like '%' #{param.sparepartName}'%'</if>
<if test="param.specification != null and param.specification !=''">and es.specification like '%' #{param.specification}'%'</if>
order by es.inventory_update_time desc
</select>
</mapper>
......
......@@ -18,4 +18,11 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart>
IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
/***
* 分页查询:设备关联的备品备件
* @param page
* @param sparepartSearchVO
* @return
*/
IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
}
......
......@@ -26,10 +26,19 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar
/***
* 分页查询
* @param page
* @param equipmentSparepartDTO
* @param sparepartSearchVO
* @return
*/
public IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
return baseMapper.queryByPage(page,sparepartSearchVO);
}
/***
* 分页查询:设备关联的备品备件
* @param page
* @param sparepartSearchVO
* @return
*/
public IPage<EquipmentSparepartVO> queryPageRelationList(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
return baseMapper.queryPageRelationList(page,sparepartSearchVO);
}
}
......
......@@ -15,6 +15,10 @@ public class EquipmentSparepartSearchVO {
@ApiModelProperty(value = "厂站")
private String departId;
@ApiModelProperty(value = "设备编号")
private String infoId;
@ApiModelProperty(value = "物料类别编号")
private String sparepartType;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!