Merge remote-tracking branch 'origin/master'

highway
chj 1 year ago
commit 6146a90ad0

@ -0,0 +1,107 @@
package com.op.system.api.domain.dto;
import java.util.Date;
import java.util.List;
public class WCSDTO {
private String reqCode;
private Date reqTime;
private String planNo;
private String code;
private String message;
private String factory;
private String sku;
private String loadNo;
private List<WCSDataDTO> data;
private List<WCSDataItemsDTO> loadItems;
public String getLoadNo() {
return loadNo;
}
public void setLoadNo(String loadNo) {
this.loadNo = loadNo;
}
public List<WCSDataItemsDTO> getLoadItems() {
return loadItems;
}
public void setLoadItems(List<WCSDataItemsDTO> loadItems) {
this.loadItems = loadItems;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public String getFactory() {
return factory;
}
public void setFactory(String factory) {
this.factory = factory;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getReqCode() {
return reqCode;
}
public void setReqCode(String reqCode) {
this.reqCode = reqCode;
}
public Date getReqTime() {
return reqTime;
}
public void setReqTime(Date reqTime) {
this.reqTime = reqTime;
}
public String getPlanNo() {
return planNo;
}
public void setPlanNo(String planNo) {
this.planNo = planNo;
}
public List<WCSDataDTO> getData() {
return data;
}
public void setData(List<WCSDataDTO> data) {
this.data = data;
}
}

@ -0,0 +1,37 @@
package com.op.system.api.domain.dto;
import java.util.List;
public class WCSDataDTO {
private String sku;
private String loadNo;
private List<WCSDataItemsDTO> unLoadItems;
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public String getLoadNo() {
return loadNo;
}
public void setLoadNo(String loadNo) {
this.loadNo = loadNo;
}
public List<WCSDataItemsDTO> getUnLoadItems() {
return unLoadItems;
}
public void setUnLoadItems(List<WCSDataItemsDTO> unLoadItems) {
this.unLoadItems = unLoadItems;
}
}

@ -0,0 +1,25 @@
package com.op.system.api.domain.dto;
public class WCSDataItemsDTO {
private String unloadNo;
private String loadNo;
public String getLoadNo() {
return loadNo;
}
public void setLoadNo(String loadNo) {
this.loadNo = loadNo;
}
public String getUnloadNo() {
return unloadNo;
}
public void setUnloadNo(String unloadNo) {
this.unloadNo = unloadNo;
}
}

@ -60,4 +60,12 @@ public enum BusinessType {
* SAP
*/
SAP,
/**
* WCS
*/
WCS_requestMaterialLoadNo,
/**
* WCS
*/
WCS
}

@ -0,0 +1,100 @@
package com.op.mes.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.core.utils.uuid.IdUtils;
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.mes.domain.MesPrepare;
import com.op.mes.service.IMesPrepareService;
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-08-03
*/
@RestController
@RequestMapping("/prepare")
public class MesPrepareController extends BaseController {
@Autowired
private IMesPrepareService mesPrepareService;
/**
*
*/
@RequiresPermissions("mes:prepare:list")
@GetMapping("/list")
public TableDataInfo list(MesPrepare mesPrepare) {
startPage();
List<MesPrepare> list = mesPrepareService.selectMesPrepareList(mesPrepare);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:prepare:export")
@Log(title = "备料单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesPrepare mesPrepare) {
List<MesPrepare> list = mesPrepareService.selectMesPrepareList(mesPrepare);
ExcelUtil<MesPrepare> util = new ExcelUtil<MesPrepare>(MesPrepare.class);
util.exportExcel(response, list, "备料单数据");
}
/**
*
*/
@RequiresPermissions("mes:prepare:query")
@GetMapping(value = "/{prepareId}")
public AjaxResult getInfo(@PathVariable("prepareId") String prepareId) {
return success(mesPrepareService.selectMesPrepareByPrepareId(prepareId));
}
/**
*
*/
@RequiresPermissions("mes:prepare:add")
@Log(title = "备料单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesPrepare mesPrepare) {
mesPrepare.setPrepareId(IdUtils.fastSimpleUUID());
return toAjax(mesPrepareService.insertMesPrepare(mesPrepare));
}
/**
*
*/
@RequiresPermissions("mes:prepare:edit")
@Log(title = "备料单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesPrepare mesPrepare) {
return toAjax(mesPrepareService.updateMesPrepare(mesPrepare));
}
/**
*
*/
@RequiresPermissions("mes:prepare:remove")
@Log(title = "备料单", businessType = BusinessType.DELETE)
@DeleteMapping("/{prepareIds}")
public AjaxResult remove(@PathVariable String[] prepareIds) {
return toAjax(mesPrepareService.deleteMesPrepareByPrepareIds(prepareIds));
}
}

@ -0,0 +1,97 @@
package com.op.mes.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.mes.domain.MesPrepareDetail;
import com.op.mes.service.IMesPrepareDetailService;
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;
/**
* mesController
*
* @author Open Platform
* @date 2023-08-04
*/
@RestController
@RequestMapping("/prepareDetail")
public class MesPrepareDetailController extends BaseController {
@Autowired
private IMesPrepareDetailService mesPrepareDetailService;
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:list")
@GetMapping("/list")
public TableDataInfo list(MesPrepareDetail mesPrepareDetail) {
startPage();
List<MesPrepareDetail> list = mesPrepareDetailService.selectMesPrepareDetailList(mesPrepareDetail);
return getDataTable(list);
}
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:export")
@Log(title = "mes备料单明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesPrepareDetail mesPrepareDetail) {
List<MesPrepareDetail> list = mesPrepareDetailService.selectMesPrepareDetailList(mesPrepareDetail);
ExcelUtil<MesPrepareDetail> util = new ExcelUtil<MesPrepareDetail>(MesPrepareDetail.class);
util.exportExcel(response, list, "mes备料单明细数据");
}
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:query")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") String recordId) {
return success(mesPrepareDetailService.selectMesPrepareDetailByRecordId(recordId));
}
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:add")
@Log(title = "mes备料单明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesPrepareDetail mesPrepareDetail) {
return toAjax(mesPrepareDetailService.insertMesPrepareDetail(mesPrepareDetail));
}
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:edit")
@Log(title = "mes备料单明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesPrepareDetail mesPrepareDetail) {
return toAjax(mesPrepareDetailService.updateMesPrepareDetail(mesPrepareDetail));
}
/**
* mes
*/
@RequiresPermissions("mes:prepareDetail:remove")
@Log(title = "mes备料单明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable String[] recordIds) {
return toAjax(mesPrepareDetailService.deleteMesPrepareDetailByRecordIds(recordIds));
}
}

@ -0,0 +1,100 @@
package com.op.mes.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.core.utils.uuid.IdUtils;
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.mes.domain.MesPrepareValidate;
import com.op.mes.service.IMesPrepareValidateService;
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-08-04
*/
@RestController
@RequestMapping("/validate")
public class MesPrepareValidateController extends BaseController {
@Autowired
private IMesPrepareValidateService mesPrepareValidateService;
/**
*
*/
@RequiresPermissions("mes:validate:list")
@GetMapping("/list")
public TableDataInfo list(MesPrepareValidate mesPrepareValidate) {
startPage();
List<MesPrepareValidate> list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:validate:export")
@Log(title = "生产前准备记录报表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesPrepareValidate mesPrepareValidate) {
List<MesPrepareValidate> list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate);
ExcelUtil<MesPrepareValidate> util = new ExcelUtil<MesPrepareValidate>(MesPrepareValidate.class);
util.exportExcel(response, list, "生产前准备记录报表数据");
}
/**
*
*/
@RequiresPermissions("mes:validate:query")
@GetMapping(value = "/{validateId}")
public AjaxResult getInfo(@PathVariable("validateId") String validateId) {
return success(mesPrepareValidateService.selectMesPrepareValidateByValidateId(validateId));
}
/**
*
*/
@RequiresPermissions("mes:validate:add")
@Log(title = "生产前准备记录报表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setValidateId(IdUtils.fastSimpleUUID());
return toAjax(mesPrepareValidateService.insertMesPrepareValidate(mesPrepareValidate));
}
/**
*
*/
@RequiresPermissions("mes:validate:edit")
@Log(title = "生产前准备记录报表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesPrepareValidate mesPrepareValidate) {
return toAjax(mesPrepareValidateService.updateMesPrepareValidate(mesPrepareValidate));
}
/**
*
*/
@RequiresPermissions("mes:validate:remove")
@Log(title = "生产前准备记录报表", businessType = BusinessType.DELETE)
@DeleteMapping("/{validateIds}")
public AjaxResult remove(@PathVariable String[] validateIds) {
return toAjax(mesPrepareValidateService.deleteMesPrepareValidateByValidateIds(validateIds));
}
}

@ -0,0 +1,73 @@
package com.op.mes.controller;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.system.api.domain.dto.WCSDTO;
import com.op.mes.service.IWCSInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* Controller
*
* @author sf
* @date 2023-05-18
*/
@RestController
@RequestMapping
public class WCSInterfaceController extends BaseController {
@Autowired
private IWCSInterfaceService WCInterfaceService;
/**
*
* @param
* @return
*/
@Log(title = "请求接料", businessType = BusinessType.WCS_requestMaterialLoadNo)
@PostMapping("/requestMaterialLoadNo")
public WCSDTO requestMaterialLoadNo(@RequestBody WCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return WCInterfaceService.requestMaterialLoadNo(wcsdto);
}
/**
*
* @param
* @return
*/
@Log(title = "接料完成", businessType = BusinessType.WCS)
@PostMapping("/loadMaterialCompleted")
public WCSDTO loadMaterialCompleted(@RequestBody WCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return WCInterfaceService.loadMaterialCompleted(wcsdto);
}
/**
* RGV
* @param
* @return
*/
@Log(title = "请求送料", businessType = BusinessType.WCS)
@PostMapping("/requestMaterialUnLoadNo")
public WCSDTO requestMaterialUnLoadNo(@RequestBody WCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return WCInterfaceService.requestMaterialUnLoadNo(wcsdto);
}
}

@ -0,0 +1,340 @@
package com.op.mes.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* mes_prepare
*
* @author Open Platform
* @date 2023-08-03
*/
public class MesPrepare extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 备料单id */
private String prepareId;
/** 工单编码 */
@Excel(name = "工单编码")
private String workorderCode;
/** 工单名称 */
@Excel(name = "工单名称")
private String workorderName;
/** 父工单 */
@Excel(name = "父工单")
private String parentOrder;
/** 订单id */
@Excel(name = "订单id")
private String orderId;
/** 订单编码 */
@Excel(name = "订单编码")
private String orderCode;
/** 产品id */
@Excel(name = "产品id")
private String productId;
/** 产品编号 */
@Excel(name = "产品编号")
private String productCode;
/** 产品类型 */
@Excel(name = "产品类型")
private String prodType;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 规格型号 */
@Excel(name = "规格型号")
private String productSpc;
/** 配料计划明细id */
@Excel(name = "配料计划明细id")
private String wetDetailPlanId;
/** 工单生产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工单生产日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date productDate;
/** 班次 */
@Excel(name = "班次")
private String shiftId;
/** 所有父节点id */
@Excel(name = "所有父节点id")
private String ancestors;
/** 单据状态 */
@Excel(name = "单据状态")
private String status;
/** 物料编码 */
@Excel(name = "物料编码")
private String materialCode;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料规格型号 */
@Excel(name = "物料规格型号")
private String materialSpc;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 生产数量 */
@Excel(name = "生产数量")
private String quantity;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private String attr4;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialSpc(String materialSpc) {
this.materialSpc = materialSpc;
}
public String getMaterialSpc() {
return materialSpc;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getUnit() {
return unit;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getQuantity() {
return quantity;
}
public void setPrepareId(String prepareId) {
this.prepareId = prepareId;
}
public String getPrepareId() {
return prepareId;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderName(String workorderName) {
this.workorderName = workorderName;
}
public String getWorkorderName() {
return workorderName;
}
public void setParentOrder(String parentOrder) {
this.parentOrder = parentOrder;
}
public String getParentOrder() {
return parentOrder;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getProductId() {
return productId;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductCode() {
return productCode;
}
public void setProdType(String prodType) {
this.prodType = prodType;
}
public String getProdType() {
return prodType;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductName() {
return productName;
}
public void setProductSpc(String productSpc) {
this.productSpc = productSpc;
}
public String getProductSpc() {
return productSpc;
}
public void setWetDetailPlanId(String wetDetailPlanId) {
this.wetDetailPlanId = wetDetailPlanId;
}
public String getWetDetailPlanId() {
return wetDetailPlanId;
}
public void setProductDate(Date productDate) {
this.productDate = productDate;
}
public Date getProductDate() {
return productDate;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public String getShiftId() {
return shiftId;
}
public void setAncestors(String ancestors) {
this.ancestors = ancestors;
}
public String getAncestors() {
return ancestors;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setAttr4(String attr4) {
this.attr4 = attr4;
}
public String getAttr4() {
return attr4;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("prepareId", getPrepareId())
.append("workorderCode", getWorkorderCode())
.append("workorderName", getWorkorderName())
.append("parentOrder", getParentOrder())
.append("orderId", getOrderId())
.append("orderCode", getOrderCode())
.append("productId", getProductId())
.append("productCode", getProductCode())
.append("prodType", getProdType())
.append("productName", getProductName())
.append("productSpc", getProductSpc())
.append("wetDetailPlanId", getWetDetailPlanId())
.append("productDate", getProductDate())
.append("shiftId", getShiftId())
.append("ancestors", getAncestors())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("materialSpc", getMaterialSpc())
.append("quantity", getQuantity())
.append("unit", getUnit())
.toString();
}
}

@ -0,0 +1,222 @@
package com.op.mes.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* mes mes_prepare_detail
*
* @author Open Platform
* @date 2023-08-04
*/
public class MesPrepareDetail extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private String recordId;
/** 备料主ID */
@Excel(name = "备料主ID")
private String prepareId;
/** 物料编号 */
@Excel(name = "物料编号")
private String materialCode;
/** 物料名称 */
@Excel(name = "物料名称")
private String materailName;
/** 规格型号 */
@Excel(name = "规格型号")
private String materailSpc;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 生产数量 */
@Excel(name = "生产数量")
private Long quantity;
/** 工单生产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工单生产日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date productDate;
/** 班次 */
@Excel(name = "班次")
private String shiftId;
/** 单据状态 */
@Excel(name = "单据状态")
private String status;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private String attr4;
/** 产品类型 */
@Excel(name = "产品类型")
private String prodType;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String factoryCode;
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getRecordId() {
return recordId;
}
public void setPrepareId(String prepareId) {
this.prepareId = prepareId;
}
public String getPrepareId() {
return prepareId;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterailName(String materailName) {
this.materailName = materailName;
}
public String getMaterailName() {
return materailName;
}
public void setMaterailSpc(String materailSpc) {
this.materailSpc = materailSpc;
}
public String getMaterailSpc() {
return materailSpc;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getUnit() {
return unit;
}
public void setQuantity(Long quantity) {
this.quantity = quantity;
}
public Long getQuantity() {
return quantity;
}
public void setProductDate(Date productDate) {
this.productDate = productDate;
}
public Date getProductDate() {
return productDate;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public String getShiftId() {
return shiftId;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setAttr4(String attr4) {
this.attr4 = attr4;
}
public String getAttr4() {
return attr4;
}
public void setProdType(String prodType) {
this.prodType = prodType;
}
public String getProdType() {
return prodType;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordId", getRecordId())
.append("prepareId", getPrepareId())
.append("materialCode", getMaterialCode())
.append("materailName", getMaterailName())
.append("materailSpc", getMaterailSpc())
.append("unit", getUnit())
.append("quantity", getQuantity())
.append("productDate", getProductDate())
.append("shiftId", getShiftId())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("prodType", getProdType())
.append("factoryCode", getFactoryCode())
.toString();
}
}

@ -0,0 +1,210 @@
package com.op.mes.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
import java.util.Date;
/**
* mes_prepare_validate
*
* @author Open Platform
* @date 2023-08-04
*/
public class MesPrepareValidate extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 生产前准备id */
private String validateId;
/** 工单编码 */
@Excel(name = "工单编码")
private String workorderCode;
/** 工单名称 */
@Excel(name = "工单名称")
private String workorderName;
/** 产品规格型号 */
@Excel(name = "产品规格型号")
private String productSpc;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 单据状态 */
@Excel(name = "单据状态")
private String status;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private String attr4;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 准备类型 */
@Excel(name = "准备类型")
private String validateType;
/** 准备内容 */
@Excel(name = "准备内容")
private String validateName;
/** 准备状态 */
@Excel(name = "准备状态")
private String validateStatus;
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getEndTime() {
return endTime;
}
public void setValidateId(String validateId) {
this.validateId = validateId;
}
public String getValidateId() {
return validateId;
}
public void setValidateType(String validateType) {
this.validateType = validateType;
}
public String getValidateType() {
return validateType;
}
public void setValidateName(String validateName) {
this.validateName = validateName;
}
public String getValidateName() {
return validateName;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderName(String workorderName) {
this.workorderName = workorderName;
}
public String getWorkorderName() {
return workorderName;
}
public void setProductSpc(String productSpc) {
this.productSpc = productSpc;
}
public String getProductSpc() {
return productSpc;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductName() {
return productName;
}
public void setValidateStatus(String ValidateStatus) {
this.validateStatus = ValidateStatus;
}
public String getValidateStatus() {
return validateStatus;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setAttr4(String attr4) {
this.attr4 = attr4;
}
public String getAttr4() {
return attr4;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("validateId", getValidateId())
.append("workorderCode", getWorkorderCode())
.append("workorderName", getWorkorderName())
.append("productSpc", getProductSpc())
.append("productName", getProductName())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.append("validateType", getValidateType())
.append("validateName", getValidateName())
.append("validatStatus", getStatus())
.append("endTime", getEndTime())
.toString();
}
}

@ -0,0 +1,20 @@
package com.op.mes.mapper;
import com.op.system.api.domain.dto.WCSDTO;
import com.op.system.api.domain.dto.WCSDataItemsDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Mapper
*
* @author Open Platform
* @date 2023-07-13
*/
@Mapper
public interface MesMapper {
List<WCSDataItemsDTO> getWetPlanDetail(WCSDTO wcsdto);
}

@ -0,0 +1,61 @@
package com.op.mes.mapper;
import java.util.List;
import com.op.mes.domain.MesPrepareDetail;
/**
* mesMapper
*
* @author Open Platform
* @date 2023-08-04
*/
public interface MesPrepareDetailMapper {
/**
* mes
*
* @param recordId mes
* @return mes
*/
public MesPrepareDetail selectMesPrepareDetailByRecordId(String recordId);
/**
* mes
*
* @param mesPrepareDetail mes
* @return mes
*/
public List<MesPrepareDetail> selectMesPrepareDetailList(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
public int insertMesPrepareDetail(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
public int updateMesPrepareDetail(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param recordId mes
* @return
*/
public int deleteMesPrepareDetailByRecordId(String recordId);
/**
* mes
*
* @param recordIds
* @return
*/
public int deleteMesPrepareDetailByRecordIds(String[] recordIds);
}

@ -0,0 +1,61 @@
package com.op.mes.mapper;
import java.util.List;
import com.op.mes.domain.MesPrepare;
/**
* Mapper
*
* @author Open Platform
* @date 2023-08-03
*/
public interface MesPrepareMapper {
/**
*
*
* @param prepareId
* @return
*/
public MesPrepare selectMesPrepareByPrepareId(String prepareId);
/**
*
*
* @param mesPrepare
* @return
*/
public List<MesPrepare> selectMesPrepareList(MesPrepare mesPrepare);
/**
*
*
* @param mesPrepare
* @return
*/
public int insertMesPrepare(MesPrepare mesPrepare);
/**
*
*
* @param mesPrepare
* @return
*/
public int updateMesPrepare(MesPrepare mesPrepare);
/**
*
*
* @param prepareId
* @return
*/
public int deleteMesPrepareByPrepareId(String prepareId);
/**
*
*
* @param prepareIds
* @return
*/
public int deleteMesPrepareByPrepareIds(String[] prepareIds);
}

@ -0,0 +1,61 @@
package com.op.mes.mapper;
import java.util.List;
import com.op.mes.domain.MesPrepareValidate;
/**
* Mapper
*
* @author Open Platform
* @date 2023-08-04
*/
public interface MesPrepareValidateMapper {
/**
*
*
* @param validateId
* @return
*/
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param validateId
* @return
*/
public int deleteMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param validateIds
* @return
*/
public int deleteMesPrepareValidateByValidateIds(String[] validateIds);
}

@ -0,0 +1,60 @@
package com.op.mes.service;
import java.util.List;
import com.op.mes.domain.MesPrepareDetail;
/**
* mesService
*
* @author Open Platform
* @date 2023-08-04
*/
public interface IMesPrepareDetailService {
/**
* mes
*
* @param recordId mes
* @return mes
*/
public MesPrepareDetail selectMesPrepareDetailByRecordId(String recordId);
/**
* mes
*
* @param mesPrepareDetail mes
* @return mes
*/
public List<MesPrepareDetail> selectMesPrepareDetailList(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
public int insertMesPrepareDetail(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
public int updateMesPrepareDetail(MesPrepareDetail mesPrepareDetail);
/**
* mes
*
* @param recordIds mes
* @return
*/
public int deleteMesPrepareDetailByRecordIds(String[] recordIds);
/**
* mes
*
* @param recordId mes
* @return
*/
public int deleteMesPrepareDetailByRecordId(String recordId);
}

@ -0,0 +1,60 @@
package com.op.mes.service;
import java.util.List;
import com.op.mes.domain.MesPrepare;
/**
* Service
*
* @author Open Platform
* @date 2023-08-03
*/
public interface IMesPrepareService {
/**
*
*
* @param prepareId
* @return
*/
public MesPrepare selectMesPrepareByPrepareId(String prepareId);
/**
*
*
* @param mesPrepare
* @return
*/
public List<MesPrepare> selectMesPrepareList(MesPrepare mesPrepare);
/**
*
*
* @param mesPrepare
* @return
*/
public int insertMesPrepare(MesPrepare mesPrepare);
/**
*
*
* @param mesPrepare
* @return
*/
public int updateMesPrepare(MesPrepare mesPrepare);
/**
*
*
* @param prepareIds
* @return
*/
public int deleteMesPrepareByPrepareIds(String[] prepareIds);
/**
*
*
* @param prepareId
* @return
*/
public int deleteMesPrepareByPrepareId(String prepareId);
}

@ -0,0 +1,60 @@
package com.op.mes.service;
import java.util.List;
import com.op.mes.domain.MesPrepareValidate;
/**
* Service
*
* @author Open Platform
* @date 2023-08-04
*/
public interface IMesPrepareValidateService {
/**
*
*
* @param validateId
* @return
*/
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param mesPrepareValidate
* @return
*/
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate);
/**
*
*
* @param validateIds
* @return
*/
public int deleteMesPrepareValidateByValidateIds(String[] validateIds);
/**
*
*
* @param validateId
* @return
*/
public int deleteMesPrepareValidateByValidateId(String validateId);
}

@ -0,0 +1,21 @@
package com.op.mes.service;
import com.op.common.core.web.domain.AjaxResult;
import com.op.system.api.domain.dto.WCSDTO;
import java.util.List;
/**
* Service
*
* @author Open Platform
* @date 2023-07-13
*/
public interface IWCSInterfaceService {
WCSDTO requestMaterialLoadNo(WCSDTO wcsdto);
WCSDTO loadMaterialCompleted(WCSDTO wcsdto);
WCSDTO requestMaterialUnLoadNo(WCSDTO wcsdto);
}

@ -0,0 +1,107 @@
package com.op.mes.service.impl;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.mes.mapper.MesMapper;
import com.op.mes.service.IWCSInterfaceService;
import com.op.system.api.domain.dto.WCSDTO;
import com.op.system.api.domain.dto.WCSDataItemsDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author Open Platform
* @date 2023-07-13
*/
@Service
public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
@Autowired
private MesMapper mesMapper;
/**
* RGV
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
* "reqTime": "2023-06-30 21:24:04", //请求时间
* "sku": "sku01" //物料编码
* factory:"工厂编码"
* }
*
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求编号
* "code": 0, //返回代码
* "message": "OK", //返回信息
* "loadItems": [
* {
* "loadNo": "A1" //上料机台,上料罐
* },
* {
* "loadNo": "A2" //上料机台,上料罐
* }
* ]
* }
* @param wcsdto
* @return
*/
@Override
public WCSDTO requestMaterialLoadNo(WCSDTO wcsdto) {
DynamicDataSourceContextHolder.push(wcsdto.getFactory());
//获取湿料计划
List<WCSDataItemsDTO> loadItems = mesMapper.getWetPlanDetail(wcsdto);
WCSDTO dto = new WCSDTO();
dto.setLoadItems(loadItems);
dto.setReqCode(wcsdto.getReqCode());
dto.setCode("0");
dto.setMessage("OK");
return dto;
}
/** RGV
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0",//请求ID
* "reqTime": "2023-06-30 21:24:04",//请求时间
* "loadNo": "A1"//接料
* "factory":
* }
*
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0",//请求ID
* "code": 0,//返回代码
* "message": "OK"//返回信息
* }
*/
@Override
public WCSDTO loadMaterialCompleted(WCSDTO wcsdto) {
return null;
}
/**RGV
{
"reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
"reqTime": "2023-06-30 21:24:04", //请求时间
"sku": "sku01" //对应的湿料的物料编码
}
JSON
{
"reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0",//请求ID
"code": 0,//返回代码
"message": "OK",//返回信息
"unLoadItems": [
{
"unloadNo": "B1"//送料机台,成型机
},
{
"unloadNo": "B2"//送料机台,成型机
}
]
}
**/
@Override
public WCSDTO requestMaterialUnLoadNo(WCSDTO wcsdto) {
return null;
}
}

@ -0,0 +1,89 @@
package com.op.mes.service.impl;
import java.util.List;
import com.op.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.MesPrepareDetailMapper;
import com.op.mes.domain.MesPrepareDetail;
import com.op.mes.service.IMesPrepareDetailService;
/**
* mesService
*
* @author Open Platform
* @date 2023-08-04
*/
@Service
public class MesPrepareDetailServiceImpl implements IMesPrepareDetailService {
@Autowired
private MesPrepareDetailMapper mesPrepareDetailMapper;
/**
* mes
*
* @param recordId mes
* @return mes
*/
@Override
public MesPrepareDetail selectMesPrepareDetailByRecordId(String recordId) {
return mesPrepareDetailMapper.selectMesPrepareDetailByRecordId(recordId);
}
/**
* mes
*
* @param mesPrepareDetail mes
* @return mes
*/
@Override
public List<MesPrepareDetail> selectMesPrepareDetailList(MesPrepareDetail mesPrepareDetail) {
return mesPrepareDetailMapper.selectMesPrepareDetailList(mesPrepareDetail);
}
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
@Override
public int insertMesPrepareDetail(MesPrepareDetail mesPrepareDetail) {
mesPrepareDetail.setCreateTime(DateUtils.getNowDate());
return mesPrepareDetailMapper.insertMesPrepareDetail(mesPrepareDetail);
}
/**
* mes
*
* @param mesPrepareDetail mes
* @return
*/
@Override
public int updateMesPrepareDetail(MesPrepareDetail mesPrepareDetail) {
mesPrepareDetail.setUpdateTime(DateUtils.getNowDate());
return mesPrepareDetailMapper.updateMesPrepareDetail(mesPrepareDetail);
}
/**
* mes
*
* @param recordIds mes
* @return
*/
@Override
public int deleteMesPrepareDetailByRecordIds(String[] recordIds) {
return mesPrepareDetailMapper.deleteMesPrepareDetailByRecordIds(recordIds);
}
/**
* mes
*
* @param recordId mes
* @return
*/
@Override
public int deleteMesPrepareDetailByRecordId(String recordId) {
return mesPrepareDetailMapper.deleteMesPrepareDetailByRecordId(recordId);
}
}

@ -0,0 +1,97 @@
package com.op.mes.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.MesPrepareMapper;
import com.op.mes.domain.MesPrepare;
import com.op.mes.service.IMesPrepareService;
/**
* Service
*
* @author Open Platform
* @date 2023-08-03
*/
@Service
public class MesPrepareServiceImpl implements IMesPrepareService {
@Autowired
private MesPrepareMapper mesPrepareMapper;
/**
*
*
* @param prepareId
* @return
*/
@Override
@DS("#header.poolName")
public MesPrepare selectMesPrepareByPrepareId(String prepareId) {
return mesPrepareMapper.selectMesPrepareByPrepareId(prepareId);
}
/**
*
*
* @param mesPrepare
* @return
*/
@Override
@DS("#header.poolName")
public List<MesPrepare> selectMesPrepareList(MesPrepare mesPrepare) {
return mesPrepareMapper.selectMesPrepareList(mesPrepare);
}
/**
*
*
* @param mesPrepare
* @return
*/
@Override
@DS("#header.poolName")
public int insertMesPrepare(MesPrepare mesPrepare) {
mesPrepare.setCreateTime(DateUtils.getNowDate());
return mesPrepareMapper.insertMesPrepare(mesPrepare);
}
/**
*
*
* @param mesPrepare
* @return
*/
@Override
@DS("#header.poolName")
public int updateMesPrepare(MesPrepare mesPrepare) {
mesPrepare.setUpdateTime(DateUtils.getNowDate());
return mesPrepareMapper.updateMesPrepare(mesPrepare);
}
/**
*
*
* @param prepareIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteMesPrepareByPrepareIds(String[] prepareIds) {
return mesPrepareMapper.deleteMesPrepareByPrepareIds(prepareIds);
}
/**
*
*
* @param prepareId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteMesPrepareByPrepareId(String prepareId) {
return mesPrepareMapper.deleteMesPrepareByPrepareId(prepareId);
}
}

@ -0,0 +1,96 @@
package com.op.mes.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.mes.mapper.MesPrepareValidateMapper;
import com.op.mes.domain.MesPrepareValidate;
import com.op.mes.service.IMesPrepareValidateService;
/**
* Service
*
* @author Open Platform
* @date 2023-08-04
*/
@Service
public class MesPrepareValidateServiceImpl implements IMesPrepareValidateService {
@Autowired
private MesPrepareValidateMapper mesPrepareValidateMapper;
/**
*
*
* @param validateId
* @return
*/
@Override
@DS("#header.poolName")
public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId) {
return mesPrepareValidateMapper.selectMesPrepareValidateByValidateId(validateId);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public List<MesPrepareValidate> selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate) {
return mesPrepareValidateMapper.selectMesPrepareValidateList(mesPrepareValidate);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setCreateTime(DateUtils.getNowDate());
return mesPrepareValidateMapper.insertMesPrepareValidate(mesPrepareValidate);
}
/**
*
*
* @param mesPrepareValidate
* @return
*/
@Override
@DS("#header.poolName")
public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate) {
mesPrepareValidate.setUpdateTime(DateUtils.getNowDate());
return mesPrepareValidateMapper.updateMesPrepareValidate(mesPrepareValidate);
}
/**
*
*
* @param validateIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteMesPrepareValidateByValidateIds(String[] validateIds) {
return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateIds(validateIds);
}
/**
*
*
* @param validateId
* @return
*/
@Override
public int deleteMesPrepareValidateByValidateId(String validateId) {
return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateId(validateId);
}
}

@ -0,0 +1,148 @@
<?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.mes.mapper.MesPrepareDetailMapper">
<resultMap type="MesPrepareDetail" id="MesPrepareDetailResult">
<result property="recordId" column="record_id" />
<result property="prepareId" column="prepare_id" />
<result property="materialCode" column="material_code" />
<result property="materailName" column="materail_name" />
<result property="materailSpc" column="materail_spc" />
<result property="unit" column="unit" />
<result property="quantity" column="quantity" />
<result property="productDate" column="product_date" />
<result property="shiftId" column="shift_id" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="prodType" column="prod_type" />
<result property="factoryCode" column="factory_code" />
</resultMap>
<sql id="selectMesPrepareDetailVo">
select record_id, prepare_id, material_code, materail_name, materail_spc, unit, quantity, product_date, shift_id, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code from mes_prepare_detail
</sql>
<select id="selectMesPrepareDetailList" parameterType="MesPrepareDetail" resultMap="MesPrepareDetailResult">
<include refid="selectMesPrepareDetailVo"/>
<where>
<if test="prepareId != null and prepareId != ''"> and prepare_id = #{prepareId}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materailName != null and materailName != ''"> and materail_name like concat('%', #{materailName}, '%')</if>
<if test="materailSpc != null and materailSpc != ''"> and materail_spc = #{materailSpc}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="productDate != null "> and product_date = #{productDate}</if>
<if test="shiftId != null and shiftId != ''"> and shift_id = #{shiftId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
</where>
</select>
<select id="selectMesPrepareDetailByRecordId" parameterType="String" resultMap="MesPrepareDetailResult">
<include refid="selectMesPrepareDetailVo"/>
where record_id = #{recordId}
</select>
<insert id="insertMesPrepareDetail" parameterType="MesPrepareDetail">
insert into mes_prepare_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="prepareId != null and prepareId != ''">prepare_id,</if>
<if test="materialCode != null and materialCode != ''">material_code,</if>
<if test="materailName != null and materailName != ''">materail_name,</if>
<if test="materailSpc != null">materail_spc,</if>
<if test="unit != null and unit != ''">unit,</if>
<if test="quantity != null">quantity,</if>
<if test="productDate != null">product_date,</if>
<if test="shiftId != null">shift_id,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="prodType != null">prod_type,</if>
<if test="factoryCode != null">factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="prepareId != null and prepareId != ''">#{prepareId},</if>
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
<if test="materailName != null and materailName != ''">#{materailName},</if>
<if test="materailSpc != null">#{materailSpc},</if>
<if test="unit != null and unit != ''">#{unit},</if>
<if test="quantity != null">#{quantity},</if>
<if test="productDate != null">#{productDate},</if>
<if test="shiftId != null">#{shiftId},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="prodType != null">#{prodType},</if>
<if test="factoryCode != null">#{factoryCode},</if>
</trim>
</insert>
<update id="updateMesPrepareDetail" parameterType="MesPrepareDetail">
update mes_prepare_detail
<trim prefix="SET" suffixOverrides=",">
<if test="prepareId != null and prepareId != ''">prepare_id = #{prepareId},</if>
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
<if test="materailName != null and materailName != ''">materail_name = #{materailName},</if>
<if test="materailSpc != null">materail_spc = #{materailSpc},</if>
<if test="unit != null and unit != ''">unit = #{unit},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="productDate != null">product_date = #{productDate},</if>
<if test="shiftId != null">shift_id = #{shiftId},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="prodType != null">prod_type = #{prodType},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
</trim>
where record_id = #{recordId}
</update>
<delete id="deleteMesPrepareDetailByRecordId" parameterType="String">
delete from mes_prepare_detail where record_id = #{recordId}
</delete>
<delete id="deleteMesPrepareDetailByRecordIds" parameterType="String">
delete from mes_prepare_detail where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,217 @@
<?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.mes.mapper.MesPrepareMapper">
<resultMap type="MesPrepare" id="MesPrepareResult">
<result property="prepareId" column="prepare_id" />
<result property="workorderCode" column="workorder_code" />
<result property="workorderName" column="workorder_name" />
<result property="parentOrder" column="parent_order" />
<result property="orderId" column="order_id" />
<result property="orderCode" column="order_code" />
<result property="productId" column="product_id" />
<result property="productCode" column="product_code" />
<result property="prodType" column="prod_type" />
<result property="productName" column="product_name" />
<result property="productSpc" column="product_spc" />
<result property="wetDetailPlanId" column="wet_detail_plan_id" />
<result property="productDate" column="product_date" />
<result property="shiftId" column="shift_id" />
<result property="ancestors" column="ancestors" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialSpc" column="material_spc" />
<result property="unit" column="unit" />
<result property="quantity" column="quantity" />
</resultMap>
<sql id="selectMesPrepareVo">
select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code, product_id, product_code, prod_type, product_name, product_spc, wet_detail_plan_id, product_date, shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, material_code, material_name, material_spc, unit, quantity from mes_prepare
</sql>
<select id="selectMesPrepareList" parameterType="MesPrepare" resultMap="MesPrepareResult">
select
ms.prepare_id,
ms.workorder_code,
ms.workorder_name,
ms.parent_order,
ms.order_id,
ms.order_code,
ms.product_id,
ms.product_code,
ms.prod_type,
ms.product_name,
ms.product_spc,
ms.wet_detail_plan_id,
ms.product_date,
ms.shift_id,
ms.ancestors,
ms.status,
ms.remark,
ms.attr1,
ms.attr2,
ms.attr3,
ms.attr4,
ms.create_by,
ms.create_time,
ms.update_by,
ms.update_time,
ms.factory_code,
msd.prepare_id id,
msd.material_code,
msd.material_name,
msd.material_spc,
msd.unit,
msd.quantity
from mes_prepare ms,mes_prepare_detail msd
<where>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
<if test="parentOrder != null and parentOrder != ''"> and parent_order = #{parentOrder}</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="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</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="wetDetailPlanId != null and wetDetailPlanId != ''"> and wet_detail_plan_id = #{wetDetailPlanId}</if>
<if test="productDate != null "> and product_date = #{productDate}</if>
<if test="shiftId != null and shiftId != ''"> and shift_id = #{shiftId}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
</where>
</select>
<select id="selectMesPrepareByPrepareId" parameterType="String" resultMap="MesPrepareResult">
<include refid="selectMesPrepareVo"/>
where prepare_id = #{prepareId}
</select>
<!-- <insert id="insertMesPrepare" parameterType="MesPrepare">-->
<!-- insert into mes_prepare-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="prepareId != null">prepare_id,</if>-->
<!-- <if test="workorderCode != null and workorderCode != ''">workorder_code,</if>-->
<!-- <if test="workorderName != null">workorder_name,</if>-->
<!-- <if test="parentOrder != null and parentOrder != ''">parent_order,</if>-->
<!-- <if test="orderId != null and orderId != ''">order_id,</if>-->
<!-- <if test="orderCode != null">order_code,</if>-->
<!-- <if test="productId != null">product_id,</if>-->
<!-- <if test="productCode != null and productCode != ''">product_code,</if>-->
<!-- <if test="prodType != null">prod_type,</if>-->
<!-- <if test="productName != null and productName != ''">product_name,</if>-->
<!-- <if test="productSpc != null">product_spc,</if>-->
<!-- <if test="wetDetailPlanId != null">wet_detail_plan_id,</if>-->
<!-- <if test="productDate != null">product_date,</if>-->
<!-- <if test="shiftId != null">shift_id,</if>-->
<!-- <if test="ancestors != null">ancestors,</if>-->
<!-- <if test="status != null">status,</if>-->
<!-- <if test="remark != null">remark,</if>-->
<!-- <if test="attr1 != null">attr1,</if>-->
<!-- <if test="attr2 != null">attr2,</if>-->
<!-- <if test="attr3 != null">attr3,</if>-->
<!-- <if test="attr4 != null">attr4,</if>-->
<!-- <if test="createBy != null">create_by,</if>-->
<!-- <if test="createTime != null">create_time,</if>-->
<!-- <if test="updateBy != null">update_by,</if>-->
<!-- <if test="updateTime != null">update_time,</if>-->
<!-- <if test="factoryCode != null">factory_code,</if>-->
<!-- <if test="materialCode != null and materialCode != ''">material_code,</if>-->
<!-- <if test="materialName != null and materialName != ''">material_name,</if>-->
<!-- <if test="materialSpc != null">material_spc,</if>-->
<!-- <if test="unit != null and unit != ''">unit,</if>-->
<!-- <if test="quantity != null">quantity,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="prepareId != null">#{prepareId},</if>-->
<!-- <if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>-->
<!-- <if test="workorderName != null">#{workorderName},</if>-->
<!-- <if test="parentOrder != null and parentOrder != ''">#{parentOrder},</if>-->
<!-- <if test="orderId != null and orderId != ''">#{orderId},</if>-->
<!-- <if test="orderCode != null">#{orderCode},</if>-->
<!-- <if test="productId != null">#{productId},</if>-->
<!-- <if test="productCode != null and productCode != ''">#{productCode},</if>-->
<!-- <if test="prodType != null">#{prodType},</if>-->
<!-- <if test="productName != null and productName != ''">#{productName},</if>-->
<!-- <if test="productSpc != null">#{productSpc},</if>-->
<!-- <if test="wetDetailPlanId != null">#{wetDetailPlanId},</if>-->
<!-- <if test="productDate != null">#{productDate},</if>-->
<!-- <if test="shiftId != null">#{shiftId},</if>-->
<!-- <if test="ancestors != null">#{ancestors},</if>-->
<!-- <if test="status != null">#{status},</if>-->
<!-- <if test="remark != null">#{remark},</if>-->
<!-- <if test="attr1 != null">#{attr1},</if>-->
<!-- <if test="attr2 != null">#{attr2},</if>-->
<!-- <if test="attr3 != null">#{attr3},</if>-->
<!-- <if test="attr4 != null">#{attr4},</if>-->
<!-- <if test="createBy != null">#{createBy},</if>-->
<!-- <if test="createTime != null">#{createTime},</if>-->
<!-- <if test="updateBy != null">#{updateBy},</if>-->
<!-- <if test="updateTime != null">#{updateTime},</if>-->
<!-- <if test="factoryCode != null">#{factoryCode},</if>-->
<!-- <if test="materialCode != null and materialCode != ''">#{materialCode},</if>-->
<!-- <if test="materialName != null and materialName != ''">#{materialName},</if>-->
<!-- <if test="materialSpc != null">#{materialSpc},</if>-->
<!-- <if test="unit != null and unit != ''">#{unit},</if>-->
<!-- <if test="quantity != null">#{quantity},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <update id="updateMesPrepare" parameterType="MesPrepare">-->
<!-- update mes_prepare-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>-->
<!-- <if test="workorderName != null">workorder_name = #{workorderName},</if>-->
<!-- <if test="parentOrder != null and parentOrder != ''">parent_order = #{parentOrder},</if>-->
<!-- <if test="orderId != null and orderId != ''">order_id = #{orderId},</if>-->
<!-- <if test="orderCode != null">order_code = #{orderCode},</if>-->
<!-- <if test="productId != null">product_id = #{productId},</if>-->
<!-- <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>-->
<!-- <if test="prodType != null">prod_type = #{prodType},</if>-->
<!-- <if test="productName != null and productName != ''">product_name = #{productName},</if>-->
<!-- <if test="productSpc != null">product_spc = #{productSpc},</if>-->
<!-- <if test="wetDetailPlanId != null">wet_detail_plan_id = #{wetDetailPlanId},</if>-->
<!-- <if test="productDate != null">product_date = #{productDate},</if>-->
<!-- <if test="shiftId != null">shift_id = #{shiftId},</if>-->
<!-- <if test="ancestors != null">ancestors = #{ancestors},</if>-->
<!-- <if test="status != null">status = #{status},</if>-->
<!-- <if test="remark != null">remark = #{remark},</if>-->
<!-- <if test="attr1 != null">attr1 = #{attr1},</if>-->
<!-- <if test="attr2 != null">attr2 = #{attr2},</if>-->
<!-- <if test="attr3 != null">attr3 = #{attr3},</if>-->
<!-- <if test="attr4 != null">attr4 = #{attr4},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<!-- <if test="updateBy != null">update_by = #{updateBy},</if>-->
<!-- <if test="updateTime != null">update_time = #{updateTime},</if>-->
<!-- <if test="factoryCode != null">factory_code = #{factoryCode},</if>-->
<!-- </trim>-->
<!-- where prepare_id = #{prepareId}-->
<!-- </update>-->
<!-- <delete id="deleteMesPrepareByPrepareId" parameterType="String">-->
<!-- delete from mes_prepare where prepare_id = #{prepareId}-->
<!-- </delete>-->
<!-- <delete id="deleteMesPrepareByPrepareIds" parameterType="String">-->
<!-- delete from mes_prepare where prepare_id in -->
<!-- <foreach item="prepareId" collection="array" open="(" separator="," close=")">-->
<!-- #{prepareId}-->
<!-- </foreach>-->
<!-- </delete>-->
</mapper>

@ -0,0 +1,144 @@
<?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.mes.mapper.MesPrepareValidateMapper">
<resultMap type="MesPrepareValidate" id="MesPrepareValidateResult">
<result property="validateId" column="validate_id" />
<result property="workorderCode" column="workorder_code" />
<result property="workorderName" column="workorder_name" />
<result property="productSpc" column="product_spc" />
<result property="productName" column="product_name" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="endTime" column="end_time" />
<result property="validateType" column="validate_type" />
<result property="validateName" column="validate_name" />
<result property="validateStatus" column="validate_status" />
</resultMap>
<sql id="selectMesPrepareValidateVo">
select validate_id, workorder_code, workorder_name, product_spc, product_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_prepare_validate
</sql>
<select id="selectMesPrepareValidateList" parameterType="MesPrepareValidate" resultMap="MesPrepareValidateResult">
select
mpv.validate_id,
mpv.workorder_code,
mpv.workorder_name,
mpv.product_spc,
mpv.product_name,
mpv.status,
mpv.remark,
mpv.create_by,
mpv.create_time,
mpv.update_by,
mpv.update_time,
mpv.factory_code,
mpvd.validate_id id,
mpvd.validate_type,
mpvd.validate_name,
mpvd.end_time
from mes_prepare_validate mpv,mes_prepare_validate_detail mpvd
<where>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
<if test="productSpc != null and productSpc != ''"> and product_spc = #{productSpc}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
</where>
</select>
<select id="selectMesPrepareValidateByValidateId" parameterType="String" resultMap="MesPrepareValidateResult">
<include refid="selectMesPrepareValidateVo"/>
where validate_id = #{validateId}
</select>
<insert id="insertMesPrepareValidate" parameterType="MesPrepareValidate">
insert into mes_prepare_validate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="validateId != null">validate_id,</if>
<if test="workorderCode != null and workorderCode != ''">workorder_code,</if>
<if test="workorderName != null">workorder_name,</if>
<if test="productSpc != null">product_spc,</if>
<if test="productName != null">product_name,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null">factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="validateId != null">#{validateId},</if>
<if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>
<if test="workorderName != null">#{workorderName},</if>
<if test="productSpc != null">#{productSpc},</if>
<if test="productName != null">#{productName},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null">#{factoryCode},</if>
</trim>
</insert>
<update id="updateMesPrepareValidate" parameterType="MesPrepareValidate">
update mes_prepare_validate
<trim prefix="SET" suffixOverrides=",">
<if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>
<if test="workorderName != null">workorder_name = #{workorderName},</if>
<if test="productSpc != null">product_spc = #{productSpc},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
</trim>
where validate_id = #{validateId}
</update>
<delete id="deleteMesPrepareValidateByValidateId" parameterType="String">
delete from mes_prepare_validate where validate_id = #{validateId}
</delete>
<delete id="deleteMesPrepareValidateByValidateIds" parameterType="String">
delete from mes_prepare_validate where validate_id in
<foreach item="validateId" collection="array" open="(" separator="," close=")">
#{validateId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,13 @@
<?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.mes.mapper.MesMapper">
<select id="getWetPlanDetail" resultType="com.op.system.api.domain.dto.WCSDataItemsDTO">
select
bucket_code loadNo
from pro_wet_material_plan_detail
where material_code = #{sku} and CONVERT(varchar(10),plan_time, 120) = CONVERT(varchar(10),#{reqTime}, 120)
</select>
</mapper>

@ -186,12 +186,9 @@ public class ProWetMaterialPlanController extends BaseController {
* @return
*/
@Log(title = "湿料计划同步", businessType = BusinessType.EXPORT)
@PostMapping("/syncWCS")
@GetMapping("/syncWCS/{id}")
@RequiresPermissions("mes:plan:add")
public AjaxResult syncWCS(@PathVariable String[] ids) {
if(ids==null||ids.length==0){
return error("没有获取到湿料计划");
}
return proWetMaterialPlanService.syncWCS(ids);
public AjaxResult syncWCS(@PathVariable String id) {
return proWetMaterialPlanService.syncWCS(id);
}
}

@ -15,6 +15,8 @@ public class WCSDTO {
private String message;
private List<WCSDataDTO> data;
public String getCode() {
return code;
}
@ -31,8 +33,6 @@ public class WCSDTO {
this.message = message;
}
private List<WCSDataDTO> data;
public String getReqCode() {
return reqCode;
}

@ -3,6 +3,7 @@ package com.op.plan.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.plan.domain.ProOrderWorkorder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@ -96,14 +97,13 @@ public interface ProOrderWorkorderMapper {
String selectEndWorkOrder(String id);
ProOrderWorkorder selectWorkOrderByCode(String workorderCode);
/**
*
**/
/**下发生产订单**/
public int downProOrderWorkorderByWorkorderIds(String[] workorderIds);
public List<ProOrderWorkorder> getWorkOrderByIds(String[] workorderIds);
String getBucketCodeByWorkId(@Param("workorderId") String workorderId);
/**
* Codelist
*

@ -3,10 +3,12 @@ package com.op.plan.mapper;
import java.util.Date;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.plan.domain.BMS;
import com.op.plan.domain.Bucket;
import com.op.plan.domain.ProWetMaterialPlan;
import com.op.plan.domain.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
@ -15,6 +17,7 @@ import org.apache.ibatis.annotations.Param;
* @author Open Platform
* @date 2023-07-24
*/
@Mapper
public interface ProWetMaterialPlanMapper {
/**
* 湿
@ -119,4 +122,5 @@ public interface ProWetMaterialPlanMapper {
* @return
*/
String selectBucketNameById(String bucketId);
}

@ -126,5 +126,5 @@ public interface IProWetMaterialPlanService {
*/
AjaxResult checkChangePlan(String id);
AjaxResult syncWCS(@PathVariable String[] ids);
AjaxResult syncWCS(@PathVariable String id);
}

@ -255,7 +255,8 @@ public class ProOrderServiceImpl implements IProOrderService {
proOrder = new ProOrder();
BeanUtils.copyProperties(sapProOrder, proOrder);
//pro_order_workorder
List<ProOrder> orderExit = proOrderMapper.selectProOrderList(proOrder);
List<ProOrderWorkorder> orderExit = proOrderWorkorderMapper.selectWorkOrderByOrderCode(proOrder.getOrderCode());
if (CollectionUtils.isEmpty(orderExit)) {//不存在就插入
proOrderMapper.insertProOrder(proOrder);
} else if ("w0".equals(orderExit.get(0).getStatus())) {

@ -64,8 +64,12 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
@Override
@DS("#header.poolName")
public List<ProOrderWorkorder> selectProOrderWorkorderList(ProOrderWorkorder proOrderWorkorder) {
return proOrderWorkorderMapper.selectProOrderWorkorderList(proOrderWorkorder);
List<ProOrderWorkorder> workorderList = proOrderWorkorderMapper.selectProOrderWorkorderList(proOrderWorkorder);
for (ProOrderWorkorder workorder : workorderList) {
// 通过设备code查询出机型名称
workorder.setProdLineCode(proOrderMapper.selectProdLineName(workorder.getProdLineCode()));
}
return workorderList;
}
/**

@ -1,9 +1,9 @@
package com.op.plan.service.impl;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils;
@ -12,9 +12,11 @@ import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.plan.domain.*;
import com.op.plan.domain.dto.WCSDTO;
import com.op.plan.domain.dto.WCSDataDTO;
import com.op.plan.domain.dto.WCSDataItemsDTO;
import com.op.plan.mapper.ProOrderWorkorderMapper;
import com.op.plan.mapper.ProWetMaterialPlanDetailMapper;
import com.op.system.api.RemoteSapService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -33,7 +35,7 @@ import static com.op.common.core.web.domain.AjaxResult.success;
/**
* 湿Service
*
* @author Open Platform
* @author zxl
* @date 2023-07-24
*/
@Service
@ -46,7 +48,7 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper;
@Value("${wcs.url1}")
public String requestMaterialLoadNoUrl;
public String materialPlanSyncUrl;
/**
* 湿
*
@ -305,21 +307,63 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
* }
*/
@Override
@DS("#header.poolName")
@Transactional(rollbackFor = Exception.class)
public AjaxResult syncWCS(@PathVariable String[] ids) {
String successid = "";
for(String id:ids){
public AjaxResult syncWCS(@PathVariable String id) {
//获取湿料计划
WCSDTO wcsdto = new WCSDTO();
wcsdto.setReqCode(id);//主计划id
wcsdto.setReqTime(DateUtils.getNowDate());
List<ProWetMaterialPlanDetail> planDetails = proWetMaterialPlanDetailMapper.selectDetailListById(id);
//罐
List<String> gList = planDetails.stream().map(ProWetMaterialPlanDetail::getBucketCode)
.distinct().collect(Collectors.toList());
//罐-料
Map<String, String> glMap = planDetails.stream()
.collect(Collectors.toMap(ProWetMaterialPlanDetail::getBucketCode,
ProWetMaterialPlanDetail::getMaterialCode, (k1, k2) -> k1));
String sendResult = HttpUtils.sendPost(requestMaterialLoadNoUrl, JSON.toJSONString(wcsdto));
WCSDTO resultdto = JSON.parseObject(sendResult,WCSDTO.class);
}
return success(successid+"同步成功");
List<WCSDataDTO> data = new ArrayList<>();
WCSDataDTO wCSDataDTO = null;
for (String g : gList) {
wCSDataDTO = new WCSDataDTO();
wCSDataDTO.setSku(glMap.get(g));//罐
wCSDataDTO.setLoadNo(g);//料
List<WCSDataItemsDTO> unLoadItems = new ArrayList<>();//上位机集合
//罐-工单
List<ProWetMaterialPlanDetail> ggList = planDetails.stream()
.filter(plan -> plan.getBucketCode().equals(g))
.collect(Collectors.toList());
WCSDataItemsDTO wCSDataItemsDTO = null;
for (ProWetMaterialPlanDetail gg : ggList) {
//根据工单查收坯机编码
String bucketCode = proOrderWorkorderMapper.getBucketCodeByWorkId(gg.getWorkorderId());
if (StringUtils.isNotBlank(bucketCode)) {
wCSDataItemsDTO = new WCSDataItemsDTO();
wCSDataItemsDTO.setUnloadNo(bucketCode);
unLoadItems.add(wCSDataItemsDTO);
}
}
wCSDataDTO.setUnLoadItems(unLoadItems);
}
wcsdto.setData(data);
try {
String sendResult = HttpUtils.sendPost(materialPlanSyncUrl, JSON.toJSONString(wcsdto));
WCSDTO resultdto = JSON.parseObject(sendResult, WCSDTO.class);
if ("1".equals(resultdto.getCode())) {
return error(resultdto.getMessage());
}
}catch (Exception e){
return error("调用接口异常");
}
ProWetMaterialPlan detail = new ProWetMaterialPlan();
detail.setId(id);
detail.setSyncFlag("Y");//已经同步的标识
proWetMaterialPlanMapper.updateProWetMaterialPlan(detail);
return success();
}
/**
@ -411,9 +455,28 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
}
public static void main(String args[]){
String s2="{\"reqTime\":\"2022-07-10 19:39:07.377\",\"reqCode\":\"dbee4f0c-ced7-463f-b19b-c83234cbd5b0\"}";
WCSDTO ps2= JSON.parseObject(s2,WCSDTO.class);
System.out.println(ps2);
List<ProWetMaterialPlanDetail> planDetails = new ArrayList<>();
ProWetMaterialPlanDetail d1=new ProWetMaterialPlanDetail();
d1.setBucketCode("LG1");
d1.setMaterialCode("WL00001");
planDetails.add(d1);
ProWetMaterialPlanDetail d2=new ProWetMaterialPlanDetail();
d2.setBucketCode("LG2");
d2.setMaterialCode("WL00002");
planDetails.add(d2);
ProWetMaterialPlanDetail d3=new ProWetMaterialPlanDetail();
d3.setBucketCode("LG1");
d3.setMaterialCode("WL00001");
planDetails.add(d3);
//罐
// List<String> gList = planDetails.stream().map(ProWetMaterialPlanDetail::getBucketCode).distinct().collect(Collectors.toList());
//
// List<ProWetMaterialPlanDetail> glList = planDetails.stream()
// .map(e -> new ProWetPlanDetailDTO(e.getBucketCode(), e.getMaterialCode()))
// .collect(Collectors.toList());
//罐-料
Map<String, String> mapStream = planDetails.stream()
.collect(Collectors.toMap(ProWetMaterialPlanDetail::getBucketCode,ProWetMaterialPlanDetail::getMaterialCode, (k1, k2) -> k1));
System.out.println(mapStream);
}
}

@ -39,7 +39,11 @@
</resultMap>
<sql id="selectProOrderWorkorderVo">
select workorder_id, workorder_code, workorder_name, order_id, order_code, product_id, product_code, product_name, product_spc, unit, quantity_produced, quantity_split, route_code, prod_line_code, product_date, shift_id, parent_order, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code , is_end from pro_order_workorder
select workorder_id, workorder_code, workorder_name, order_id, order_code, product_id, product_code, product_name,
product_spc, unit, quantity_produced, quantity_split, route_code, prod_line_code, product_date,
shift_id, parent_order, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time, prod_type, factory_code , is_end
from pro_order_workorder
</sql>
<select id="selectProOrderWorkorderList" parameterType="ProOrderWorkorder" resultMap="ProOrderWorkorderResult">
@ -115,6 +119,11 @@
#{workorderCode}
</foreach>
</select>
<select id="getBucketCodeByWorkId" resultType="java.lang.String">
select prod_line_code
from pro_order_workorder
where workorder_id = #{workorderId}
</select>
<select id="selectWorkOrderByOrderCode" resultMap="ProOrderWorkorderResult">
<include refid="selectProOrderWorkorderVo"/>

@ -33,7 +33,11 @@
</resultMap>
<sql id="selectProWetMaterialPlanDetailVo">
select id, factory_code, wet_material_plan_id, workorder_id, atrr1, atrr2, atrr3, status, create_by, create_time, update_by, update_time, bucket_id, bucket_code, material_code, material_id, material_name, product_name, shift_id, shift_code, shift_desc, plan_time from pro_wet_material_plan_detail
select id, factory_code, wet_material_plan_id, workorder_id, atrr1, atrr2, atrr3, status,
create_by, create_time, update_by, update_time, bucket_id, bucket_code,
material_code, material_id, material_name, product_name, shift_id,
shift_code, shift_desc, plan_time
from pro_wet_material_plan_detail
</sql>
<select id="selectProWetMaterialPlanDetailList" parameterType="ProWetMaterialPlanDetail" resultMap="ProWetMaterialPlanDetailResult">
@ -82,8 +86,13 @@
<include refid="selectProWetMaterialPlanDetailVo"/>
where wet_material_plan_id = #{id} and status = 'Y'
</select>
<select id="selectDetailListById" resultType="com.op.plan.domain.ProWetMaterialPlanDetail">
where wet_material_plan_id = #{id} and status = 'Y'
<select id="selectDetailListById" resultMap="ProWetMaterialPlanDetailResult">
select id, factory_code, wet_material_plan_id, workorder_id, atrr1, atrr2, atrr3, status,
create_by, create_time, update_by, update_time, bucket_id, bucket_code,
material_code, material_id, material_name, product_name, shift_id,
shift_code, shift_desc, plan_time
from pro_wet_material_plan_detail
where wet_material_plan_id = #{id}
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">

@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBMSList" resultType="com.op.plan.domain.BMS">
SELECT bucket_id AS 'bucketId', material_id AS 'materialId',shift_id AS 'shiftId'
FROM pro_wet_material_plan_detail
WHERE status = '0' AND CONVERT(date, plan_time) = #{planTime}
WHERE CONVERT(date, plan_time) = #{planTime}
GROUP BY bucket_id,material_id,shift_id
</select>
@ -172,7 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteProWetMaterialPlanById" parameterType="String">
<delete id="deleteProWetMaterialPlanById" parameterType="String">
delete from pro_wet_material_plan where id = #{id}
</delete>

@ -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.BaseBomComponent;
import com.op.wms.service.IBaseBomComponentService;
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;
/**
* BOMController
*
* @author Open Platform
* @date 2023-08-04
*/
@RestController
@RequestMapping("/bomComponent")
public class BaseBomComponentController extends BaseController {
@Autowired
private IBaseBomComponentService baseBomComponentService;
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:list")
@GetMapping("/list")
public TableDataInfo list(BaseBomComponent baseBomComponent) {
startPage();
List<BaseBomComponent> list = baseBomComponentService.selectBaseBomComponentList(baseBomComponent);
return getDataTable(list);
}
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:export")
@Log(title = "物料BOM子表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseBomComponent baseBomComponent) {
List<BaseBomComponent> list = baseBomComponentService.selectBaseBomComponentList(baseBomComponent);
ExcelUtil<BaseBomComponent> util = new ExcelUtil<BaseBomComponent>(BaseBomComponent.class);
util.exportExcel(response, list, "物料BOM子表数据");
}
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(baseBomComponentService.selectBaseBomComponentById(id));
}
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:add")
@Log(title = "物料BOM子表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseBomComponent baseBomComponent) {
return toAjax(baseBomComponentService.insertBaseBomComponent(baseBomComponent));
}
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:edit")
@Log(title = "物料BOM子表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseBomComponent baseBomComponent) {
return toAjax(baseBomComponentService.updateBaseBomComponent(baseBomComponent));
}
/**
* BOM
*/
@RequiresPermissions("wms:bomComponent:remove")
@Log(title = "物料BOM子表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(baseBomComponentService.deleteBaseBomComponentByIds(ids));
}
}

@ -1,95 +0,0 @@
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.BaseBomItemsT;
import com.op.wms.service.IBaseBomItemsTService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
/**
* BOMController
*
* @author JGY
* @date 2023-07-18
*/
@RestController
@RequestMapping("/bom")
public class BaseBomItemsTController extends BaseController {
@Autowired
private IBaseBomItemsTService baseBomItemsTService;
/**
* BOM
*/
@RequiresPermissions("wms:bom:list")
@GetMapping("/list")
public AjaxResult list(BaseBomItemsT baseBomItemsT) {
List<BaseBomItemsT> list = baseBomItemsTService.selectBaseBomItemsTList(baseBomItemsT);
return success(list);
}
/**
* BOM
*/
@RequiresPermissions("wms:bom:export")
@Log(title = "物料BOM管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseBomItemsT baseBomItemsT) {
List<BaseBomItemsT> list = baseBomItemsTService.selectBaseBomItemsTList(baseBomItemsT);
ExcelUtil<BaseBomItemsT> util = new ExcelUtil<BaseBomItemsT>(BaseBomItemsT.class);
util.exportExcel(response, list, "物料BOM管理数据");
}
/**
* BOM
*/
@RequiresPermissions("wms:bom:query")
@GetMapping(value = "/{bomItemId}")
public AjaxResult getInfo(@PathVariable("bomItemId") String bomItemId) {
return success(baseBomItemsTService.selectBaseBomItemsTByBomItemId(bomItemId));
}
/**
* BOM
*/
@RequiresPermissions("wms:bom:add")
@Log(title = "物料BOM管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseBomItemsT baseBomItemsT) {
return toAjax(baseBomItemsTService.insertBaseBomItemsT(baseBomItemsT));
}
/**
* BOM
*/
@RequiresPermissions("wms:bom:edit")
@Log(title = "物料BOM管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseBomItemsT baseBomItemsT) {
return toAjax(baseBomItemsTService.updateBaseBomItemsT(baseBomItemsT));
}
/**
* BOM
*/
@RequiresPermissions("wms:bom:remove")
@Log(title = "物料BOM管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{bomItemIds}")
public AjaxResult remove(@PathVariable String[] bomItemIds) {
return toAjax(baseBomItemsTService.deleteBaseBomItemsTByBomItemIds(bomItemIds));
}
}

@ -0,0 +1,258 @@
package com.op.wms.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* BOM base_bom_component
*
* @author Open Platform
* @date 2023-08-04
*/
public class BaseBomComponent extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** BOM单号 */
@Excel(name = "BOM单号")
private String bomCode;
/** 工厂/站点 */
@Excel(name = "工厂/站点")
private String site;
/** 物料编码 */
@Excel(name = "物料编码")
private String productCode;
/** 组件上层物料编码 */
@Excel(name = "组件上层物料编码")
private String cumc;
/** 组件编码 */
@Excel(name = "组件编码")
private String component;
/** BOM层次 */
@Excel(name = "BOM层次")
private String bomHierarchy;
/** 项目编号 */
@Excel(name = "项目编号")
private String projectNo;
/** 标准用量 */
@Excel(name = "标准用量")
private Long standardDosage;
/** 损耗率 */
@Excel(name = "损耗率")
private Long lossRate;
/** 损耗额 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "损耗额", width = 30, dateFormat = "yyyy-MM-dd")
private Date lossAmount;
/** 含损耗用量 */
@Excel(name = "含损耗用量")
private Long cilosses;
/** 组件数量单位 */
@Excel(name = "组件数量单位")
private String componentUnit;
/** 组件采购标志 */
@Excel(name = "组件采购标志")
private String componentProFlag;
/** 物料供应标识 */
@Excel(name = "物料供应标识")
private String msi;
/** 成本核算标识相关 */
@Excel(name = "成本核算标识相关")
private String sanka;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
public String getBomCode() {
return bomCode;
}
public void setSite(String site) {
this.site = site;
}
public String getSite() {
return site;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductCode() {
return productCode;
}
public void setCumc(String cumc) {
this.cumc = cumc;
}
public String getCumc() {
return cumc;
}
public void setComponent(String component) {
this.component = component;
}
public String getComponent() {
return component;
}
public void setBomHierarchy(String bomHierarchy) {
this.bomHierarchy = bomHierarchy;
}
public String getBomHierarchy() {
return bomHierarchy;
}
public void setProjectNo(String projectNo) {
this.projectNo = projectNo;
}
public String getProjectNo() {
return projectNo;
}
public void setStandardDosage(Long standardDosage) {
this.standardDosage = standardDosage;
}
public Long getStandardDosage() {
return standardDosage;
}
public void setLossRate(Long lossRate) {
this.lossRate = lossRate;
}
public Long getLossRate() {
return lossRate;
}
public void setLossAmount(Date lossAmount) {
this.lossAmount = lossAmount;
}
public Date getLossAmount() {
return lossAmount;
}
public void setCilosses(Long cilosses) {
this.cilosses = cilosses;
}
public Long getCilosses() {
return cilosses;
}
public void setComponentUnit(String componentUnit) {
this.componentUnit = componentUnit;
}
public String getComponentUnit() {
return componentUnit;
}
public void setComponentProFlag(String componentProFlag) {
this.componentProFlag = componentProFlag;
}
public String getComponentProFlag() {
return componentProFlag;
}
public void setMsi(String msi) {
this.msi = msi;
}
public String getMsi() {
return msi;
}
public void setSanka(String sanka) {
this.sanka = sanka;
}
public String getSanka() {
return sanka;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("bomCode", getBomCode())
.append("site", getSite())
.append("productCode", getProductCode())
.append("cumc", getCumc())
.append("component", getComponent())
.append("bomHierarchy", getBomHierarchy())
.append("projectNo", getProjectNo())
.append("standardDosage", getStandardDosage())
.append("lossRate", getLossRate())
.append("lossAmount", getLossAmount())
.append("cilosses", getCilosses())
.append("componentUnit", getComponentUnit())
.append("componentProFlag", getComponentProFlag())
.append("msi", getMsi())
.append("sanka", getSanka())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -1,278 +0,0 @@
package com.op.wms.domain;
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.TreeEntity;
/**
* BOM base_bom_items_t
*
* @author Open Platform
* @date 2023-07-18
*/
public class BaseBomItemsT extends TreeEntity {
private static final long serialVersionUID = 1L;
/** BOM配方组成主键 */
private String bomItemId;
/** BOM配方组成描述 */
@Excel(name = "BOM配方组成描述")
private String bomItemDesc;
/** BOM配方组成序号 */
@Excel(name = "BOM配方组成序号")
private Long bomFormulationOrder;
/** BOM配方主键 */
@Excel(name = "BOM配方主键")
private String bomFormulationId;
/** 产品主键 */
@Excel(name = "产品主键")
private String prodId;
/** 数量 */
@Excel(name = "数量")
private Long Quantity;
/** 精度 */
@Excel(name = "精度")
private Long Precision;
/** 计量单位主键 */
@Excel(name = "计量单位主键")
private String euId;
/** 最低偏差 */
@Excel(name = "最低偏差")
private Long lowerTolerance;
/** 最低偏差精度 */
@Excel(name = "最低偏差精度")
private Long lowerTolerancePrecision;
/** 最高偏差 */
@Excel(name = "最高偏差")
private Long upperTolerance;
/** 最高偏差精度 */
@Excel(name = "最高偏差精度")
private Long upperTolerancePrecision;
/** 可用标识 */
@Excel(name = "可用标识")
private String Active;
/** 工厂主键 */
@Excel(name = "工厂主键")
private String siteId;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String siteCode;
/** 企业主键 */
@Excel(name = "企业主键")
private String enterpriseId;
/** 企业编码 */
@Excel(name = "企业编码")
private String enterpriseCode;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String FactoryNo;
/** 采购类型 */
@Excel(name = "采购类型")
private String BESKZ;
/** 特殊采购类型 */
@Excel(name = "特殊采购类型")
private String SOBSL;
/** 层级 */
@Excel(name = "层级")
private String STUFE;
public void setBomItemId(String bomItemId) {
this.bomItemId = bomItemId;
}
public String getBomItemId() {
return bomItemId;
}
public void setBomItemDesc(String bomItemDesc) {
this.bomItemDesc = bomItemDesc;
}
public String getBomItemDesc() {
return bomItemDesc;
}
public void setBomFormulationOrder(Long bomFormulationOrder) {
this.bomFormulationOrder = bomFormulationOrder;
}
public Long getBomFormulationOrder() {
return bomFormulationOrder;
}
public void setBomFormulationId(String bomFormulationId) {
this.bomFormulationId = bomFormulationId;
}
public String getBomFormulationId() {
return bomFormulationId;
}
public void setProdId(String prodId) {
this.prodId = prodId;
}
public String getProdId() {
return prodId;
}
public void setQuantity(Long Quantity) {
this.Quantity = Quantity;
}
public Long getQuantity() {
return Quantity;
}
public void setPrecision(Long Precision) {
this.Precision = Precision;
}
public Long getPrecision() {
return Precision;
}
public void setEuId(String euId) {
this.euId = euId;
}
public String getEuId() {
return euId;
}
public void setLowerTolerance(Long lowerTolerance) {
this.lowerTolerance = lowerTolerance;
}
public Long getLowerTolerance() {
return lowerTolerance;
}
public void setLowerTolerancePrecision(Long lowerTolerancePrecision) {
this.lowerTolerancePrecision = lowerTolerancePrecision;
}
public Long getLowerTolerancePrecision() {
return lowerTolerancePrecision;
}
public void setUpperTolerance(Long upperTolerance) {
this.upperTolerance = upperTolerance;
}
public Long getUpperTolerance() {
return upperTolerance;
}
public void setUpperTolerancePrecision(Long upperTolerancePrecision) {
this.upperTolerancePrecision = upperTolerancePrecision;
}
public Long getUpperTolerancePrecision() {
return upperTolerancePrecision;
}
public void setActive(String Active) {
this.Active = Active;
}
public String getActive() {
return Active;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getSiteId() {
return siteId;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getSiteCode() {
return siteCode;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setFactoryNo(String FactoryNo) {
this.FactoryNo = FactoryNo;
}
public String getFactoryNo() {
return FactoryNo;
}
public void setBESKZ(String BESKZ) {
this.BESKZ = BESKZ;
}
public String getBESKZ() {
return BESKZ;
}
public void setSOBSL(String SOBSL) {
this.SOBSL = SOBSL;
}
public String getSOBSL() {
return SOBSL;
}
public void setSTUFE(String STUFE) {
this.STUFE = STUFE;
}
public String getSTUFE() {
return STUFE;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("bomItemId", getBomItemId())
.append("bomItemDesc", getBomItemDesc())
.append("bomFormulationOrder", getBomFormulationOrder())
.append("bomFormulationId", getBomFormulationId())
.append("prodId", getProdId())
.append("Quantity", getQuantity())
.append("Precision", getPrecision())
.append("euId", getEuId())
.append("lowerTolerance", getLowerTolerance())
.append("lowerTolerancePrecision", getLowerTolerancePrecision())
.append("upperTolerance", getUpperTolerance())
.append("upperTolerancePrecision", getUpperTolerancePrecision())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("Active", getActive())
.append("siteId", getSiteId())
.append("siteCode", getSiteCode())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseCode", getEnterpriseCode())
.append("FactoryNo", getFactoryNo())
.append("BESKZ", getBESKZ())
.append("SOBSL", getSOBSL())
.append("STUFE", getSTUFE())
.toString();
}
}

@ -0,0 +1,61 @@
package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.BaseBomComponent;
/**
* BOMMapper
*
* @author Open Platform
* @date 2023-08-04
*/
public interface BaseBomComponentMapper {
/**
* BOM
*
* @param id BOM
* @return BOM
*/
public BaseBomComponent selectBaseBomComponentById(Long id);
/**
* BOM
*
* @param baseBomComponent BOM
* @return BOM
*/
public List<BaseBomComponent> selectBaseBomComponentList(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
public int insertBaseBomComponent(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
public int updateBaseBomComponent(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param id BOM
* @return
*/
public int deleteBaseBomComponentById(Long id);
/**
* BOM
*
* @param ids
* @return
*/
public int deleteBaseBomComponentByIds(Long[] ids);
}

@ -1,61 +0,0 @@
package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.BaseBomItemsT;
/**
* BOMMapper
*
* @author Open Platform
* @date 2023-07-18
*/
public interface BaseBomItemsTMapper {
/**
* BOM
*
* @param bomItemId BOM
* @return BOM
*/
public BaseBomItemsT selectBaseBomItemsTByBomItemId(String bomItemId);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return BOM
*/
public List<BaseBomItemsT> selectBaseBomItemsTList(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
public int insertBaseBomItemsT(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
public int updateBaseBomItemsT(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param bomItemId BOM
* @return
*/
public int deleteBaseBomItemsTByBomItemId(String bomItemId);
/**
* BOM
*
* @param bomItemIds
* @return
*/
public int deleteBaseBomItemsTByBomItemIds(String[] bomItemIds);
}

@ -0,0 +1,60 @@
package com.op.wms.service;
import java.util.List;
import com.op.wms.domain.BaseBomComponent;
/**
* BOMService
*
* @author Open Platform
* @date 2023-08-04
*/
public interface IBaseBomComponentService {
/**
* BOM
*
* @param id BOM
* @return BOM
*/
public BaseBomComponent selectBaseBomComponentById(Long id);
/**
* BOM
*
* @param baseBomComponent BOM
* @return BOM
*/
public List<BaseBomComponent> selectBaseBomComponentList(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
public int insertBaseBomComponent(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
public int updateBaseBomComponent(BaseBomComponent baseBomComponent);
/**
* BOM
*
* @param ids BOM
* @return
*/
public int deleteBaseBomComponentByIds(Long[] ids);
/**
* BOM
*
* @param id BOM
* @return
*/
public int deleteBaseBomComponentById(Long id);
}

@ -1,60 +0,0 @@
package com.op.wms.service;
import java.util.List;
import com.op.wms.domain.BaseBomItemsT;
/**
* BOMService
*
* @author Open Platform
* @date 2023-07-18
*/
public interface IBaseBomItemsTService {
/**
* BOM
*
* @param bomItemId BOM
* @return BOM
*/
public BaseBomItemsT selectBaseBomItemsTByBomItemId(String bomItemId);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return BOM
*/
public List<BaseBomItemsT> selectBaseBomItemsTList(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
public int insertBaseBomItemsT(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
public int updateBaseBomItemsT(BaseBomItemsT baseBomItemsT);
/**
* BOM
*
* @param bomItemIds BOM
* @return
*/
public int deleteBaseBomItemsTByBomItemIds(String[] bomItemIds);
/**
* BOM
*
* @param bomItemId BOM
* @return
*/
public int deleteBaseBomItemsTByBomItemId(String bomItemId);
}

@ -0,0 +1,89 @@
package com.op.wms.service.impl;
import java.util.List;
import com.op.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.BaseBomComponentMapper;
import com.op.wms.domain.BaseBomComponent;
import com.op.wms.service.IBaseBomComponentService;
/**
* BOMService
*
* @author Open Platform
* @date 2023-08-04
*/
@Service
public class BaseBomComponentServiceImpl implements IBaseBomComponentService {
@Autowired
private BaseBomComponentMapper baseBomComponentMapper;
/**
* BOM
*
* @param id BOM
* @return BOM
*/
@Override
public BaseBomComponent selectBaseBomComponentById(Long id) {
return baseBomComponentMapper.selectBaseBomComponentById(id);
}
/**
* BOM
*
* @param baseBomComponent BOM
* @return BOM
*/
@Override
public List<BaseBomComponent> selectBaseBomComponentList(BaseBomComponent baseBomComponent) {
return baseBomComponentMapper.selectBaseBomComponentList(baseBomComponent);
}
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
@Override
public int insertBaseBomComponent(BaseBomComponent baseBomComponent) {
baseBomComponent.setCreateTime(DateUtils.getNowDate());
return baseBomComponentMapper.insertBaseBomComponent(baseBomComponent);
}
/**
* BOM
*
* @param baseBomComponent BOM
* @return
*/
@Override
public int updateBaseBomComponent(BaseBomComponent baseBomComponent) {
baseBomComponent.setUpdateTime(DateUtils.getNowDate());
return baseBomComponentMapper.updateBaseBomComponent(baseBomComponent);
}
/**
* BOM
*
* @param ids BOM
* @return
*/
@Override
public int deleteBaseBomComponentByIds(Long[] ids) {
return baseBomComponentMapper.deleteBaseBomComponentByIds(ids);
}
/**
* BOM
*
* @param id BOM
* @return
*/
@Override
public int deleteBaseBomComponentById(Long id) {
return baseBomComponentMapper.deleteBaseBomComponentById(id);
}
}

@ -1,100 +0,0 @@
package com.op.wms.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.BaseBomItemsTMapper;
import com.op.wms.domain.BaseBomItemsT;
import com.op.wms.service.IBaseBomItemsTService;
/**
* BOMService
*
* @author Open Platform
* @date 2023-07-18
*/
@Service
public class BaseBomItemsTServiceImpl implements IBaseBomItemsTService {
@Autowired
private BaseBomItemsTMapper baseBomItemsTMapper;
/**
* BOM
*
* @param bomItemId BOM
* @return BOM
*/
@Override
@DS("#header.poolName")
public BaseBomItemsT selectBaseBomItemsTByBomItemId(String bomItemId) {
return baseBomItemsTMapper.selectBaseBomItemsTByBomItemId(bomItemId);
}
/**
* BOM
*
* @param baseBomItemsT BOM
* @return BOM
*/
@Override
@DS("#header.poolName")
public List<BaseBomItemsT> selectBaseBomItemsTList(BaseBomItemsT baseBomItemsT) {
return baseBomItemsTMapper.selectBaseBomItemsTList(baseBomItemsT);
}
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
@Override
@DS("#header.poolName")
public int insertBaseBomItemsT(BaseBomItemsT baseBomItemsT) {
baseBomItemsT.setCreateTime(DateUtils.getNowDate());
baseBomItemsT.setCreateBy(SecurityUtils.getUsername());
return baseBomItemsTMapper.insertBaseBomItemsT(baseBomItemsT);
}
/**
* BOM
*
* @param baseBomItemsT BOM
* @return
*/
@Override
@DS("#header.poolName")
public int updateBaseBomItemsT(BaseBomItemsT baseBomItemsT) {
baseBomItemsT.setUpdateTime(DateUtils.getNowDate());
baseBomItemsT.setUpdateBy(SecurityUtils.getUsername());
return baseBomItemsTMapper.updateBaseBomItemsT(baseBomItemsT);
}
/**
* BOM
*
* @param bomItemIds BOM
* @return
*/
@Override
@DS("#header.poolName")
public int deleteBaseBomItemsTByBomItemIds(String[] bomItemIds) {
return baseBomItemsTMapper.deleteBaseBomItemsTByBomItemIds(bomItemIds);
}
/**
* BOM
*
* @param bomItemId BOM
* @return
*/
@Override
@DS("#header.poolName")
public int deleteBaseBomItemsTByBomItemId(String bomItemId) {
return baseBomItemsTMapper.deleteBaseBomItemsTByBomItemId(bomItemId);
}
}

@ -0,0 +1,163 @@
<?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.BaseBomComponentMapper">
<resultMap type="BaseBomComponent" id="BaseBomComponentResult">
<result property="id" column="id" />
<result property="bomCode" column="bom_code" />
<result property="site" column="site" />
<result property="productCode" column="product_code" />
<result property="cumc" column="cumc" />
<result property="component" column="component" />
<result property="bomHierarchy" column="bom_hierarchy" />
<result property="projectNo" column="project_no" />
<result property="standardDosage" column="standard_dosage" />
<result property="lossRate" column="loss_rate" />
<result property="lossAmount" column="loss_amount" />
<result property="cilosses" column="cilosses" />
<result property="componentUnit" column="component_unit" />
<result property="componentProFlag" column="component_pro_flag" />
<result property="msi" column="msi" />
<result property="sanka" column="sanka" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBaseBomComponentVo">
select id, bom_code, site, product_code, cumc, component, bom_hierarchy, project_no, standard_dosage, loss_rate, loss_amount, cilosses, component_unit, component_pro_flag, msi, sanka, attr1, attr2, attr3, create_by, create_time, update_by, update_time, remark from base_bom_component
</sql>
<select id="selectBaseBomComponentList" parameterType="BaseBomComponent" resultMap="BaseBomComponentResult">
<include refid="selectBaseBomComponentVo"/>
<where>
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
<if test="site != null and site != ''"> and site = #{site}</if>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="cumc != null and cumc != ''"> and cumc = #{cumc}</if>
<if test="component != null and component != ''"> and component = #{component}</if>
<if test="bomHierarchy != null and bomHierarchy != ''"> and bom_hierarchy = #{bomHierarchy}</if>
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
<if test="standardDosage != null "> and standard_dosage = #{standardDosage}</if>
<if test="lossRate != null "> and loss_rate = #{lossRate}</if>
<if test="lossAmount != null "> and loss_amount = #{lossAmount}</if>
<if test="cilosses != null "> and cilosses = #{cilosses}</if>
<if test="componentUnit != null and componentUnit != ''"> and component_unit = #{componentUnit}</if>
<if test="componentProFlag != null and componentProFlag != ''"> and component_pro_flag = #{componentProFlag}</if>
<if test="msi != null and msi != ''"> and msi = #{msi}</if>
<if test="sanka != null and sanka != ''"> and sanka = #{sanka}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
</where>
</select>
<select id="selectBaseBomComponentById" parameterType="Long" resultMap="BaseBomComponentResult">
<include refid="selectBaseBomComponentVo"/>
where id = #{id}
</select>
<insert id="insertBaseBomComponent" parameterType="BaseBomComponent">
insert into base_bom_component
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="bomCode != null and bomCode != ''">bom_code,</if>
<if test="site != null">site,</if>
<if test="productCode != null">product_code,</if>
<if test="cumc != null">cumc,</if>
<if test="component != null">component,</if>
<if test="bomHierarchy != null">bom_hierarchy,</if>
<if test="projectNo != null">project_no,</if>
<if test="standardDosage != null">standard_dosage,</if>
<if test="lossRate != null">loss_rate,</if>
<if test="lossAmount != null">loss_amount,</if>
<if test="cilosses != null">cilosses,</if>
<if test="componentUnit != null">component_unit,</if>
<if test="componentProFlag != null">component_pro_flag,</if>
<if test="msi != null">msi,</if>
<if test="sanka != null">sanka,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="bomCode != null and bomCode != ''">#{bomCode},</if>
<if test="site != null">#{site},</if>
<if test="productCode != null">#{productCode},</if>
<if test="cumc != null">#{cumc},</if>
<if test="component != null">#{component},</if>
<if test="bomHierarchy != null">#{bomHierarchy},</if>
<if test="projectNo != null">#{projectNo},</if>
<if test="standardDosage != null">#{standardDosage},</if>
<if test="lossRate != null">#{lossRate},</if>
<if test="lossAmount != null">#{lossAmount},</if>
<if test="cilosses != null">#{cilosses},</if>
<if test="componentUnit != null">#{componentUnit},</if>
<if test="componentProFlag != null">#{componentProFlag},</if>
<if test="msi != null">#{msi},</if>
<if test="sanka != null">#{sanka},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBaseBomComponent" parameterType="BaseBomComponent">
update base_bom_component
<trim prefix="SET" suffixOverrides=",">
<if test="bomCode != null and bomCode != ''">bom_code = #{bomCode},</if>
<if test="site != null">site = #{site},</if>
<if test="productCode != null">product_code = #{productCode},</if>
<if test="cumc != null">cumc = #{cumc},</if>
<if test="component != null">component = #{component},</if>
<if test="bomHierarchy != null">bom_hierarchy = #{bomHierarchy},</if>
<if test="projectNo != null">project_no = #{projectNo},</if>
<if test="standardDosage != null">standard_dosage = #{standardDosage},</if>
<if test="lossRate != null">loss_rate = #{lossRate},</if>
<if test="lossAmount != null">loss_amount = #{lossAmount},</if>
<if test="cilosses != null">cilosses = #{cilosses},</if>
<if test="componentUnit != null">component_unit = #{componentUnit},</if>
<if test="componentProFlag != null">component_pro_flag = #{componentProFlag},</if>
<if test="msi != null">msi = #{msi},</if>
<if test="sanka != null">sanka = #{sanka},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseBomComponentById" parameterType="Long">
delete from base_bom_component where id = #{id}
</delete>
<delete id="deleteBaseBomComponentByIds" parameterType="String">
delete from base_bom_component where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,169 +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="com.op.wms.mapper.BaseBomItemsTMapper">
<resultMap type="BaseBomItemsT" id="BaseBomItemsTResult">
<result property="bomItemId" column="BOM_Item_Id" />
<result property="bomItemDesc" column="BOM_Item_Desc" />
<result property="bomFormulationOrder" column="BOM_Formulation_Order" />
<result property="bomFormulationId" column="Bom_Formulation_Id" />
<result property="prodId" column="Prod_Id" />
<result property="Quantity" column="Quantity" />
<result property="Precision" column="Precision" />
<result property="euId" column="EU_Id" />
<result property="lowerTolerance" column="Lower_Tolerance" />
<result property="lowerTolerancePrecision" column="Lower_Tolerance_Precision" />
<result property="upperTolerance" column="Upper_Tolerance" />
<result property="upperTolerancePrecision" column="Upper_Tolerance_Precision" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="Active" column="Active" />
<result property="siteId" column="Site_id" />
<result property="siteCode" column="Site_code" />
<result property="enterpriseId" column="Enterprise_Id" />
<result property="enterpriseCode" column="Enterprise_Code" />
<result property="FactoryNo" column="FactoryNo" />
<result property="BESKZ" column="BESKZ" />
<result property="SOBSL" column="SOBSL" />
<result property="STUFE" column="STUFE" />
</resultMap>
<sql id="selectBaseBomItemsTVo">
select BOM_Item_Id, BOM_Item_Desc, BOM_Formulation_Order, Bom_Formulation_Id, Prod_Id, Quantity, Precision, EU_Id, Lower_Tolerance, Lower_Tolerance_Precision, Upper_Tolerance, Upper_Tolerance_Precision, create_by, create_time, update_by, update_time, Active, Site_id, Site_code, Enterprise_Id, Enterprise_Code, FactoryNo, BESKZ, SOBSL, STUFE from base_bom_items_t
</sql>
<select id="selectBaseBomItemsTList" parameterType="BaseBomItemsT" resultMap="BaseBomItemsTResult">
<include refid="selectBaseBomItemsTVo"/>
<where>
<if test="bomItemDesc != null and bomItemDesc != ''"> and BOM_Item_Desc = #{bomItemDesc}</if>
<if test="bomFormulationOrder != null "> and BOM_Formulation_Order = #{bomFormulationOrder}</if>
<if test="bomFormulationId != null and bomFormulationId != ''"> and Bom_Formulation_Id = #{bomFormulationId}</if>
<if test="prodId != null and prodId != ''"> and Prod_Id = #{prodId}</if>
<if test="Quantity != null "> and Quantity = #{Quantity}</if>
<if test="Precision != null "> and Precision = #{Precision}</if>
<if test="euId != null and euId != ''"> and EU_Id = #{euId}</if>
<if test="lowerTolerance != null "> and Lower_Tolerance = #{lowerTolerance}</if>
<if test="lowerTolerancePrecision != null "> and Lower_Tolerance_Precision = #{lowerTolerancePrecision}</if>
<if test="upperTolerance != null "> and Upper_Tolerance = #{upperTolerance}</if>
<if test="upperTolerancePrecision != null "> and Upper_Tolerance_Precision = #{upperTolerancePrecision}</if>
<if test="Active != null and Active != ''"> and Active = #{Active}</if>
<if test="siteId != null and siteId != ''"> and Site_id = #{siteId}</if>
<if test="siteCode != null and siteCode != ''"> and Site_code = #{siteCode}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and Enterprise_Id = #{enterpriseId}</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and Enterprise_Code = #{enterpriseCode}</if>
<if test="FactoryNo != null and FactoryNo != ''"> and FactoryNo = #{FactoryNo}</if>
<if test="BESKZ != null and BESKZ != ''"> and BESKZ = #{BESKZ}</if>
<if test="SOBSL != null and SOBSL != ''"> and SOBSL = #{SOBSL}</if>
<if test="STUFE != null and STUFE != ''"> and STUFE = #{STUFE}</if>
</where>
</select>
<select id="selectBaseBomItemsTByBomItemId" parameterType="String" resultMap="BaseBomItemsTResult">
<include refid="selectBaseBomItemsTVo"/>
where BOM_Item_Id = #{bomItemId}
</select>
<insert id="insertBaseBomItemsT" parameterType="BaseBomItemsT">
insert into base_bom_items_t
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bomItemId != null">BOM_Item_Id,</if>
<if test="bomItemDesc != null">BOM_Item_Desc,</if>
<if test="bomFormulationOrder != null">BOM_Formulation_Order,</if>
<if test="bomFormulationId != null">Bom_Formulation_Id,</if>
<if test="prodId != null">Prod_Id,</if>
<if test="Quantity != null">Quantity,</if>
<if test="Precision != null">Precision,</if>
<if test="euId != null">EU_Id,</if>
<if test="lowerTolerance != null">Lower_Tolerance,</if>
<if test="lowerTolerancePrecision != null">Lower_Tolerance_Precision,</if>
<if test="upperTolerance != null">Upper_Tolerance,</if>
<if test="upperTolerancePrecision != null">Upper_Tolerance_Precision,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="Active != null">Active,</if>
<if test="siteId != null">Site_id,</if>
<if test="siteCode != null">Site_code,</if>
<if test="enterpriseId != null">Enterprise_Id,</if>
<if test="enterpriseCode != null">Enterprise_Code,</if>
<if test="FactoryNo != null">FactoryNo,</if>
<if test="BESKZ != null">BESKZ,</if>
<if test="SOBSL != null">SOBSL,</if>
<if test="STUFE != null">STUFE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bomItemId != null">#{bomItemId},</if>
<if test="bomItemDesc != null">#{bomItemDesc},</if>
<if test="bomFormulationOrder != null">#{bomFormulationOrder},</if>
<if test="bomFormulationId != null">#{bomFormulationId},</if>
<if test="prodId != null">#{prodId},</if>
<if test="Quantity != null">#{Quantity},</if>
<if test="Precision != null">#{Precision},</if>
<if test="euId != null">#{euId},</if>
<if test="lowerTolerance != null">#{lowerTolerance},</if>
<if test="lowerTolerancePrecision != null">#{lowerTolerancePrecision},</if>
<if test="upperTolerance != null">#{upperTolerance},</if>
<if test="upperTolerancePrecision != null">#{upperTolerancePrecision},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="Active != null">#{Active},</if>
<if test="siteId != null">#{siteId},</if>
<if test="siteCode != null">#{siteCode},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="FactoryNo != null">#{FactoryNo},</if>
<if test="BESKZ != null">#{BESKZ},</if>
<if test="SOBSL != null">#{SOBSL},</if>
<if test="STUFE != null">#{STUFE},</if>
</trim>
</insert>
<update id="updateBaseBomItemsT" parameterType="BaseBomItemsT">
update base_bom_items_t
<trim prefix="SET" suffixOverrides=",">
<if test="bomItemDesc != null">BOM_Item_Desc = #{bomItemDesc},</if>
<if test="bomFormulationOrder != null">BOM_Formulation_Order = #{bomFormulationOrder},</if>
<if test="bomFormulationId != null">Bom_Formulation_Id = #{bomFormulationId},</if>
<if test="prodId != null">Prod_Id = #{prodId},</if>
<if test="Quantity != null">Quantity = #{Quantity},</if>
<if test="Precision != null">Precision = #{Precision},</if>
<if test="euId != null">EU_Id = #{euId},</if>
<if test="lowerTolerance != null">Lower_Tolerance = #{lowerTolerance},</if>
<if test="lowerTolerancePrecision != null">Lower_Tolerance_Precision = #{lowerTolerancePrecision},</if>
<if test="upperTolerance != null">Upper_Tolerance = #{upperTolerance},</if>
<if test="upperTolerancePrecision != null">Upper_Tolerance_Precision = #{upperTolerancePrecision},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="Active != null">Active = #{Active},</if>
<if test="siteId != null">Site_id = #{siteId},</if>
<if test="siteCode != null">Site_code = #{siteCode},</if>
<if test="enterpriseId != null">Enterprise_Id = #{enterpriseId},</if>
<if test="enterpriseCode != null">Enterprise_Code = #{enterpriseCode},</if>
<if test="FactoryNo != null">FactoryNo = #{FactoryNo},</if>
<if test="BESKZ != null">BESKZ = #{BESKZ},</if>
<if test="SOBSL != null">SOBSL = #{SOBSL},</if>
<if test="STUFE != null">STUFE = #{STUFE},</if>
</trim>
where BOM_Item_Id = #{bomItemId}
</update>
<delete id="deleteBaseBomItemsTByBomItemId" parameterType="String">
delete from base_bom_items_t where BOM_Item_Id = #{bomItemId}
</delete>
<delete id="deleteBaseBomItemsTByBomItemIds" parameterType="String">
delete from base_bom_items_t where BOM_Item_Id in
<foreach item="bomItemId" collection="array" open="(" separator="," close=")">
#{bomItemId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save