fix:修改hutool json映射不了问题
This commit is contained in:
@@ -48,6 +48,10 @@ public class PdaFormOutDtl {
|
||||
* 业务单据状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 出库仓库
|
||||
*/
|
||||
private String stor_code;
|
||||
/**
|
||||
* 业务单据状态
|
||||
*/
|
||||
|
||||
@@ -41,8 +41,9 @@ public class PdaIOService {
|
||||
PdaIOService ioService = SpringContextHolder.getBean(PdaIOService.class);
|
||||
//创建单据分配货位
|
||||
StIvtIostorinv ivtIostorinv = ioService.createPadIvtAndoutDispense(pdaFormOutMst);
|
||||
StIvtIostorinv byId = iStIvtIostorinvService.getById(ivtIostorinv.getId());
|
||||
//生成流程
|
||||
this.pdaTaskOpen(ivtIostorinv);
|
||||
this.pdaTaskOpen(byId);
|
||||
}
|
||||
@Transactional
|
||||
public StIvtIostorinv createPadIvtAndoutDispense(PdaFormOutMst pdaFormOutMst){
|
||||
@@ -71,25 +72,24 @@ public class PdaIOService {
|
||||
mst.setForm_data(new JSONObject(MapOf.of("shipper",null,"product_area",null)));
|
||||
List<StIvtIostorinvdtl> list = new ArrayList<>();
|
||||
for (PdaFormOutDtl dtl : dtls) {
|
||||
dtl.setNow_assign_qty(dtl.getQty());
|
||||
BigDecimal assignQty = dtl.getNow_assign_qty();
|
||||
if (assignQty==null || assignQty.intValue()==0){
|
||||
throw new BadRequestException("出库申请失败:当前"+dtl.getMaterial_name()+"明细申请数量为0");
|
||||
BigDecimal now_assign_qty = dtl.getNow_assign_qty();
|
||||
if (now_assign_qty==null || now_assign_qty.intValue()==0){
|
||||
continue;
|
||||
// throw new BadRequestException("出库申请失败:当前"+dtl.getMaterial_name()+"明细申请数量为0");
|
||||
}
|
||||
StIvtIostorinvdtl ivtDtl = new StIvtIostorinvdtl();
|
||||
ivtDtl.setSource_form_id(dtl.getId());
|
||||
ivtDtl.setSource_form_type(dtl.getForm_type());
|
||||
ivtDtl.setMaterial_id(dtl.getMaterial_id());
|
||||
BigDecimal nowAssignQty = assignQty;
|
||||
String productArea = dtl.getForm_data().getString("product_area");
|
||||
if (StringUtils.isEmpty(productArea) || !productArea.equals("A1") || !productArea.equals("A2") ||!productArea.equals("A3")){
|
||||
String productArea = dtl.getProduct_area();
|
||||
if (StringUtils.isEmpty(productArea) || !"A1A2A3".contains(productArea)){
|
||||
throw new BadRequestException("出库申请失败:明细数据车间字段未指定或不正确");
|
||||
}
|
||||
HashMap map = MapOf.of("end_struct_code", "", "start_struct_code", "", "order", "", "product_area", "");
|
||||
HashMap map = MapOf.of("end_struct_code", "", "start_struct_code", "", "order", "", "product_area", productArea);
|
||||
ivtDtl.setForm_data(new JSONObject(map));
|
||||
ivtDtl.setQty(nowAssignQty);
|
||||
ivtDtl.setQty(now_assign_qty);
|
||||
ivtDtl.setPcsn(dtl.getPcsn());
|
||||
ivtDtl.setStor_code("FStockId");//pdaFormOutMst.getStor_code()
|
||||
ivtDtl.setStor_code(dtl.getStor_code());//pdaFormOutMst.getStor_code()
|
||||
ivtDtl.setId(IdUtil.getStringId());
|
||||
ivtDtl.setInv_id(mst.getId());
|
||||
ivtDtl.setStatus(StatusEnum.FORM_STATUS.code("生成"));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.nl.wms.stor_manage.io.service.iostor_dtl.dto;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
|
||||
@@ -73,6 +73,7 @@ public class StIvtIostorinvdtlServiceImpl extends ServiceImpl<StIvtIostorinvdtlM
|
||||
}
|
||||
List<StIvtIostorinvdtl> dtl = this.list(new QueryWrapper<StIvtIostorinvdtl>().eq("inv_id", inv_id));
|
||||
for (StIvtIostorinvdtl iostorinvdtl : dtl) {
|
||||
JSONObject formData = iostorinvdtl.getForm_data();
|
||||
for (String vehicle_id : iostorinvdtl.getVehicle_id().split(",")) {
|
||||
StIvtIostorinvdtlVo vo = new StIvtIostorinvdtlVo();
|
||||
BeanUtils.copyProperties(iostorinvdtl,vo);
|
||||
|
||||
Reference in New Issue
Block a user