rev:修改
This commit is contained in:
@@ -41,6 +41,12 @@ public class BomCallMaterialController {
|
||||
return new ResponseEntity<>(TableDataInfo.build(iPdmBomCallMaterialService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/queryGroupBom")
|
||||
@Log("退料组盘查询工单分页查询")
|
||||
public ResponseEntity<Object> queryGroupBom(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(iPdmBomCallMaterialService.queryGroupBom(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增叫料单")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBomCallMaterial dto) {
|
||||
|
||||
@@ -30,6 +30,15 @@ public interface IPdmBomCallMaterialService extends IService<PdmBomCallMaterial>
|
||||
*/
|
||||
IPage<PdmBomCallMaterialDto> queryAll(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 退料组盘查询工单分页查询
|
||||
*
|
||||
* @param whereJson : {查询参数}
|
||||
* @param page : 分页对象
|
||||
* @return 返回结果
|
||||
*/
|
||||
IPage<PdmBomCallMaterialDto> queryGroupBom(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 新增叫料单
|
||||
*
|
||||
|
||||
@@ -120,4 +120,9 @@ public class PdmBomCallMaterial implements Serializable {
|
||||
*/
|
||||
private String receive_name;
|
||||
|
||||
/**
|
||||
* 是否二次退料
|
||||
*/
|
||||
private String return_two;
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,14 @@ public interface PdmBomCallMaterialMapper extends BaseMapper<PdmBomCallMaterial>
|
||||
*/
|
||||
IPage<PdmBomCallMaterialDto> queryAllByPage(Page<PdmBomCallMaterialDto> page, @Param("param") Map whereJson);
|
||||
|
||||
/**
|
||||
* 退料组盘查询工单分页查询
|
||||
* @param page 分页条件
|
||||
* @param whereJson 查询条件
|
||||
* @return IPage<PdmBomCallMaterialDto>
|
||||
*/
|
||||
IPage<PdmBomCallMaterialDto> queryGroupBom(Page<PdmBomCallMaterialDto> page, @Param("param") Map whereJson);
|
||||
|
||||
/**
|
||||
* 计算总计
|
||||
* @param whereJson {}
|
||||
|
||||
@@ -49,10 +49,38 @@
|
||||
bom.create_time <= #{param.end_time}
|
||||
</if>
|
||||
|
||||
<if test="param.return_two != null and param.return_two != '' ">
|
||||
AND
|
||||
bom.return_two = #{param.return_two}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY bom.create_time Desc
|
||||
</select>
|
||||
|
||||
<select id="queryGroupBom" resultType="org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto">
|
||||
SELECT
|
||||
bom.*,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mater.material_spec
|
||||
FROM
|
||||
pdm_bom_callmaterial bom
|
||||
INNER JOIN md_me_materialbase mater ON mater.material_id = bom.material_id
|
||||
<where>
|
||||
bom.bom_type = '1'
|
||||
AND bom.bom_status = '5'
|
||||
AND bom.start_time = #{param.to_day}
|
||||
|
||||
<if test="param.bom_code != null and param.bom_code != ''">
|
||||
AND
|
||||
bom.bom_code LIKE #{param.bom_code}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY bom.real_weigh_qty Desc
|
||||
</select>
|
||||
|
||||
<select id="queryAllSumQty" resultType="org.nl.wms.pdm_manage.service.dto.PdmBomCallMaterialDto">
|
||||
SELECT
|
||||
SUM(bom.call_qty) AS call_qty,
|
||||
@@ -99,6 +127,11 @@
|
||||
bom.create_time <= #{param.end_time}
|
||||
</if>
|
||||
|
||||
<if test="param.return_two != null and param.return_two != '' ">
|
||||
AND
|
||||
bom.return_two = #{param.return_two}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY bom.create_time Desc
|
||||
</select>
|
||||
|
||||
@@ -74,6 +74,13 @@ public class PdmBomCallMaterialServiceImpl extends ServiceImpl<PdmBomCallMateria
|
||||
return jsonObjectIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PdmBomCallMaterialDto> queryGroupBom(Map whereJson, PageQuery page) {
|
||||
whereJson.put("to_day", DateUtil.today());
|
||||
return this.baseMapper.queryGroupBom(new Page<>(page.getPage() + 1, page.getSize()),
|
||||
whereJson);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void create(PdmBomCallMaterial dto) {
|
||||
|
||||
@@ -334,6 +334,7 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
// 更新主bom
|
||||
dao.setReal_weigh_qty(NumberUtil.sub(dao.getReal_weigh_qty(), qty));
|
||||
dao.setBom_status(BomEnum.CALL_BOM_STATUS.code("退料中"));
|
||||
dao.setReturn_two(IOSConstant.ONE);
|
||||
iPdmBomCallMaterialService.updateById(dao);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1539,7 +1539,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
// 如果是领料出库单则更新工单状态以及实际出库重量
|
||||
if (ObjectUtil.isNotEmpty(ioStorInvDtl.getSource_bill_code())) {
|
||||
PdmBomCallMaterial callMaterDao = iPdmBomCallMaterialService.findByCode(ioStorInvDtl.getSource_bill_code());
|
||||
callMaterDao.setReal_qty(ioStorInvDtl.getPlan_qty());
|
||||
callMaterDao.setReal_qty(ioStorInvDtl.getAssign_qty());
|
||||
callMaterDao.setBom_status(BomEnum.CALL_BOM_STATUS.code("叫料完成"));
|
||||
iPdmBomCallMaterialService.updateById(callMaterDao);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user