Merge remote-tracking branch 'origin/master'

highway
wws 1 year ago
commit 3c0983043b

@ -411,11 +411,13 @@ public class ProOrderServiceImpl implements IProOrderService {
R<List<SapProOrder>> rSapProOrder = remoteSapService.shopOrderSync(sapqo);//sap只能同步指定日期的数据
List<SapProOrder> newOrders = rSapProOrder.getData();
if(CollectionUtils.isEmpty(newOrders)){
if(rSapProOrder == null){
return AjaxResult.error("无"+sapqo.getCreateTime()+"之后的最新订单");
}
List<SapProOrder> newOrders = rSapProOrder.getData();
syncSAPFunc(newOrders);
return success();

@ -203,58 +203,47 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
@DS("#header.poolName")
@Transactional(rollbackFor = Exception.class)
public int downProOrderWorkorderByWorkorderIds(String[] workorderIds) {
List<String> ids = new ArrayList<>();
List<ProOrderWorkorder> workorders = proOrderWorkorderMapper.getWorkOrderByIds(workorderIds);
for (ProOrderWorkorder workorder : workorders) {
//关联工艺
if (StringUtils.isNotBlank(workorder.getRouteCode())) {
List<ProWorkorderProcessDetail> workDetails = proWorkorderProcessDetailMapper.getWorkOrderDetailsByRouteCode(workorder);
if (!CollectionUtils.isEmpty(workDetails)) {
workDetails.forEach(str -> {
str.setRecordId(IdUtils.fastSimpleUUID());
str.setWorkorderId(workorder.getWorkorderId());
str.setStatus("s0");//未执行
str.setCreateBy(SecurityContextHolder.getUserName());
str.setCreateTime(DateUtils.getNowDate());
str.setFactoryCode(workorder.getFactoryCode());
});
proWorkorderProcessDetailMapper.addWorkOrderDetails(workDetails);
}
}
}
List<SapCreateOrder> sapList = null;//回传给sap的工单
//如果是白坯生成备料单
for (String workorderId : workorderIds) {
ProOrderWorkorder whiteOrder = proOrderWorkorderMapper.selectProOrderWorkorderByWorkorderId(workorderId);
if (whiteOrder != null && "white".equals(whiteOrder.getProdType())) {//是白坯订单,自主生成领料单;
//备(领)料主单
MesPrepareDTO mesPrepare = new MesPrepareDTO();
BeanUtils.copyBeanProp(mesPrepare, whiteOrder);
mesPrepare.setPrepareId(whiteOrder.getWorkorderCode() + "L");//领料单号
mesPrepare.setWorkorderCode(whiteOrder.getWorkorderCode());
mesPrepare.setCreateBy(SecurityUtils.getUsername());
mesPrepare.setCreateTime(DateUtils.getNowDate());
mesPrepare.setStatus("L0");//待确认
proOrderWorkorderMapper.createPrepare(mesPrepare);
//备(领)料明细
ProWetMaterialPlanDetail planDetail = proWetMaterialPlanDetailMapper.getWetInfo(workorderId);
List<MesPrepareDetailDTO> details = new ArrayList<>();
MesPrepareDetailDTO detail = new MesPrepareDetailDTO();
detail.setCreateTime(DateUtils.getNowDate());
detail.setCreateBy(SecurityUtils.getUsername());
detail.setRecordId(IdUtils.fastSimpleUUID());
detail.setPrepareId(whiteOrder.getWorkorderCode() + "L");
if (planDetail != null) {
if(planDetail != null){
//备(领)料主单
MesPrepareDTO mesPrepare = new MesPrepareDTO();
BeanUtils.copyBeanProp(mesPrepare, whiteOrder);
mesPrepare.setPrepareId(whiteOrder.getWorkorderCode() + "L");//领料单号
mesPrepare.setWorkorderCode(whiteOrder.getWorkorderCode());
mesPrepare.setCreateBy(SecurityUtils.getUsername());
mesPrepare.setCreateTime(DateUtils.getNowDate());
mesPrepare.setStatus("L0");//待确认
proOrderWorkorderMapper.createPrepare(mesPrepare);
//备(领)料明细
List<MesPrepareDetailDTO> details = new ArrayList<>();
MesPrepareDetailDTO detail = new MesPrepareDetailDTO();
detail.setCreateTime(DateUtils.getNowDate());
detail.setCreateBy(SecurityUtils.getUsername());
detail.setRecordId(IdUtils.fastSimpleUUID());
detail.setPrepareId(whiteOrder.getWorkorderCode() + "L");
detail.setMaterailName(planDetail.getMaterialName());
detail.setMaterialCode(planDetail.getMaterialCode());
detail.setProductDate(planDetail.getProductDate());
detail.setShiftId(planDetail.getShiftId() + "");
detail.setProdType("white");
detail.setFactoryCode(planDetail.getFactoryCode());
}
details.add(detail);
proOrderWorkorderMapper.createPrepareDetails(details);
details.add(detail);
proOrderWorkorderMapper.createPrepareDetails(details);
ids.add(workorderId);
}else{
//无湿料计划,下发不了
}
} else if (whiteOrder != null) {//成品的母工单回传sap
sapList = new ArrayList<>();
SapCreateOrder sap = new SapCreateOrder();
@ -292,11 +281,34 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
}
}
ids.add(workorderId);
}
}
if(!CollectionUtils.isEmpty(ids)){
String[] idsArray = (String[])ids.toArray(new String[ids.size()]);
List<ProOrderWorkorder> workorders = proOrderWorkorderMapper.getWorkOrderByIds(idsArray);
for (ProOrderWorkorder workorder : workorders) {
//关联工艺
if (StringUtils.isNotBlank(workorder.getRouteCode())) {
List<ProWorkorderProcessDetail> workDetails = proWorkorderProcessDetailMapper.getWorkOrderDetailsByRouteCode(workorder);
if (!CollectionUtils.isEmpty(workDetails)) {
workDetails.forEach(str -> {
str.setRecordId(IdUtils.fastSimpleUUID());
str.setWorkorderId(workorder.getWorkorderId());
str.setStatus("s0");//未执行
str.setCreateBy(SecurityContextHolder.getUserName());
str.setCreateTime(DateUtils.getNowDate());
str.setFactoryCode(workorder.getFactoryCode());
});
proWorkorderProcessDetailMapper.addWorkOrderDetails(workDetails);
}
}
}
//下达工单
return proOrderWorkorderMapper.downProOrderWorkorderByWorkorderIds(workorderIds);
//下达工单
return proOrderWorkorderMapper.downProOrderWorkorderByWorkorderIds(idsArray);
}
return 0;
}
// //获取最低级材料

@ -215,6 +215,7 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
// 循环创建湿料计划详情
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorderList) {
// 将湿料计划详情更新至数据库
proWetMaterialPlanDetailMapper.insertProWetMaterialPlanDetail(createProWetMaterialPlanDetail(proOrderWorkorder, planId));
}

@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="prodDesc != null and prodDesc != ''"> and prod_desc like concat('%', #{prodDesc}, '%')</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="workerOrder != null and workerOrder != ''"> and worker_order = #{workerOrder}</if>
<if test="workerOrder != null and workerOrder != ''"> and worker_order like concat('%', #{workerOrder}, '%')</if>
<if test="planProDate != null "> and plan_pro_date = #{planProDate}</if>
<if test="planComplete != null "> and plan_complete = #{planComplete}</if>
<if test="atrr1 != null and atrr1 != ''"> and atrr1 = #{atrr1}</if>

@ -50,12 +50,12 @@
<select id="selectProOrderWorkorderList" parameterType="ProOrderWorkorder" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>
<where>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code like concat('%', #{workorderCode}, '%')</if>
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
<if test="orderCode != null and orderCode != ''"> and order_code like concat('%', #{orderCode}, '%')</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="productSpc != null and productSpc != ''"> and product_spc = #{productSpc}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>

@ -108,8 +108,13 @@
ORDER BY plan_time DESC
</select>
<select id="getWetInfo" resultMap="ProWetMaterialPlanDetailResult">
<include refid="selectProWetMaterialPlanDetailVo"/>
where workorder_id = #{id}
select wd.id, wd.factory_code, wd.wet_material_plan_id, wd.workorder_id, wd.atrr1, wd.atrr2, wd.atrr3, wd.status,
wd.create_by, wd.create_time, wd.update_by, wd.update_time, wd.bucket_id, wd.bucket_code,
wd.material_code, wd.material_id, wd.material_name, wd.product_name, wd.shift_id,
wd.shift_code, wd.shift_desc, wd.plan_time
from pro_wet_material_plan_detail wd
left join pro_order_workorder ow on ow.workorder_id = wd.workorder_id
where ow.workorder_code = #{id}
</select>
<select id="selectProWetMaterialPlanById" resultType="com.op.plan.domain.ProWetMaterialPlan">

@ -0,0 +1,97 @@
package com.op.wms.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.wms.domain.BaseProductAttached;
import com.op.wms.service.IBaseProductAttachedService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Open Platform
* @date 2023-09-20
*/
@RestController
@RequestMapping("/attached")
public class BaseProductAttachedController extends BaseController {
@Autowired
private IBaseProductAttachedService baseProductAttachedService;
/**
*
*/
@RequiresPermissions("wms:attached:list")
@GetMapping("/list")
public TableDataInfo list(BaseProductAttached baseProductAttached) {
startPage();
List<BaseProductAttached> list = baseProductAttachedService.selectBaseProductAttachedList(baseProductAttached);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("wms:attached:export")
@Log(title = "物料附属信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseProductAttached baseProductAttached) {
List<BaseProductAttached> list = baseProductAttachedService.selectBaseProductAttachedList(baseProductAttached);
ExcelUtil<BaseProductAttached> util = new ExcelUtil<BaseProductAttached>(BaseProductAttached.class);
util.exportExcel(response, list, "物料附属信息数据");
}
/**
*
*/
@RequiresPermissions("wms:attached:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(baseProductAttachedService.selectBaseProductAttachedById(id));
}
/**
*
*/
@RequiresPermissions("wms:attached:add")
@Log(title = "物料附属信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseProductAttached baseProductAttached) {
return toAjax(baseProductAttachedService.insertBaseProductAttached(baseProductAttached));
}
/**
*
*/
@RequiresPermissions("wms:attached:edit")
@Log(title = "物料附属信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseProductAttached baseProductAttached) {
return toAjax(baseProductAttachedService.updateBaseProductAttached(baseProductAttached));
}
/**
*
*/
@RequiresPermissions("wms:attached:remove")
@Log(title = "物料附属信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(baseProductAttachedService.deleteBaseProductAttachedByIds(ids));
}
}

@ -93,10 +93,65 @@ public class BaseEquipment extends BaseEntity {
@Excel(name = "工时单价")
private String hourlyUnitPrice;
//附属字段
/** 成型机存料状态 */
@Excel(name = "成型机存料状态")
private String starving;
/** 该成型机存放的物料 */
@Excel(name = "该成型机存放的物料")
private String material;
/** 烘房是否开门 */
@Excel(name = "烘房是否开门")
private String isOpen;
/** 烘房2门前小车数量 */
@Excel(name = "烘房2门前小车数量")
private String dollyNumber;
/** 烘房温度 */
@Excel(name = "烘房温度")
private String temperature;
/** 烘房压强 */
@Excel(name = "烘房压强")
private String intensityOfPressure;
/** 烘房湿度 */
@Excel(name = "烘房湿度")
private String humidity;
/** 烘房状态 */
@Excel(name = "烘房状态")
private String state;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
/** 属性 */
@Excel(name = "属性")
private String property;
/** 说明 */
@Excel(name = "说明")
private String explain;
public void setExplain(String explain) {
this.explain = explain;
}
public String getExplain() {
return explain;
}
public void setProperty(String property) {
this.property = property;
}
public String getProperty() {
return property;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@ -104,6 +159,62 @@ public class BaseEquipment extends BaseEntity {
return delFlag;
}
public void setStarving(String starving) {
this.starving = starving;
}
public String getStarving() {
return starving;
}
public void setMaterial(String material) {
this.material = material;
}
public String getMaterial() {
return material;
}
public void setIsOpen(String isOpen) {
this.isOpen = isOpen;
}
public String getIsOpen() {
return isOpen;
}
public void setDollyNumber(String dollyNumber) {
this.dollyNumber = dollyNumber;
}
public String getDollyNumber() {
return dollyNumber;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getTemperature() {
return temperature;
}
public void setIntensityOfPressure(String intensityOfPressure) {
this.intensityOfPressure = intensityOfPressure;
}
public String getIntensityOfPressure() {
return intensityOfPressure;
}
public void setHumidity(String humidity) {
this.humidity = humidity;
}
public String getHumidity() {
return humidity;
}
public void setState(String state) {
this.state = state;
}
public String getState() {
return state;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
@ -274,6 +385,17 @@ public class BaseEquipment extends BaseEntity {
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.append("delFlag", getDelFlag())
.append("humidity", getHumidity())
.append("intensityOfPressure", getIntensityOfPressure())
.append("starving", getStarving())
.append("humidity", getHumidity())
.append("temperature", getTemperature())
.append("starving", getStarving())
.append("material", getMaterial())
.append("isOpen", getIsOpen())
.append("property", getProperty())
.append("explain", getExplain())
.toString();
}
}

@ -169,6 +169,183 @@ public class BaseProduct extends BaseEntity {
@Excel(name = "物料类型")
private String mtart;
/** 品类 */
@Excel(name = "品类")
private String category;
/** 每PC单圈 */
@Excel(name = "每PC单圈")
private String pc;
/** 标准效率 */
@Excel(name = "标准效率")
private BigDecimal iei;
/** 标准用人 */
@Excel(name = "标准用人")
private BigDecimal manStandar;
/** 喷药方式 */
@Excel(name = "喷药方式")
private String sprayWay;
/** 白坯直径 */
@Excel(name = "白坯直径")
private BigDecimal blankDiameter;
/** 白坯物料号 */
@Excel(name = "白坯物料号")
private String blankNo;
/** 标准喷药量KG/PC */
@Excel(name = "标准喷药量", readConverterExp = "K=G/PC")
private BigDecimal sprayVolume;
/** 药液料号 */
@Excel(name = "药液料号")
private String liquidNo;
/** 标准内膜用量KG/PC */
@Excel(name = "标准内膜用量", readConverterExp = "K=G/PC")
private BigDecimal endometrialDosage;
/** 标准外模用量(KG/PC) */
@Excel(name = "标准外模用量(KG/PC)")
private BigDecimal outerFilmDosage;
/** 支架 */
@Excel(name = "支架")
private Long support;
/** 支架物料号 */
@Excel(name = "支架物料号")
private String supportNo;
/** 吸塑 */
@Excel(name = "吸塑")
private Long pvc;
/** 支架盘 */
@Excel(name = "支架盘")
private Long supportPlate;
/** 其它 */
@Excel(name = "其它")
private String other;
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
public void setPc(String pc) {
this.pc = pc;
}
public String getPc() {
return pc;
}
public void setIei(BigDecimal iei) {
this.iei = iei;
}
public BigDecimal getIei() {
return iei;
}
public void setManStandar(BigDecimal manStandar) {
this.manStandar = manStandar;
}
public BigDecimal getManStandar() {
return manStandar;
}
public void setSprayWay(String sprayWay) {
this.sprayWay = sprayWay;
}
public String getSprayWay() {
return sprayWay;
}
public void setBlankDiameter(BigDecimal blankDiameter) {
this.blankDiameter = blankDiameter;
}
public BigDecimal getBlankDiameter() {
return blankDiameter;
}
public void setBlankNo(String blankNo) {
this.blankNo = blankNo;
}
public String getBlankNo() {
return blankNo;
}
public void setSprayVolume(BigDecimal sprayVolume) {
this.sprayVolume = sprayVolume;
}
public BigDecimal getSprayVolume() {
return sprayVolume;
}
public void setLiquidNo(String liquidNo) {
this.liquidNo = liquidNo;
}
public String getLiquidNo() {
return liquidNo;
}
public void setEndometrialDosage(BigDecimal endometrialDosage) {
this.endometrialDosage = endometrialDosage;
}
public BigDecimal getEndometrialDosage() {
return endometrialDosage;
}
public void setOuterFilmDosage(BigDecimal outerFilmDosage) {
this.outerFilmDosage = outerFilmDosage;
}
public BigDecimal getOuterFilmDosage() {
return outerFilmDosage;
}
public void setSupport(Long support) {
this.support = support;
}
public Long getSupport() {
return support;
}
public void setSupportNo(String supportNo) {
this.supportNo = supportNo;
}
public String getSupportNo() {
return supportNo;
}
public void setPvc(Long pvc) {
this.pvc = pvc;
}
public Long getPvc() {
return pvc;
}
public void setSupportPlate(Long supportPlate) {
this.supportPlate = supportPlate;
}
public Long getSupportPlate() {
return supportPlate;
}
public void setOther(String other) {
this.other = other;
}
public String getOther() {
return other;
}
public void setProductId(String productId) {
this.productId = productId;
}
@ -488,6 +665,22 @@ public class BaseProduct extends BaseEntity {
.append("appendFlag", getAppendFlag())
.append("appendPercent", getAppendPercent())
.append("mtart", getMtart())
.append("category", getCategory())
.append("pc", getPc())
.append("iei", getIei())
.append("manStandar", getManStandar())
.append("sprayWay", getSprayWay())
.append("blankDiameter", getBlankDiameter())
.append("blankNo", getBlankNo())
.append("sprayVolume", getSprayVolume())
.append("liquidNo", getLiquidNo())
.append("endometrialDosage", getEndometrialDosage())
.append("outerFilmDosage", getOuterFilmDosage())
.append("support", getSupport())
.append("supportNo", getSupportNo())
.append("pvc", getPvc())
.append("supportPlate", getSupportPlate())
.append("other", getOther())
.toString();
}
}

@ -0,0 +1,239 @@
package com.op.wms.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
/**
* base_product_attached
*
* @author Open Platform
* @date 2023-09-20
*/
public class BaseProductAttached extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 产品编号 */
@Excel(name = "产品编号")
private String productCode;
/** 品类 */
@Excel(name = "品类")
private String category;
/** 每PC单圈 */
@Excel(name = "每PC单圈")
private String pc;
/** 标准效率 */
@Excel(name = "标准效率")
private BigDecimal iei;
/** 标准用人 */
@Excel(name = "标准用人")
private BigDecimal manStandar;
/** 喷药方式 */
@Excel(name = "喷药方式")
private String sprayWay;
/** 白坯直径 */
@Excel(name = "白坯直径")
private BigDecimal blankDiameter;
/** 白坯物料号 */
@Excel(name = "白坯物料号")
private String blankNo;
/** 标准喷药量KG/PC */
@Excel(name = "标准喷药量", readConverterExp = "K=G/PC")
private BigDecimal sprayVolume;
/** 药液料号 */
@Excel(name = "药液料号")
private String liquidNo;
/** 标准内膜用量KG/PC */
@Excel(name = "标准内膜用量", readConverterExp = "K=G/PC")
private BigDecimal endometrialDosage;
/** 标准外模用量(KG/PC) */
@Excel(name = "标准外模用量(KG/PC)")
private BigDecimal outerFilmDosage;
/** 支架 */
@Excel(name = "支架")
private Long support;
/** 支架物料号 */
@Excel(name = "支架物料号")
private String supportNo;
/** 吸塑 */
@Excel(name = "吸塑")
private Long pvc;
/** 支架盘 */
@Excel(name = "支架盘")
private Long supportPlate;
/** 其它 */
@Excel(name = "其它")
private String other;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductCode() {
return productCode;
}
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
public void setPc(String pc) {
this.pc = pc;
}
public String getPc() {
return pc;
}
public void setIei(BigDecimal iei) {
this.iei = iei;
}
public BigDecimal getIei() {
return iei;
}
public void setManStandar(BigDecimal manStandar) {
this.manStandar = manStandar;
}
public BigDecimal getManStandar() {
return manStandar;
}
public void setSprayWay(String sprayWay) {
this.sprayWay = sprayWay;
}
public String getSprayWay() {
return sprayWay;
}
public void setBlankDiameter(BigDecimal blankDiameter) {
this.blankDiameter = blankDiameter;
}
public BigDecimal getBlankDiameter() {
return blankDiameter;
}
public void setBlankNo(String blankNo) {
this.blankNo = blankNo;
}
public String getBlankNo() {
return blankNo;
}
public void setSprayVolume(BigDecimal sprayVolume) {
this.sprayVolume = sprayVolume;
}
public BigDecimal getSprayVolume() {
return sprayVolume;
}
public void setLiquidNo(String liquidNo) {
this.liquidNo = liquidNo;
}
public String getLiquidNo() {
return liquidNo;
}
public void setEndometrialDosage(BigDecimal endometrialDosage) {
this.endometrialDosage = endometrialDosage;
}
public BigDecimal getEndometrialDosage() {
return endometrialDosage;
}
public void setOuterFilmDosage(BigDecimal outerFilmDosage) {
this.outerFilmDosage = outerFilmDosage;
}
public BigDecimal getOuterFilmDosage() {
return outerFilmDosage;
}
public void setSupport(Long support) {
this.support = support;
}
public Long getSupport() {
return support;
}
public void setSupportNo(String supportNo) {
this.supportNo = supportNo;
}
public String getSupportNo() {
return supportNo;
}
public void setPvc(Long pvc) {
this.pvc = pvc;
}
public Long getPvc() {
return pvc;
}
public void setSupportPlate(Long supportPlate) {
this.supportPlate = supportPlate;
}
public Long getSupportPlate() {
return supportPlate;
}
public void setOther(String other) {
this.other = other;
}
public String getOther() {
return other;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("productCode", getProductCode())
.append("category", getCategory())
.append("pc", getPc())
.append("iei", getIei())
.append("manStandar", getManStandar())
.append("sprayWay", getSprayWay())
.append("blankDiameter", getBlankDiameter())
.append("blankNo", getBlankNo())
.append("sprayVolume", getSprayVolume())
.append("liquidNo", getLiquidNo())
.append("endometrialDosage", getEndometrialDosage())
.append("outerFilmDosage", getOuterFilmDosage())
.append("support", getSupport())
.append("supportNo", getSupportNo())
.append("pvc", getPvc())
.append("supportPlate", getSupportPlate())
.append("other", getOther())
.toString();
}
}

@ -67,4 +67,7 @@ public interface BaseEquipmentMapper {
String checkEquipmentNameUnique(BaseEquipment baseEquipment);
String getWorkCenterName(BaseEquipment baseEquipment);
//查询机器编码关联附属信息
List<BaseEquipment> getEquipmentAttachedList(String equipmentCode);
}

@ -0,0 +1,61 @@
package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.BaseProductAttached;
/**
* Mapper
*
* @author Open Platform
* @date 2023-09-20
*/
public interface BaseProductAttachedMapper {
/**
*
*
* @param id
* @return
*/
public BaseProductAttached selectBaseProductAttachedById(String id);
/**
*
*
* @param baseProductAttached
* @return
*/
public List<BaseProductAttached> selectBaseProductAttachedList(BaseProductAttached baseProductAttached);
/**
*
*
* @param baseProductAttached
* @return
*/
public int insertBaseProductAttached(BaseProductAttached baseProductAttached);
/**
*
*
* @param baseProductAttached
* @return
*/
public int updateBaseProductAttached(BaseProductAttached baseProductAttached);
/**
*
*
* @param id
* @return
*/
public int deleteBaseProductAttachedById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseProductAttachedByIds(String[] ids);
}

@ -0,0 +1,60 @@
package com.op.wms.service;
import java.util.List;
import com.op.wms.domain.BaseProductAttached;
/**
* Service
*
* @author Open Platform
* @date 2023-09-20
*/
public interface IBaseProductAttachedService {
/**
*
*
* @param id
* @return
*/
public BaseProductAttached selectBaseProductAttachedById(String id);
/**
*
*
* @param baseProductAttached
* @return
*/
public List<BaseProductAttached> selectBaseProductAttachedList(BaseProductAttached baseProductAttached);
/**
*
*
* @param baseProductAttached
* @return
*/
public int insertBaseProductAttached(BaseProductAttached baseProductAttached);
/**
*
*
* @param baseProductAttached
* @return
*/
public int updateBaseProductAttached(BaseProductAttached baseProductAttached);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseProductAttachedByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteBaseProductAttachedById(String id);
}

@ -31,7 +31,40 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
@Override
@DS("#header.poolName")
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId) {
return baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId);
BaseEquipment list = baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId);
List<BaseEquipment> attachedList = baseEquipmentMapper.getEquipmentAttachedList(list.getEquipmentCode());
// if(list.getEquipmentTypeCode().equals("equ_type_cxj") || list.getEquipmentTypeCode().equals("equ_type_hf")){
for(BaseEquipment example:attachedList){
if(list.getEquipmentTypeCode().equals("equ_type_cxj")){
if(example.getProperty().equals("material")){
list.setMaterial(example.getExplain());
}else{
list.setStarving(example.getExplain());
}
}else if(list.getEquipmentTypeCode().equals("equ_type_hf")){
if(example.getProperty().equals("isopen")){
//烘房是否开门
list.setIsOpen(example.getExplain());
}else if(example.getProperty().equals("dollyNumber")){
//烘房前小车数量
list.setDollyNumber(example.getExplain());
}else if(example.getProperty().equals("temperature")){
//烘房温度
list.setTemperature(example.getExplain());
}else if(example.getProperty().equals("intensityofpressure")){
//烘房压强
list.setIntensityOfPressure(example.getExplain());
}else if(example.getProperty().equals("State")){
//烘房状态
list.setState(example.getExplain());
}else{
//烘房湿度
list.setHumidity(example.getExplain());
}
}
}
// }
return list;
}
/**

@ -0,0 +1,86 @@
package com.op.wms.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.BaseProductAttachedMapper;
import com.op.wms.domain.BaseProductAttached;
import com.op.wms.service.IBaseProductAttachedService;
/**
* Service
*
* @author Open Platform
* @date 2023-09-20
*/
@Service
public class BaseProductAttachedServiceImpl implements IBaseProductAttachedService {
@Autowired
private BaseProductAttachedMapper baseProductAttachedMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BaseProductAttached selectBaseProductAttachedById(String id) {
return baseProductAttachedMapper.selectBaseProductAttachedById(id);
}
/**
*
*
* @param baseProductAttached
* @return
*/
@Override
public List<BaseProductAttached> selectBaseProductAttachedList(BaseProductAttached baseProductAttached) {
return baseProductAttachedMapper.selectBaseProductAttachedList(baseProductAttached);
}
/**
*
*
* @param baseProductAttached
* @return
*/
@Override
public int insertBaseProductAttached(BaseProductAttached baseProductAttached) {
return baseProductAttachedMapper.insertBaseProductAttached(baseProductAttached);
}
/**
*
*
* @param baseProductAttached
* @return
*/
@Override
public int updateBaseProductAttached(BaseProductAttached baseProductAttached) {
return baseProductAttachedMapper.updateBaseProductAttached(baseProductAttached);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBaseProductAttachedByIds(String[] ids) {
return baseProductAttachedMapper.deleteBaseProductAttachedByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBaseProductAttachedById(String id) {
return baseProductAttachedMapper.deleteBaseProductAttachedById(id);
}
}

@ -198,4 +198,12 @@
and del_flag = '0'
</select>
<select id="getEquipmentAttachedList" parameterType="BaseEquipment" resultType="com.op.wms.domain.BaseEquipment">
SELECT *
FROM base_equipment,base_equipment_attached
where base_equipment_attached.device_code = #{equipmentCode}
and base_equipment.equipment_code = #{equipmentCode}
and base_equipment.del_flag = '0'
</select>
</mapper>

@ -0,0 +1,157 @@
<?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="com.op.wms.mapper.BaseProductAttachedMapper">
<resultMap type="BaseProductAttached" id="BaseProductAttachedResult">
<result property="id" column="id" />
<result property="productCode" column="product_code" />
<result property="category" column="category" />
<result property="pc" column="pc" />
<result property="iei" column="iei" />
<result property="manStandar" column="man_standar" />
<result property="sprayWay" column="spray_way" />
<result property="blankDiameter" column="blank_diameter" />
<result property="blankNo" column="blank_no" />
<result property="sprayVolume" column="spray_volume" />
<result property="liquidNo" column="liquid_no" />
<result property="endometrialDosage" column="endometrial_dosage" />
<result property="outerFilmDosage" column="outer_film_dosage" />
<result property="support" column="support" />
<result property="supportNo" column="support_no" />
<result property="pvc" column="pvc" />
<result property="supportPlate" column="support_plate" />
<result property="other" column="other" />
</resultMap>
<sql id="selectBaseProductAttachedVo">
select id, product_code, category, pc, iei, man_standar, spray_way, blank_diameter, blank_no, spray_volume, liquid_no, endometrial_dosage, outer_film_dosage, support, support_no, pvc, support_plate, other from base_product_attached
</sql>
<select id="selectBaseProductAttachedList" parameterType="BaseProductAttached" resultMap="BaseProductAttachedResult">
<include refid="selectBaseProductAttachedVo"/>
<where>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="pc != null and pc != ''"> and pc = #{pc}</if>
<if test="iei != null "> and iei = #{iei}</if>
<if test="manStandar != null "> and man_standar = #{manStandar}</if>
<if test="sprayWay != null and sprayWay != ''"> and spray_way = #{sprayWay}</if>
<if test="blankDiameter != null "> and blank_diameter = #{blankDiameter}</if>
<if test="blankNo != null and blankNo != ''"> and blank_no = #{blankNo}</if>
<if test="sprayVolume != null "> and spray_volume = #{sprayVolume}</if>
<if test="liquidNo != null and liquidNo != ''"> and liquid_no = #{liquidNo}</if>
<if test="endometrialDosage != null "> and endometrial_dosage = #{endometrialDosage}</if>
<if test="outerFilmDosage != null "> and outer_film_dosage = #{outerFilmDosage}</if>
<if test="support != null "> and support = #{support}</if>
<if test="supportNo != null and supportNo != ''"> and support_no = #{supportNo}</if>
<if test="pvc != null "> and pvc = #{pvc}</if>
<if test="supportPlate != null "> and support_plate = #{supportPlate}</if>
<if test="other != null and other != ''"> and other = #{other}</if>
</where>
</select>
<select id="selectBaseProductAttachedById" parameterType="String" resultMap="BaseProductAttachedResult">
select
bpa.id,
bpa.product_code,
bpa.category,
bpa.pc,
bpa.iei,
bpa.man_standar,
bpa.spray_way,
bpa.blank_diameter,
bpa.blank_no,
bpa.spray_volume,
bpa.liquid_no,
bpa.endometrial_dosage,
bpa.outer_film_dosage,
bpa.support,
bpa.support_no,
bpa.pvc,
bpa.support_plate,
bpa.other
from base_product_attached bpa
where id = #{id}
</select>
<insert id="insertBaseProductAttached" parameterType="BaseProductAttached">
insert into base_product_attached
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="productCode != null">product_code,</if>
<if test="category != null">category,</if>
<if test="pc != null">pc,</if>
<if test="iei != null">iei,</if>
<if test="manStandar != null">man_standar,</if>
<if test="sprayWay != null">spray_way,</if>
<if test="blankDiameter != null">blank_diameter,</if>
<if test="blankNo != null">blank_no,</if>
<if test="sprayVolume != null">spray_volume,</if>
<if test="liquidNo != null">liquid_no,</if>
<if test="endometrialDosage != null">endometrial_dosage,</if>
<if test="outerFilmDosage != null">outer_film_dosage,</if>
<if test="support != null">support,</if>
<if test="supportNo != null">support_no,</if>
<if test="pvc != null">pvc,</if>
<if test="supportPlate != null">support_plate,</if>
<if test="other != null">other,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="productCode != null">#{productCode},</if>
<if test="category != null">#{category},</if>
<if test="pc != null">#{pc},</if>
<if test="iei != null">#{iei},</if>
<if test="manStandar != null">#{manStandar},</if>
<if test="sprayWay != null">#{sprayWay},</if>
<if test="blankDiameter != null">#{blankDiameter},</if>
<if test="blankNo != null">#{blankNo},</if>
<if test="sprayVolume != null">#{sprayVolume},</if>
<if test="liquidNo != null">#{liquidNo},</if>
<if test="endometrialDosage != null">#{endometrialDosage},</if>
<if test="outerFilmDosage != null">#{outerFilmDosage},</if>
<if test="support != null">#{support},</if>
<if test="supportNo != null">#{supportNo},</if>
<if test="pvc != null">#{pvc},</if>
<if test="supportPlate != null">#{supportPlate},</if>
<if test="other != null">#{other},</if>
</trim>
</insert>
<update id="updateBaseProductAttached" parameterType="BaseProductAttached">
update base_product_attached
<trim prefix="SET" suffixOverrides=",">
<if test="productCode != null">product_code = #{productCode},</if>
<if test="category != null">category = #{category},</if>
<if test="pc != null">pc = #{pc},</if>
<if test="iei != null">iei = #{iei},</if>
<if test="manStandar != null">man_standar = #{manStandar},</if>
<if test="sprayWay != null">spray_way = #{sprayWay},</if>
<if test="blankDiameter != null">blank_diameter = #{blankDiameter},</if>
<if test="blankNo != null">blank_no = #{blankNo},</if>
<if test="sprayVolume != null">spray_volume = #{sprayVolume},</if>
<if test="liquidNo != null">liquid_no = #{liquidNo},</if>
<if test="endometrialDosage != null">endometrial_dosage = #{endometrialDosage},</if>
<if test="outerFilmDosage != null">outer_film_dosage = #{outerFilmDosage},</if>
<if test="support != null">support = #{support},</if>
<if test="supportNo != null">support_no = #{supportNo},</if>
<if test="pvc != null">pvc = #{pvc},</if>
<if test="supportPlate != null">support_plate = #{supportPlate},</if>
<if test="other != null">other = #{other},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseProductAttachedById" parameterType="String">
delete from base_product_attached where id = #{id}
</delete>
<delete id="deleteBaseProductAttachedByIds" parameterType="String">
delete from base_product_attached where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -48,6 +48,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="appendFlag" column="append_flag" />
<result property="appendPercent" column="append_percent" />
<result property="mtart" column="mtart" />
<result property="category" column="category" />
<result property="pc" column="pc" />
<result property="iei" column="iei" />
<result property="manStandar" column="man_standar" />
<result property="sprayWay" column="spray_way" />
<result property="blankDiameter" column="blank_diameter" />
<result property="blankNo" column="blank_no" />
<result property="sprayVolume" column="spray_volume" />
<result property="liquidNo" column="liquid_no" />
<result property="endometrialDosage" column="endometrial_dosage" />
<result property="outerFilmDosage" column="outer_film_dosage" />
<result property="support" column="support" />
<result property="supportNo" column="support_no" />
<result property="pvc" column="pvc" />
<result property="supportPlate" column="support_plate" />
<result property="other" column="other" />
</resultMap>
<sql id="selectBaseProductVo">
@ -99,7 +115,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
<include refid="selectBaseProductVo"/>
select
bp.product_id,
bp.product_code,
bp.product_desc_zh,
bp.product_model,
bp.product_desc_en,
bp.rule_code,
bp.old_product_code,
bp.parts_product_code,
bp.sku_barcode,
bp.length,
bp.width,
bp.height,
bp.gross_weight,
bp.net_weight,
bp.tare_weight,
bp.volume,
bp.unit_price,
bp.product_group,
bp.product_group_name,
bp.user_defined1,
bp.user_defined2,
bp.user_defined3,
bp.user_defined4,
bp.user_defined5,
bp.user_defined6,
bp.create_by,
bp.create_time,
bp.update_by,
bp.update_time,
bp.factory_code,
bp.active_flag,
bp.sync_flag,
bp.primary_uom,
bp.del_flag,
bp.bstme,
bp.basic_order,
bp.conv_order,
bp.ausme,
bp.basic_issue,
bp.conv_issue,
bp.append_flag,
bp.append_percent,
bp.mtart,
bpa.category,
bpa.pc,
bpa.iei,
bpa.man_standar,
bpa.spray_way,
bpa.blank_diameter,
bpa.blank_no,
bpa.spray_volume,
bpa.liquid_no,
bpa.endometrial_dosage,
bpa.outer_film_dosage,
bpa.support,
bpa.support_no,
bpa.pvc,
bpa.support_plate,
bpa.other
from base_product bp
left join base_product_attached bpa on bpa.product_code = right(bp.product_code,11)
where product_id = #{productId}
and del_flag = '0'
</select>

Loading…
Cancel
Save