add: 手持添加木箱库存功能
This commit is contained in:
@@ -75,4 +75,11 @@ public class ProductOutTwoController {
|
||||
return new ResponseEntity<>(productOutTwoService.outPointPass(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/woodenBoxPoint")
|
||||
@Log("avg取货点放行")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> woodenBoxPoint(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(productOutTwoService.woodenBoxPoint(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package org.nl.b_lms.pda.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description 服务接口
|
||||
@@ -74,4 +76,12 @@ public interface ProductOutTwoService {
|
||||
* @return JSONObject: 返回前端参数
|
||||
*/
|
||||
JSONObject outPointPass(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 根据子卷号查询可用木箱
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> woodenBoxPoint(JSONObject whereJson);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,12 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pda.service.ProductOutTwoService;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||
@@ -39,6 +43,10 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
||||
@Resource
|
||||
private BstIvtBoxinfoMapper bstIvtBoxinfoMapper;
|
||||
|
||||
@Autowired
|
||||
private IPdmBiOrderbominfoService iPdmBiOrderbominfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject ivtQuery(JSONObject whereJson) {
|
||||
return new ProductionOutServiceImpl().ivtQueryTwo(whereJson);
|
||||
@@ -100,7 +108,7 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
||||
// 删除木箱绑定关系
|
||||
iBstIvtBoxlashboundService.remove(
|
||||
new QueryWrapper<BstIvtBoxlashbound>().lambda()
|
||||
.eq(BstIvtBoxlashbound::getBound_id, boundDaoList.get(0).getBound_id())
|
||||
.eq(BstIvtBoxlashbound::getBound_id, boundDaoList.get(0).getBound_id())
|
||||
);
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
@@ -167,4 +175,19 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
||||
result.put("message", "成功放行!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> woodenBoxPoint(JSONObject whereJson) {
|
||||
JSONObject jsonPlan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan")
|
||||
.query("container_name = '" + whereJson.getString("container_name") + "' and is_delete = '0'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonPlan)) {
|
||||
PdmBiOrderbominfo pdmBiOrderbominfo = iPdmBiOrderbominfoService.getOne(Wrappers.lambdaQuery(PdmBiOrderbominfo.class)
|
||||
.eq(PdmBiOrderbominfo::getMfgOrder, jsonPlan.getString("mfg_order_name")));
|
||||
if (ObjectUtil.isNotEmpty(pdmBiOrderbominfo)) {
|
||||
return bstIvtBoxinfoMapper.selectProductByName(pdmBiOrderbominfo.getProductName());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,11 @@ public interface BstIvtBoxinfoMapper extends BaseMapper<BstIvtBoxinfo> {
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getBoxIvtPda(@Param("query") JSONObject query);
|
||||
|
||||
/**
|
||||
* 根据物料编码查询点位
|
||||
* @param productName
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> selectProductByName(String productName);
|
||||
}
|
||||
|
||||
@@ -94,4 +94,20 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="selectProductByName" resultType="com.alibaba.fastjson.JSONObject"
|
||||
parameterType="java.lang.String">
|
||||
SELECT
|
||||
box.box_no,
|
||||
box.material_code,
|
||||
box.material_name,
|
||||
attr.struct_code
|
||||
FROM
|
||||
bst_ivt_boxinfo box
|
||||
INNER JOIN st_ivt_structattr attr ON attr.storagevehicle_code = box.box_no
|
||||
WHERE
|
||||
box.is_packing = '0'
|
||||
AND attr.lock_type = '1'
|
||||
AND attr.sect_code = 'BZC01'
|
||||
AND box.material_code = #{productName}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user