Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
package org.nl.b_lms.pdm.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单BOM信息 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pdm-bi-orderbominfo")
|
||||
public class PdmBiOrderbominfoController {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package org.nl.b_lms.pdm.service.impl;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiContainerinfo;
|
||||
import org.nl.b_lms.pdm.mapper.PdmBiContainerinfoMapper;
|
||||
import org.nl.b_lms.pdm.service.IPdmBiContainerinfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷下线记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiContainerinfoServiceImpl extends ServiceImpl<PdmBiContainerinfoMapper, PdmBiContainerinfo> implements IPdmBiContainerinfoService {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package org.nl.b_lms.pdm.service.impl;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.mapper.PdmBiOrderbominfoMapper;
|
||||
import org.nl.b_lms.pdm.service.IPdmBiOrderbominfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单BOM信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiOrderbominfoServiceImpl extends ServiceImpl<PdmBiOrderbominfoMapper, PdmBiOrderbominfo> implements IPdmBiOrderbominfoService {
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.pdm.mapper.PdmBiContainerinfoMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.pdm.mapper.PdmBiOrderbominfoMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -166,6 +166,9 @@ public class PdmBiSlittingproductionplan implements Serializable {
|
||||
/** 接头数 */
|
||||
private String joint_type;
|
||||
|
||||
/** 物料类型 */
|
||||
private String material_type;
|
||||
|
||||
/** 分切重量 */
|
||||
private String paper_weight;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.nl.b_lms.pdm.controller;
|
||||
package org.nl.b_lms.pdm.info.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.nl.b_lms.pdm.info.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单BOM信息 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/order")
|
||||
public class PdmBiOrderbominfoController {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiOrderbominfoService pdmBiOrderbominfoService;
|
||||
|
||||
@PostMapping("/getBiOrderbominfoByContainer")
|
||||
@Log("子卷装箱")
|
||||
@SaIgnore
|
||||
//@SaCheckPermission("@el.check(updateEntityList)")
|
||||
public ResponseEntity<Object> getBiOrderbominfoByContainer(@RequestBody String whereJson) {
|
||||
pdmBiOrderbominfoService.getBiOrderbominfoByContainer(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package org.nl.b_lms.pdm.dao;
|
||||
package org.nl.b_lms.pdm.info.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -21,6 +25,7 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("pdm_bi_containerinfo")
|
||||
@Builder
|
||||
public class PdmBiContainerinfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -28,33 +33,33 @@ public class PdmBiContainerinfo implements Serializable {
|
||||
/**
|
||||
* 子卷包装标识
|
||||
*/
|
||||
@TableId(value = "workorder_id", type = IdType.AUTO)
|
||||
private Long workorderId;
|
||||
@TableId
|
||||
private Long workorder_id;
|
||||
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String containerName;
|
||||
private String container_name;
|
||||
|
||||
/**
|
||||
* SAP批次
|
||||
*/
|
||||
private String sapPcsn;
|
||||
private String sap_pcsn;
|
||||
|
||||
/**
|
||||
* 销售订单及行号
|
||||
*/
|
||||
private String saleOrderName;
|
||||
private String sale_order_name;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customerName;
|
||||
private String customer_name;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String customerDescription;
|
||||
private String customer_description;
|
||||
|
||||
/**
|
||||
* 产品规格(幅宽)
|
||||
@@ -69,42 +74,42 @@ public class PdmBiContainerinfo implements Serializable {
|
||||
/**
|
||||
* 单位面积质量
|
||||
*/
|
||||
private BigDecimal massPerUnitArea;
|
||||
private String mass_per_unit_area;
|
||||
|
||||
/**
|
||||
* 净重
|
||||
*/
|
||||
private BigDecimal netWeight;
|
||||
private String net_weight;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private BigDecimal length;
|
||||
private String length;
|
||||
|
||||
/**
|
||||
* 制造完成日期
|
||||
*/
|
||||
private String dateOfProduction;
|
||||
private String date_of_production;
|
||||
|
||||
/**
|
||||
* 计划外分切的子卷
|
||||
*/
|
||||
private String isUnPlanProduction;
|
||||
private String is_un_plan_production;
|
||||
|
||||
/**
|
||||
* 子卷的物性值1
|
||||
*/
|
||||
private String unPlanProductProperty1;
|
||||
private String un_plan_product_property1;
|
||||
|
||||
/**
|
||||
* 子卷的物性值2
|
||||
*/
|
||||
private String unPlanProductProperty2;
|
||||
private String un_plan_product_property2;
|
||||
|
||||
/**
|
||||
* 子卷的物性值3
|
||||
*/
|
||||
private String unPlanProductProperty3;
|
||||
private String un_plan_product_property3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -114,57 +119,57 @@ public class PdmBiContainerinfo implements Serializable {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createId;
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 销售订单描述
|
||||
*/
|
||||
private String saleOrderDescription;
|
||||
private String sale_order_description;
|
||||
|
||||
/**
|
||||
* 客户要求规格幅宽
|
||||
*/
|
||||
private String widthStandard;
|
||||
private String width_standard;
|
||||
|
||||
/**
|
||||
* 物料标准厚度
|
||||
*/
|
||||
private String thicknessRequest;
|
||||
private String thickness_request;
|
||||
|
||||
/**
|
||||
* 实际木箱自身重量
|
||||
*/
|
||||
private BigDecimal realWeight;
|
||||
private BigDecimal real_weight;
|
||||
|
||||
/**
|
||||
* 包装关系类型
|
||||
*/
|
||||
private String subType;
|
||||
private String sub_type;
|
||||
|
||||
/**
|
||||
* 客户需求抗拉下限
|
||||
*/
|
||||
private String demandLimit;
|
||||
private String demand_limit;
|
||||
|
||||
/**
|
||||
* 内控标准抗拉下限
|
||||
*/
|
||||
private String standardLimit;
|
||||
private String standard_limit;
|
||||
|
||||
/**
|
||||
* 生产实际抗拉值
|
||||
*/
|
||||
private String actualValue;
|
||||
private String actual_value;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package org.nl.b_lms.pdm.dao;
|
||||
package org.nl.b_lms.pdm.info.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -20,6 +22,7 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("pdm_bi_orderbominfo")
|
||||
@Builder
|
||||
public class PdmBiOrderbominfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -27,7 +30,6 @@ public class PdmBiOrderbominfo implements Serializable {
|
||||
/**
|
||||
* 订单BOM标识
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.nl.b_lms.pdm.mapper;
|
||||
package org.nl.b_lms.pdm.info.mapper;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiContainerinfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiContainerinfo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.nl.b_lms.pdm.mapper;
|
||||
package org.nl.b_lms.pdm.info.mapper;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiOrderbominfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface PdmBiOrderbominfoMapper extends BaseMapper<PdmBiOrderbominfo> {
|
||||
|
||||
PdmBiOrderbominfo getBiOrderbominfoByContainer(String container_name);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.pdm.info.mapper.PdmBiOrderbominfoMapper">
|
||||
|
||||
<select id="getBiOrderbominfoByContainer" resultType="org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo">
|
||||
select *
|
||||
from pdm_bi_orderbominfo info
|
||||
left join pdm_bi_slittingproductionplan plan ON plan.mfg_order_name = info.mfgOrder
|
||||
where plan.container_name = #{container_name}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.nl.b_lms.pdm.service;
|
||||
package org.nl.b_lms.pdm.info.service;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiContainerinfo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiContainerinfo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IPdmBiContainerinfoService extends IService<PdmBiContainerinfo> {
|
||||
|
||||
void createSubInfoByContainer(String container_name);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.nl.b_lms.pdm.service;
|
||||
package org.nl.b_lms.pdm.info.service;
|
||||
|
||||
import org.nl.b_lms.pdm.dao.PdmBiOrderbominfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IPdmBiOrderbominfoService extends IService<PdmBiOrderbominfo> {
|
||||
|
||||
PdmBiOrderbominfo getBiOrderbominfoByContainer(String container);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package org.nl.b_lms.pdm.info.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiContainerinfo;
|
||||
import org.nl.b_lms.pdm.info.mapper.PdmBiContainerinfoMapper;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinfoService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import static javax.swing.Spring.width;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷下线记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiContainerinfoServiceImpl extends ServiceImpl<PdmBiContainerinfoMapper, PdmBiContainerinfo> implements IPdmBiContainerinfoService {
|
||||
|
||||
@Override
|
||||
public void createSubInfoByContainer(String container_name) {
|
||||
|
||||
IpdmBiSubpackagerelationService subpackagerelationService = SpringContextHolder.getBean(IpdmBiSubpackagerelationService.class);
|
||||
IPdmBiSlittingproductionplanService planService = SpringContextHolder.getBean(IPdmBiSlittingproductionplanService.class);
|
||||
PdmBiContainerinfo containerinfo = this.getOne(new LambdaQueryWrapper<PdmBiContainerinfo>().eq(PdmBiContainerinfo::getContainer_name, container_name));
|
||||
if (ObjectUtil.isEmpty(containerinfo)) {
|
||||
throw new BadRequestException("未查询到子卷【" + container_name + "对应的子卷下线信息!】");
|
||||
}
|
||||
|
||||
PdmBiSlittingproductionplan slittingproductionplan = planService.getOne(new LambdaQueryWrapper<PdmBiSlittingproductionplan>().eq(PdmBiSlittingproductionplan::getContainer_name, container_name)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0"));
|
||||
|
||||
if (ObjectUtil.isEmpty(slittingproductionplan)) {
|
||||
throw new BadRequestException("未查询到子卷【" + container_name + "】的分切计划!");
|
||||
}
|
||||
|
||||
String quality_guaran_period = "";
|
||||
if (slittingproductionplan.getMaterial_type().equals("FG1")) {
|
||||
quality_guaran_period = "90天";
|
||||
} else {
|
||||
quality_guaran_period = "180天";
|
||||
}
|
||||
|
||||
PdmBiSubpackagerelation subpackagerelation = subpackagerelationService.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, container_name));
|
||||
if (ObjectUtil.isEmpty(subpackagerelation)) {
|
||||
subpackagerelation = new PdmBiSubpackagerelation();
|
||||
subpackagerelation.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
subpackagerelation.setQuality_guaran_period(quality_guaran_period);
|
||||
subpackagerelation.setSale_order_name(containerinfo.getSale_order_name());
|
||||
subpackagerelation.setCustomer_name(containerinfo.getCustomer_name());
|
||||
subpackagerelation.setCustomer_description(containerinfo.getCustomer_description());
|
||||
subpackagerelation.setProduct_name(slittingproductionplan.getProduct_name());
|
||||
subpackagerelation.setProduct_description(slittingproductionplan.getDescription());
|
||||
subpackagerelation.setDate_of_FG_inbound(DateUtil.format(DateUtil.date(), "yyyy-MM-dd"));
|
||||
subpackagerelation.setContainer_name(container_name);
|
||||
subpackagerelation.setWidth(containerinfo.getWidth());
|
||||
subpackagerelation.setThickness(containerinfo.getThickness());
|
||||
subpackagerelation.setMass_per_unit_area(containerinfo.getMass_per_unit_area());
|
||||
subpackagerelation.setNet_weight(containerinfo.getNet_weight());
|
||||
subpackagerelation.setLength(containerinfo.getLength());
|
||||
subpackagerelation.setDate_of_production(containerinfo.getDate_of_production());
|
||||
subpackagerelation.setIs_un_plan_production(containerinfo.getIs_un_plan_production());
|
||||
subpackagerelation.setUn_plan_product_property1(containerinfo.getUn_plan_product_property1());
|
||||
subpackagerelation.setUn_plan_product_property2(containerinfo.getUn_plan_product_property2());
|
||||
subpackagerelation.setUn_plan_product_property3(containerinfo.getUn_plan_product_property3());
|
||||
subpackagerelation.setStatus("99");
|
||||
subpackagerelation.setIsRePrintPackageBoxLabel("0");
|
||||
subpackagerelation.setIsUnPackBox("0");
|
||||
subpackagerelation.setSap_pcsn(containerinfo.getSap_pcsn());
|
||||
subpackagerelation.setWidth_standard(containerinfo.getWidth_standard());
|
||||
subpackagerelation.setThickness_request(containerinfo.getThickness_request());
|
||||
subpackagerelation.setDemand_limit(containerinfo.getDemand_limit());
|
||||
subpackagerelation.setStandard_limit(containerinfo.getStandard_limit());
|
||||
subpackagerelation.setCreate_id(Long.parseLong(SecurityUtils.getCurrentUserId()));
|
||||
subpackagerelation.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
subpackagerelation.setCreate_time(DateUtil.now());
|
||||
subpackagerelation.setCreate_id(Long.parseLong(SecurityUtils.getCurrentUserId()));
|
||||
subpackagerelation.setActual_value(containerinfo.getActual_value());
|
||||
subpackagerelation.setExt_code("BC01");
|
||||
subpackagerelation.setJoint_type(slittingproductionplan.getJoint_type());
|
||||
subpackagerelation.setMaterial_type(slittingproductionplan.getMaterial_type());
|
||||
subpackagerelationService.save(subpackagerelation);
|
||||
} else {
|
||||
subpackagerelation.setSale_order_name(containerinfo.getSale_order_name());
|
||||
subpackagerelation.setCustomer_name(containerinfo.getCustomer_name());
|
||||
subpackagerelation.setCustomer_description(containerinfo.getCustomer_description());
|
||||
subpackagerelation.setProduct_name(slittingproductionplan.getProduct_name());
|
||||
subpackagerelation.setProduct_description(slittingproductionplan.getDescription());
|
||||
subpackagerelation.setDate_of_FG_inbound(DateUtil.format(DateUtil.date(), "yyyy-MM-dd"));
|
||||
subpackagerelation.setContainer_name(container_name);
|
||||
subpackagerelation.setWidth(containerinfo.getWidth());
|
||||
subpackagerelation.setThickness(containerinfo.getThickness());
|
||||
subpackagerelation.setMass_per_unit_area(containerinfo.getMass_per_unit_area());
|
||||
subpackagerelation.setNet_weight(containerinfo.getNet_weight());
|
||||
subpackagerelation.setLength(containerinfo.getLength());
|
||||
subpackagerelation.setDate_of_production(containerinfo.getDate_of_production());
|
||||
subpackagerelation.setIs_un_plan_production(containerinfo.getIs_un_plan_production());
|
||||
subpackagerelation.setUn_plan_product_property1(containerinfo.getUn_plan_product_property1());
|
||||
subpackagerelation.setUn_plan_product_property2(containerinfo.getUn_plan_product_property2());
|
||||
subpackagerelation.setUn_plan_product_property3(containerinfo.getUn_plan_product_property3());
|
||||
subpackagerelation.setSap_pcsn(containerinfo.getSap_pcsn());
|
||||
subpackagerelation.setWidth_standard(containerinfo.getWidth_standard());
|
||||
subpackagerelation.setThickness_request(containerinfo.getThickness_request());
|
||||
subpackagerelation.setDemand_limit(containerinfo.getDemand_limit());
|
||||
subpackagerelation.setStandard_limit(containerinfo.getStandard_limit());
|
||||
subpackagerelation.setActual_value(containerinfo.getActual_value());
|
||||
subpackagerelation.setJoint_type(slittingproductionplan.getJoint_type());
|
||||
subpackagerelationService.update(subpackagerelation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.b_lms.pdm.info.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.mapper.PdmBiOrderbominfoMapper;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单BOM信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2024-07-19
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiOrderbominfoServiceImpl extends ServiceImpl<PdmBiOrderbominfoMapper, PdmBiOrderbominfo> implements IPdmBiOrderbominfoService {
|
||||
@Override
|
||||
public PdmBiOrderbominfo getBiOrderbominfoByContainer(String container_name) {
|
||||
return this.baseMapper.getBiOrderbominfoByContainer(container_name);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.StopWatch;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -20,6 +21,8 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
@@ -87,6 +90,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
@Resource
|
||||
private IPdmBiSlittingproductionplanService iPdmBiSlittingproductionplanService;
|
||||
|
||||
@Resource
|
||||
private IPdmBiOrderbominfoService iPdmBiOrderbominfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private DjqTask djqTask;
|
||||
@@ -206,8 +212,11 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
r.setBox_group("0");
|
||||
}
|
||||
|
||||
// TODO 调用方法获取木箱料号:输入:子卷号、输出:木箱信息
|
||||
// r.setBox_type("441510009000470");
|
||||
// 调用方法获取木箱料号:输入:子卷号、输出:木箱信息
|
||||
PdmBiOrderbominfo bomInfoDao = iPdmBiOrderbominfoService.getBiOrderbominfoByContainer(r.getContainer_name());
|
||||
if (ObjectUtil.isNotEmpty(bomInfoDao)) {
|
||||
r.setBox_type(bomInfoDao.getProductName());
|
||||
}
|
||||
|
||||
});
|
||||
return pdmBiSubpackagerelationList;
|
||||
|
||||
@@ -5,8 +5,11 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.tasks.TwoInBoxTask;
|
||||
@@ -186,9 +189,18 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
* 插入木箱对应载具表
|
||||
*/
|
||||
|
||||
IschBasePointService pointService = SpringContextHolder.getBean(IschBasePointService.class);
|
||||
SchBasePoint point = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, whereJson.getString("point_code")));
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
throw new BadRequestException("未查询到点位【" + whereJson.getString("point_code") + "】!");
|
||||
}
|
||||
String box_no = whereJson.getString("box_no");
|
||||
String[] split = box_no.split(",");
|
||||
String boxType = "";
|
||||
int layer = whereJson.getIntValue("layer");
|
||||
if (layer != split.length) {
|
||||
throw new BadRequestException("扫描的木箱个数和选择的木箱层数不一致!");
|
||||
}
|
||||
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
String boxNO = split[i];
|
||||
@@ -247,6 +259,9 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
acsToWmsService.applyTwo(apply_jo);
|
||||
} else {
|
||||
if (!data.getString("container_type").equals(vehicle_type)) {
|
||||
if (data.getString("container_type").equals("0")) {
|
||||
throw new BadRequestException("当前电气反馈的托盘类型为0,请检查!");
|
||||
}
|
||||
//给ACS下发拆叠盘位的空托盘入库信号,并进行空托盘出库
|
||||
JSONArray action_rows = new JSONArray();
|
||||
JSONObject action_jo = new JSONObject();
|
||||
|
||||
@@ -22,6 +22,10 @@ import org.nl.b_lms.bst.ivt.scale.history.service.IBstIvtScalehistoryService;
|
||||
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiContainerinfo;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinfoService;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
@@ -1879,7 +1883,6 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
log.info("momSendSplitMfgOrderBOM输入参数为:-------------------" + param.toString());
|
||||
|
||||
/* MES传递的入参内容
|
||||
[
|
||||
{
|
||||
"MfgOrderName": "25529502-20230926$02#02",
|
||||
"ProductName": "44151000900045",
|
||||
@@ -1902,7 +1905,101 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
"HL10": "纸管长度650,中性包装",
|
||||
"HL11": null
|
||||
}
|
||||
]*/
|
||||
*/
|
||||
Long id = IdUtil.getSnowflake(1, 1).nextId();
|
||||
//设备级工单号
|
||||
String mfg_order = param.getString("MfgOrderName");
|
||||
//木箱物料编码
|
||||
String product_name = param.getString("ProductName");
|
||||
//木箱描述
|
||||
String description = param.getString("Description");
|
||||
//管芯编码
|
||||
String carrier_name = param.getString("CarrierName");
|
||||
//管芯描述
|
||||
String carrier_description = param.getString("CarrierDescription");
|
||||
//类型
|
||||
String type = param.getString("Type");
|
||||
//等级
|
||||
String level = param.getString("HL01");
|
||||
//幅宽
|
||||
String thickness = param.getString("HL02");
|
||||
//单卷长度下限
|
||||
String length_floor = param.getString("HL03");
|
||||
//单卷长度上限
|
||||
String length_ceiling = param.getString("HL031");
|
||||
//单卷重量下限
|
||||
String weight_floor = param.getString("HL04");
|
||||
//单卷重量上限
|
||||
String weight_ceiling = param.getString("HL041");
|
||||
//订单重量
|
||||
String order_weight = param.getString("HL05");
|
||||
//包装方案
|
||||
String package_type = param.getString("HL06");
|
||||
//单箱装卷数
|
||||
String package_num = param.getString("HL07");
|
||||
//管芯选配
|
||||
String paper_type = param.getString("HL08");
|
||||
//客户要求管芯长度
|
||||
String need_paper_length = param.getString("HL081");
|
||||
//收卷方式
|
||||
String rolling_type = param.getString("HL09");
|
||||
//客户特殊包装要求
|
||||
String package_request = param.getString("HL10");
|
||||
//客户指定生箔机台
|
||||
String request_machine = param.getString("HL11");
|
||||
|
||||
//判断当前订单BOM是否存在,如果存在则更新,否则保存
|
||||
IPdmBiOrderbominfoService orderbominfoService = SpringContextHolder.getBean(IPdmBiOrderbominfoService.class);
|
||||
PdmBiOrderbominfo orderbominfo = orderbominfoService.getOne(new LambdaQueryWrapper<PdmBiOrderbominfo>().eq(PdmBiOrderbominfo::getMfgOrder, mfg_order));
|
||||
if (ObjectUtil.isEmpty(orderbominfo)) {
|
||||
PdmBiOrderbominfo bom_info = PdmBiOrderbominfo.builder()
|
||||
.id(id)
|
||||
.mfgOrder(mfg_order)
|
||||
.productName(product_name)
|
||||
.description(description)
|
||||
.carrierName(carrier_name)
|
||||
.carrierDescription(carrier_description)
|
||||
.type(type)
|
||||
.level(level)
|
||||
.thickness(thickness)
|
||||
.lengthFloor(length_floor)
|
||||
.lengthCeiling(length_ceiling)
|
||||
.weightFloor(weight_floor)
|
||||
.weightCeiling(weight_ceiling)
|
||||
.orderWeight(order_weight)
|
||||
.packageType(package_type)
|
||||
.packageNum(package_num)
|
||||
.paperType(paper_type)
|
||||
.needPaperLength(need_paper_length)
|
||||
.rollingType(rolling_type)
|
||||
.packageRequest(package_request)
|
||||
.requestMachine(request_machine)
|
||||
.inputTime(DateUtil.now())
|
||||
.build();
|
||||
orderbominfoService.save(bom_info);
|
||||
} else {
|
||||
|
||||
orderbominfo.setProductName(product_name);
|
||||
orderbominfo.setDescription(description);
|
||||
orderbominfo.setCarrierName(carrier_name);
|
||||
orderbominfo.setCarrierDescription(carrier_description);
|
||||
orderbominfo.setType(type);
|
||||
orderbominfo.setLevel(level);
|
||||
orderbominfo.setThickness(thickness);
|
||||
orderbominfo.setLengthFloor(length_floor);
|
||||
orderbominfo.setLengthCeiling(length_ceiling);
|
||||
orderbominfo.setWeightFloor(weight_floor);
|
||||
orderbominfo.setWeightCeiling(weight_ceiling);
|
||||
orderbominfo.setOrderWeight(order_weight);
|
||||
orderbominfo.setPackageType(package_type);
|
||||
orderbominfo.setPackageNum(package_num);
|
||||
orderbominfo.setPaperType(paper_type);
|
||||
orderbominfo.setNeedPaperLength(need_paper_length);
|
||||
orderbominfo.setRollingType(rolling_type);
|
||||
orderbominfo.setPackageRequest(package_request);
|
||||
orderbominfo.setRequestMachine(request_machine);
|
||||
orderbominfoService.updateById(orderbominfo);
|
||||
}
|
||||
|
||||
JSONObject resultParam = new JSONObject();
|
||||
resultParam.put("RTYPE", "S");
|
||||
@@ -1923,9 +2020,9 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
JSONArray arr = new JSONArray();
|
||||
JSONObject resultParam = new JSONObject();
|
||||
resultParam.put("ContainerName", ContainerName);
|
||||
if (one.getResource_name().startsWith("B50")){
|
||||
if (one.getResource_name().startsWith("B50")) {
|
||||
resultParam.put("ResourceName", "B50CZ00001");
|
||||
}else {
|
||||
} else {
|
||||
resultParam.put("ResourceName", "B60CZ00001");
|
||||
}
|
||||
resultParam.put("Weight", one.getWeight());
|
||||
@@ -2025,10 +2122,14 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
"SaleOrderName":"100000022-100",
|
||||
"CustomerName":"10000282",
|
||||
"CustomerDescription":"深圳市金泰莱新材料有限公司",
|
||||
"WidthPlan":null,"ThicknessPlan":"6",
|
||||
"Width":"710","Thickness":"1",
|
||||
"MassPerUnitArea":"1","NetWeight":204.906,
|
||||
"Length":"6500","DateOfProduction":"2024-05-24",
|
||||
"WidthPlan":null,
|
||||
"ThicknessPlan":"6",
|
||||
"Width":"710",
|
||||
"Thickness":"1",
|
||||
"MassPerUnitArea":"1",
|
||||
"NetWeight":204.906,
|
||||
"Length":"6500",
|
||||
"DateOfProduction":"2024-05-24",
|
||||
"isUnPlanProduction":"0",
|
||||
"UnPlanProductProperty1":"面密度/g/m²:1|面密度极差/g/m²:0.4|铬含量/ppm:1|断裂伸长率/%:1.0|高温抗氧化性(150℃|10min):1|M面光泽度/GU:1|M面粗糙度Rz/μm:1|S面粗糙度Ra/μm:1|抗拉强度/Mpa:1.0|厚度/μm:1|润湿性/mN/m - ≥:1|翘曲/mm:1",
|
||||
"UnPlanProductProperty2":"",
|
||||
@@ -2080,37 +2181,59 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
String TensileStrength = param.getString("TensileStrength");
|
||||
|
||||
try {
|
||||
PdmBiSubpackagerelation dto = new PdmBiSubpackagerelation();
|
||||
dto.setContainer_name(ContainerName);
|
||||
dto.setSap_pcsn(SAPLotNumber);
|
||||
dto.setSale_order_name(SaleOrderName);
|
||||
dto.setContainer_name(CustomerName);
|
||||
dto.setCustomer_description(CustomerDescription);
|
||||
dto.setWidth(Width);
|
||||
dto.setThickness(Thickness);
|
||||
dto.setMass_per_unit_area(MassPerUnitArea);
|
||||
dto.setNet_weight(NetWeight);
|
||||
dto.setLength(Length);
|
||||
dto.setDate_of_production(DateOfProduction);
|
||||
dto.setIs_un_plan_production(isUnPlanProduction);
|
||||
dto.setUn_plan_product_property1(UnPlanProductProperty1);
|
||||
dto.setUn_plan_product_property2(UnPlanProductProperty2);
|
||||
dto.setUn_plan_product_property3(UnPlanProductProperty3);
|
||||
dto.setDemand_limit(SOTensileStrengthLowerLimit);
|
||||
dto.setStandard_limit(ETTensileStrengthLowerLimit);
|
||||
dto.setActual_value(TensileStrength);
|
||||
dto.setWidth_standard(WidthPlan);
|
||||
dto.setThickness_request(ThicknessPlan);
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||
|
||||
//判断当前子卷所用母卷为锂电还是标箔
|
||||
if (ContainerName.startsWith("BB")) {
|
||||
dto.setQuality_guaran_period("180天");
|
||||
IPdmBiContainerinfoService containerinfoService = SpringContextHolder.getBean(IPdmBiContainerinfoService.class);
|
||||
PdmBiContainerinfo one = containerinfoService.getOne(new LambdaQueryWrapper<PdmBiContainerinfo>().eq(PdmBiContainerinfo::getContainer_name, ContainerName));
|
||||
if (ObjectUtil.isEmpty(one)) {
|
||||
PdmBiContainerinfo containerinfo = PdmBiContainerinfo.builder()
|
||||
.workorder_id(IdUtil.getSnowflake(1, 1).nextId())
|
||||
.container_name(ContainerName)
|
||||
.sap_pcsn(SAPLotNumber)
|
||||
.sale_order_name(SaleOrderName)
|
||||
.customer_name(CustomerName)
|
||||
.customer_description(CustomerDescription)
|
||||
.width(Width)
|
||||
.thickness(Thickness)
|
||||
.mass_per_unit_area(MassPerUnitArea)
|
||||
.net_weight(NetWeight)
|
||||
.length(Length)
|
||||
.date_of_production(DateOfProduction)
|
||||
.is_un_plan_production(isUnPlanProduction)
|
||||
.un_plan_product_property1(UnPlanProductProperty1)
|
||||
.un_plan_product_property2(UnPlanProductProperty2)
|
||||
.un_plan_product_property3(UnPlanProductProperty3)
|
||||
.demand_limit(SOTensileStrengthLowerLimit)
|
||||
.standard_limit(ETTensileStrengthLowerLimit)
|
||||
.actual_value(TensileStrength)
|
||||
.create_id(SecurityUtils.getCurrentUserId())
|
||||
.create_name(SecurityUtils.getCurrentNickName())
|
||||
.create_time(DateUtil.now())
|
||||
.width_standard(WidthPlan)
|
||||
.thickness_request(ThicknessPlan).build();
|
||||
containerinfoService.save(containerinfo);
|
||||
} else {
|
||||
dto.setQuality_guaran_period("90天");
|
||||
one.setSap_pcsn(SAPLotNumber);
|
||||
one.setSale_order_name(SaleOrderName);
|
||||
one.setCustomer_name(CustomerName);
|
||||
one.setCustomer_description(CustomerDescription);
|
||||
one.setWidth(Width);
|
||||
one.setThickness(Thickness);
|
||||
one.setMass_per_unit_area(MassPerUnitArea);
|
||||
one.setNet_weight(NetWeight);
|
||||
one.setLength(Length);
|
||||
one.setDate_of_production(DateOfProduction);
|
||||
one.setIs_un_plan_production(isUnPlanProduction);
|
||||
one.setUn_plan_product_property1(UnPlanProductProperty1);
|
||||
one.setUn_plan_product_property2(UnPlanProductProperty2);
|
||||
one.setUn_plan_product_property3(UnPlanProductProperty3);
|
||||
one.setDemand_limit(SOTensileStrengthLowerLimit);
|
||||
one.setStandard_limit(ETTensileStrengthLowerLimit);
|
||||
one.setActual_value(TensileStrength);
|
||||
one.setWidth_standard(WidthPlan);
|
||||
one.setThickness_request(ThicknessPlan);
|
||||
containerinfoService.updateById(one);
|
||||
}
|
||||
dto.setDate_of_FG_inbound(DateUtil.format(DateUtil.date(), "yyyy-MM-dd"));
|
||||
// subpackagerelationService.save(dto);
|
||||
IPdmBiContainerinfoService biContainerinfoService = SpringContextHolder.getBean(IPdmBiContainerinfoService.class);
|
||||
biContainerinfoService.createSubInfoByContainer(ContainerName);
|
||||
|
||||
// 返回成功
|
||||
result.put("RTYPE", "S");
|
||||
|
||||
Reference in New Issue
Block a user