Merge branch 'lanju'
commit
9cb538d93a
@ -0,0 +1,11 @@
|
||||
#for test only!
|
||||
#Mon Nov 06 18:11:07 CST 2023
|
||||
jco.destination.pool_capacity=true
|
||||
jco.client.lang=zh
|
||||
jco.client.ashost=192.168.0.54
|
||||
jco.client.saprouter=
|
||||
jco.client.user=MES
|
||||
jco.client.sysnr=0
|
||||
jco.destination.peak_limit=20
|
||||
jco.client.passwd=123456
|
||||
jco.client.client=800
|
@ -0,0 +1,374 @@
|
||||
package com.op.system.api.domain.dto.quality;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 来料检验对象 qc_check_task_income
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-19
|
||||
*/
|
||||
public class QcCheckTaskIncomeDto extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String recordId;
|
||||
|
||||
/** 检验任务编号 */
|
||||
@Excel(name = "检验任务编号")
|
||||
private String checkNo;
|
||||
|
||||
/** 来料批次号 */
|
||||
@Excel(name = "来料批次号")
|
||||
private String incomeBatchNo;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String materialCode;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 收货数量 */
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal quality;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/** 来料时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "来料时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date incomeTime;
|
||||
|
||||
/** 检测地点 */
|
||||
@Excel(name = "检测地点")
|
||||
private String checkLoc;
|
||||
|
||||
/** 检测状态 */
|
||||
@Excel(name = "检测状态")
|
||||
private String checkStatus;
|
||||
|
||||
/** 检测人工号 */
|
||||
@Excel(name = "检测人工号")
|
||||
private String checkManCode;
|
||||
|
||||
/** 检测人姓名 */
|
||||
@Excel(name = "检测人姓名")
|
||||
private String checkManName;
|
||||
|
||||
/** 检验时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkTime;
|
||||
|
||||
/** 检验结果Y合格 */
|
||||
@Excel(name = "检验结果Y合格")
|
||||
private String checkResult;
|
||||
|
||||
/** 是否启用1启用0停用 */
|
||||
@Excel(name = "是否启用1启用0停用")
|
||||
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;
|
||||
|
||||
/** 删除标识1删除0正常 */
|
||||
private String delFlag;
|
||||
|
||||
private String incomeTimeStart;
|
||||
private String incomeTimeEnd;
|
||||
private String checkTimeStart;
|
||||
private String checkTimeEnd;
|
||||
private String typeCode;
|
||||
private String checkType;
|
||||
|
||||
public String getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public void setCheckType(String checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getIncomeTimeStart() {
|
||||
return incomeTimeStart;
|
||||
}
|
||||
|
||||
public void setIncomeTimeStart(String incomeTimeStart) {
|
||||
this.incomeTimeStart = incomeTimeStart;
|
||||
}
|
||||
|
||||
public String getIncomeTimeEnd() {
|
||||
return incomeTimeEnd;
|
||||
}
|
||||
|
||||
public void setIncomeTimeEnd(String incomeTimeEnd) {
|
||||
this.incomeTimeEnd = incomeTimeEnd;
|
||||
}
|
||||
|
||||
public String getCheckTimeStart() {
|
||||
return checkTimeStart;
|
||||
}
|
||||
|
||||
public void setCheckTimeStart(String checkTimeStart) {
|
||||
this.checkTimeStart = checkTimeStart;
|
||||
}
|
||||
|
||||
public String getCheckTimeEnd() {
|
||||
return checkTimeEnd;
|
||||
}
|
||||
|
||||
public void setCheckTimeEnd(String checkTimeEnd) {
|
||||
this.checkTimeEnd = checkTimeEnd;
|
||||
}
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
public void setCheckNo(String checkNo) {
|
||||
this.checkNo = checkNo;
|
||||
}
|
||||
|
||||
public String getCheckNo() {
|
||||
return checkNo;
|
||||
}
|
||||
public void setIncomeBatchNo(String incomeBatchNo) {
|
||||
this.incomeBatchNo = incomeBatchNo;
|
||||
}
|
||||
|
||||
public String getIncomeBatchNo() {
|
||||
return incomeBatchNo;
|
||||
}
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
public void setQuality(BigDecimal quality) {
|
||||
this.quality = quality;
|
||||
}
|
||||
|
||||
public BigDecimal getQuality() {
|
||||
return quality;
|
||||
}
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
public void setSupplierCode(String supplierCode) {
|
||||
this.supplierCode = supplierCode;
|
||||
}
|
||||
|
||||
public String getSupplierCode() {
|
||||
return supplierCode;
|
||||
}
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
public void setIncomeTime(Date incomeTime) {
|
||||
this.incomeTime = incomeTime;
|
||||
}
|
||||
|
||||
public Date getIncomeTime() {
|
||||
return incomeTime;
|
||||
}
|
||||
public void setCheckLoc(String checkLoc) {
|
||||
this.checkLoc = checkLoc;
|
||||
}
|
||||
|
||||
public String getCheckLoc() {
|
||||
return checkLoc;
|
||||
}
|
||||
public void setCheckStatus(String checkStatus) {
|
||||
this.checkStatus = checkStatus;
|
||||
}
|
||||
|
||||
public String getCheckStatus() {
|
||||
return checkStatus;
|
||||
}
|
||||
public void setCheckManCode(String checkManCode) {
|
||||
this.checkManCode = checkManCode;
|
||||
}
|
||||
|
||||
public String getCheckManCode() {
|
||||
return checkManCode;
|
||||
}
|
||||
public void setCheckManName(String checkManName) {
|
||||
this.checkManName = checkManName;
|
||||
}
|
||||
|
||||
public String getCheckManName() {
|
||||
return checkManName;
|
||||
}
|
||||
public void setCheckTime(Date checkTime) {
|
||||
this.checkTime = checkTime;
|
||||
}
|
||||
|
||||
public Date getCheckTime() {
|
||||
return checkTime;
|
||||
}
|
||||
public void setCheckResult(String checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
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;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("checkNo", getCheckNo())
|
||||
.append("incomeBatchNo", getIncomeBatchNo())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quality", getQuality())
|
||||
.append("unit", getUnit())
|
||||
.append("supplierCode", getSupplierCode())
|
||||
.append("supplierName", getSupplierName())
|
||||
.append("incomeTime", getIncomeTime())
|
||||
.append("checkLoc", getCheckLoc())
|
||||
.append("checkStatus", getCheckStatus())
|
||||
.append("checkManCode", getCheckManCode())
|
||||
.append("checkManName", getCheckManName())
|
||||
.append("checkTime", getCheckTime())
|
||||
.append("checkResult", getCheckResult())
|
||||
.append("status", getStatus())
|
||||
.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("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.device.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.device.domain.SparePartsInStorage;
|
||||
import com.op.device.service.ISparePartsInOutStorageService;
|
||||
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-10-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sparepartsInOutStorage")
|
||||
public class SparePartsInOutStorageController extends BaseController {
|
||||
@Autowired
|
||||
private ISparePartsInOutStorageService sparePartsInOutStorageService;
|
||||
|
||||
/**
|
||||
* 查询备品备件出入库列表
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SparePartsInStorage sparePartsInStorage) {
|
||||
startPage();
|
||||
List<SparePartsInStorage> list = sparePartsInOutStorageService.selectSparePartsInStorageList(sparePartsInStorage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出备品备件出入库列表
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:export")
|
||||
@Log(title = "备品备件出入库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SparePartsInStorage sparePartsInStorage) {
|
||||
List<SparePartsInStorage> list = sparePartsInOutStorageService.selectSparePartsInStorageList(sparePartsInStorage);
|
||||
ExcelUtil<SparePartsInStorage> util = new ExcelUtil<SparePartsInStorage>(SparePartsInStorage.class);
|
||||
util.exportExcel(response, list, "备品备件出入库数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备品备件出入库详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:query")
|
||||
@GetMapping(value = "/{rawOrderInSnId}")
|
||||
public AjaxResult getInfo(@PathVariable("rawOrderInSnId") String rawOrderInSnId) {
|
||||
return success(sparePartsInOutStorageService.selectSparePartsInStorageByRawOrderInSnId(rawOrderInSnId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件出入库
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:add")
|
||||
@Log(title = "备品备件出入库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SparePartsInStorage sparePartsInStorage) {
|
||||
return toAjax(sparePartsInOutStorageService.insertSparePartsInStorage(sparePartsInStorage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件出入库
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:edit")
|
||||
@Log(title = "备品备件出入库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SparePartsInStorage sparePartsInStorage) {
|
||||
return toAjax(sparePartsInOutStorageService.updateSparePartsInStorage(sparePartsInStorage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除备品备件出入库
|
||||
*/
|
||||
@RequiresPermissions("device:sparepartsInOutStorage:remove")
|
||||
@Log(title = "备品备件出入库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{rawOrderInSnIds}")
|
||||
public AjaxResult remove(@PathVariable String[] rawOrderInSnIds) {
|
||||
return toAjax(sparePartsInOutStorageService.deleteSparePartsInStorageByRawOrderInSnIds(rawOrderInSnIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,352 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 备品备件出入库对象 wms_raw_order_in_sn
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-17
|
||||
*/
|
||||
public class SparePartsInStorage extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一序列号 */
|
||||
private String rawOrderInSnId;
|
||||
|
||||
/** 仓库编码 */
|
||||
@Excel(name = "仓库编码")
|
||||
private String whCode;
|
||||
|
||||
/** 库区编码 */
|
||||
@Excel(name = "库区编码")
|
||||
private String waCode;
|
||||
|
||||
/** 库位编码 */
|
||||
@Excel(name = "库位编码")
|
||||
private String wlCode;
|
||||
|
||||
/** 入库单号 */
|
||||
@Excel(name = "入库单号")
|
||||
private String orderNo;
|
||||
|
||||
/** 采购订单号 */
|
||||
@Excel(name = "采购订单号")
|
||||
private String poNo;
|
||||
|
||||
/** 采购订单行项目 */
|
||||
@Excel(name = "采购订单行项目")
|
||||
private String poLine;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String materialCode;
|
||||
|
||||
/** 物料描述 */
|
||||
@Excel(name = "物料描述")
|
||||
private String materialDesc;
|
||||
|
||||
/** sn/LPN */
|
||||
@Excel(name = "sn/LPN")
|
||||
private String sn;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String userDefined1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String userDefined2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String userDefined3;
|
||||
|
||||
/** 备用4 */
|
||||
@Excel(name = "备用4")
|
||||
private String userDefined4;
|
||||
|
||||
/** 备用5 */
|
||||
@Excel(name = "备用5")
|
||||
private String userDefined5;
|
||||
|
||||
/** 备用6 */
|
||||
@Excel(name = "备用6")
|
||||
private String userDefined6;
|
||||
|
||||
/** 备用7 */
|
||||
@Excel(name = "备用7")
|
||||
private String userDefined7;
|
||||
|
||||
/** 备用8 */
|
||||
@Excel(name = "备用8")
|
||||
private String userDefined8;
|
||||
|
||||
/** 备用9 */
|
||||
@Excel(name = "备用9")
|
||||
private String userDefined9;
|
||||
|
||||
/** 备用10 */
|
||||
@Excel(name = "备用10")
|
||||
private String userDefined10;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtCreate;
|
||||
|
||||
/** 最后更新人 */
|
||||
@Excel(name = "最后更新人")
|
||||
private String lastModifiedBy;
|
||||
|
||||
/** 最后更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtModified;
|
||||
|
||||
/** 有效标记 */
|
||||
@Excel(name = "有效标记")
|
||||
private String activeFlag;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String factoryCode;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sapFactoryCode;
|
||||
|
||||
public void setRawOrderInSnId(String rawOrderInSnId) {
|
||||
this.rawOrderInSnId = rawOrderInSnId;
|
||||
}
|
||||
|
||||
public String getRawOrderInSnId() {
|
||||
return rawOrderInSnId;
|
||||
}
|
||||
public void setWhCode(String whCode) {
|
||||
this.whCode = whCode;
|
||||
}
|
||||
|
||||
public String getWhCode() {
|
||||
return whCode;
|
||||
}
|
||||
public void setWaCode(String waCode) {
|
||||
this.waCode = waCode;
|
||||
}
|
||||
|
||||
public String getWaCode() {
|
||||
return waCode;
|
||||
}
|
||||
public void setWlCode(String wlCode) {
|
||||
this.wlCode = wlCode;
|
||||
}
|
||||
|
||||
public String getWlCode() {
|
||||
return wlCode;
|
||||
}
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
public void setPoNo(String poNo) {
|
||||
this.poNo = poNo;
|
||||
}
|
||||
|
||||
public String getPoNo() {
|
||||
return poNo;
|
||||
}
|
||||
public void setPoLine(String poLine) {
|
||||
this.poLine = poLine;
|
||||
}
|
||||
|
||||
public String getPoLine() {
|
||||
return poLine;
|
||||
}
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
public void setMaterialDesc(String materialDesc) {
|
||||
this.materialDesc = materialDesc;
|
||||
}
|
||||
|
||||
public String getMaterialDesc() {
|
||||
return materialDesc;
|
||||
}
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
public void setUserDefined1(String userDefined1) {
|
||||
this.userDefined1 = userDefined1;
|
||||
}
|
||||
|
||||
public String getUserDefined1() {
|
||||
return userDefined1;
|
||||
}
|
||||
public void setUserDefined2(String userDefined2) {
|
||||
this.userDefined2 = userDefined2;
|
||||
}
|
||||
|
||||
public String getUserDefined2() {
|
||||
return userDefined2;
|
||||
}
|
||||
public void setUserDefined3(String userDefined3) {
|
||||
this.userDefined3 = userDefined3;
|
||||
}
|
||||
|
||||
public String getUserDefined3() {
|
||||
return userDefined3;
|
||||
}
|
||||
public void setUserDefined4(String userDefined4) {
|
||||
this.userDefined4 = userDefined4;
|
||||
}
|
||||
|
||||
public String getUserDefined4() {
|
||||
return userDefined4;
|
||||
}
|
||||
public void setUserDefined5(String userDefined5) {
|
||||
this.userDefined5 = userDefined5;
|
||||
}
|
||||
|
||||
public String getUserDefined5() {
|
||||
return userDefined5;
|
||||
}
|
||||
public void setUserDefined6(String userDefined6) {
|
||||
this.userDefined6 = userDefined6;
|
||||
}
|
||||
|
||||
public String getUserDefined6() {
|
||||
return userDefined6;
|
||||
}
|
||||
public void setUserDefined7(String userDefined7) {
|
||||
this.userDefined7 = userDefined7;
|
||||
}
|
||||
|
||||
public String getUserDefined7() {
|
||||
return userDefined7;
|
||||
}
|
||||
public void setUserDefined8(String userDefined8) {
|
||||
this.userDefined8 = userDefined8;
|
||||
}
|
||||
|
||||
public String getUserDefined8() {
|
||||
return userDefined8;
|
||||
}
|
||||
public void setUserDefined9(String userDefined9) {
|
||||
this.userDefined9 = userDefined9;
|
||||
}
|
||||
|
||||
public String getUserDefined9() {
|
||||
return userDefined9;
|
||||
}
|
||||
public void setUserDefined10(String userDefined10) {
|
||||
this.userDefined10 = userDefined10;
|
||||
}
|
||||
|
||||
public String getUserDefined10() {
|
||||
return userDefined10;
|
||||
}
|
||||
public void setGmtCreate(Date gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public Date getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
public void setLastModifiedBy(String lastModifiedBy) {
|
||||
this.lastModifiedBy = lastModifiedBy;
|
||||
}
|
||||
|
||||
public String getLastModifiedBy() {
|
||||
return lastModifiedBy;
|
||||
}
|
||||
public void setGmtModified(Date gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Date getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
public void setActiveFlag(String activeFlag) {
|
||||
this.activeFlag = activeFlag;
|
||||
}
|
||||
|
||||
public String getActiveFlag() {
|
||||
return activeFlag;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
public void setSapFactoryCode(String sapFactoryCode) {
|
||||
this.sapFactoryCode = sapFactoryCode;
|
||||
}
|
||||
|
||||
public String getSapFactoryCode() {
|
||||
return sapFactoryCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("rawOrderInSnId", getRawOrderInSnId())
|
||||
.append("whCode", getWhCode())
|
||||
.append("waCode", getWaCode())
|
||||
.append("wlCode", getWlCode())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("poNo", getPoNo())
|
||||
.append("poLine", getPoLine())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialDesc", getMaterialDesc())
|
||||
.append("sn", getSn())
|
||||
.append("amount", getAmount())
|
||||
.append("userDefined1", getUserDefined1())
|
||||
.append("userDefined2", getUserDefined2())
|
||||
.append("userDefined3", getUserDefined3())
|
||||
.append("userDefined4", getUserDefined4())
|
||||
.append("userDefined5", getUserDefined5())
|
||||
.append("userDefined6", getUserDefined6())
|
||||
.append("userDefined7", getUserDefined7())
|
||||
.append("userDefined8", getUserDefined8())
|
||||
.append("userDefined9", getUserDefined9())
|
||||
.append("userDefined10", getUserDefined10())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("gmtCreate", getGmtCreate())
|
||||
.append("lastModifiedBy", getLastModifiedBy())
|
||||
.append("gmtModified", getGmtModified())
|
||||
.append("activeFlag", getActiveFlag())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("sapFactoryCode", getSapFactoryCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.SparePartsInStorage;
|
||||
|
||||
/**
|
||||
* 备品备件出入库Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-17
|
||||
*/
|
||||
public interface SparePartsInOutStorageMapper {
|
||||
/**
|
||||
* 查询备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 备品备件出入库
|
||||
*/
|
||||
public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId);
|
||||
|
||||
/**
|
||||
* 查询备品备件出入库列表
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 备品备件出入库集合
|
||||
*/
|
||||
public List<SparePartsInStorage> selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 新增备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 修改备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 删除备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId);
|
||||
|
||||
/**
|
||||
* 批量删除备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.SparePartsInStorage;
|
||||
|
||||
/**
|
||||
* 备品备件出入库Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-17
|
||||
*/
|
||||
public interface ISparePartsInOutStorageService {
|
||||
/**
|
||||
* 查询备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 备品备件出入库
|
||||
*/
|
||||
public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId);
|
||||
|
||||
/**
|
||||
* 查询备品备件出入库列表
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 备品备件出入库集合
|
||||
*/
|
||||
public List<SparePartsInStorage> selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 新增备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 修改备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage);
|
||||
|
||||
/**
|
||||
* 批量删除备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnIds 需要删除的备品备件出入库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds);
|
||||
|
||||
/**
|
||||
* 删除备品备件出入库信息
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.device.mapper.SparePartsInOutStorageMapper;
|
||||
import com.op.device.domain.SparePartsInStorage;
|
||||
import com.op.device.service.ISparePartsInOutStorageService;
|
||||
|
||||
/**
|
||||
* 备品备件出入库Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-17
|
||||
*/
|
||||
@Service
|
||||
public class SparePartsInOutStorageServiceImpl implements ISparePartsInOutStorageService {
|
||||
@Autowired
|
||||
private SparePartsInOutStorageMapper sparePartsInOutStorageMapper;
|
||||
|
||||
/**
|
||||
* 查询备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 备品备件出入库
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId) {
|
||||
return sparePartsInOutStorageMapper.selectSparePartsInStorageByRawOrderInSnId(rawOrderInSnId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询备品备件出入库列表
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 备品备件出入库
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<SparePartsInStorage> selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage) {
|
||||
return sparePartsInOutStorageMapper.selectSparePartsInStorageList(sparePartsInStorage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage) {
|
||||
|
||||
return sparePartsInOutStorageMapper.insertSparePartsInStorage(sparePartsInStorage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件出入库
|
||||
*
|
||||
* @param sparePartsInStorage 备品备件出入库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage) {
|
||||
return sparePartsInOutStorageMapper.updateSparePartsInStorage(sparePartsInStorage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除备品备件出入库
|
||||
*
|
||||
* @param rawOrderInSnIds 需要删除的备品备件出入库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds) {
|
||||
return sparePartsInOutStorageMapper.deleteSparePartsInStorageByRawOrderInSnIds(rawOrderInSnIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除备品备件出入库信息
|
||||
*
|
||||
* @param rawOrderInSnId 备品备件出入库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId) {
|
||||
return sparePartsInOutStorageMapper.deleteSparePartsInStorageByRawOrderInSnId(rawOrderInSnId);
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
<?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.device.mapper.SparePartsInOutStorageMapper">
|
||||
|
||||
<resultMap type="SparePartsInStorage" id="SparePartsInStorageResult">
|
||||
<result property="rawOrderInSnId" column="raw_order_in_sn_id" />
|
||||
<result property="whCode" column="wh_code" />
|
||||
<result property="waCode" column="wa_code" />
|
||||
<result property="wlCode" column="wl_code" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="poNo" column="po_no" />
|
||||
<result property="poLine" column="po_line" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialDesc" column="material_desc" />
|
||||
<result property="sn" column="sn" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="userDefined1" column="user_defined1" />
|
||||
<result property="userDefined2" column="user_defined2" />
|
||||
<result property="userDefined3" column="user_defined3" />
|
||||
<result property="userDefined4" column="user_defined4" />
|
||||
<result property="userDefined5" column="user_defined5" />
|
||||
<result property="userDefined6" column="user_defined6" />
|
||||
<result property="userDefined7" column="user_defined7" />
|
||||
<result property="userDefined8" column="user_defined8" />
|
||||
<result property="userDefined9" column="user_defined9" />
|
||||
<result property="userDefined10" column="user_defined10" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="gmtCreate" column="gmt_create" />
|
||||
<result property="lastModifiedBy" column="last_modified_by" />
|
||||
<result property="gmtModified" column="gmt_modified" />
|
||||
<result property="activeFlag" column="active_flag" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="sapFactoryCode" column="sap_factory_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSparePartsInStorageVo">
|
||||
select raw_order_in_sn_id, wh_code, wa_code, wl_code, order_no, po_no, po_line, material_code, material_desc, sn, amount, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, user_defined7, user_defined8, user_defined9, user_defined10, create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code, sap_factory_code from wms_raw_order_in_sn
|
||||
</sql>
|
||||
|
||||
<select id="selectSparePartsInStorageList" parameterType="SparePartsInStorage" resultMap="SparePartsInStorageResult">
|
||||
<include refid="selectSparePartsInStorageVo"/>
|
||||
<where>
|
||||
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
|
||||
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
|
||||
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
||||
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||
<if test="poLine != null and poLine != ''"> and po_line = #{poLine}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialDesc != null and materialDesc != ''"> and material_desc = #{materialDesc}</if>
|
||||
<if test="sn != null and sn != ''"> and sn = #{sn}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
|
||||
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
|
||||
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
||||
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
|
||||
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
|
||||
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
|
||||
<if test="userDefined7 != null and userDefined7 != ''"> and user_defined7 = #{userDefined7}</if>
|
||||
<if test="userDefined8 != null and userDefined8 != ''"> and user_defined8 = #{userDefined8}</if>
|
||||
<if test="userDefined9 != null and userDefined9 != ''"> and user_defined9 = #{userDefined9}</if>
|
||||
<if test="userDefined10 != null and userDefined10 != ''"> and user_defined10 = #{userDefined10}</if>
|
||||
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if>
|
||||
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and last_modified_by = #{lastModifiedBy}</if>
|
||||
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSparePartsInStorageByRawOrderInSnId" parameterType="String" resultMap="SparePartsInStorageResult">
|
||||
<include refid="selectSparePartsInStorageVo"/>
|
||||
where raw_order_in_sn_id = #{rawOrderInSnId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSparePartsInStorage" parameterType="SparePartsInStorage">
|
||||
insert into wms_raw_order_in_sn
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rawOrderInSnId != null">raw_order_in_sn_id,</if>
|
||||
<if test="whCode != null">wh_code,</if>
|
||||
<if test="waCode != null">wa_code,</if>
|
||||
<if test="wlCode != null">wl_code,</if>
|
||||
<if test="orderNo != null">order_no,</if>
|
||||
<if test="poNo != null">po_no,</if>
|
||||
<if test="poLine != null">po_line,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialDesc != null">material_desc,</if>
|
||||
<if test="sn != null">sn,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="userDefined1 != null">user_defined1,</if>
|
||||
<if test="userDefined2 != null">user_defined2,</if>
|
||||
<if test="userDefined3 != null">user_defined3,</if>
|
||||
<if test="userDefined4 != null">user_defined4,</if>
|
||||
<if test="userDefined5 != null">user_defined5,</if>
|
||||
<if test="userDefined6 != null">user_defined6,</if>
|
||||
<if test="userDefined7 != null">user_defined7,</if>
|
||||
<if test="userDefined8 != null">user_defined8,</if>
|
||||
<if test="userDefined9 != null">user_defined9,</if>
|
||||
<if test="userDefined10 != null">user_defined10,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="lastModifiedBy != null">last_modified_by,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
<if test="activeFlag != null">active_flag,</if>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
<if test="sapFactoryCode != null">sap_factory_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rawOrderInSnId != null">#{rawOrderInSnId},</if>
|
||||
<if test="whCode != null">#{whCode},</if>
|
||||
<if test="waCode != null">#{waCode},</if>
|
||||
<if test="wlCode != null">#{wlCode},</if>
|
||||
<if test="orderNo != null">#{orderNo},</if>
|
||||
<if test="poNo != null">#{poNo},</if>
|
||||
<if test="poLine != null">#{poLine},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialDesc != null">#{materialDesc},</if>
|
||||
<if test="sn != null">#{sn},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="userDefined1 != null">#{userDefined1},</if>
|
||||
<if test="userDefined2 != null">#{userDefined2},</if>
|
||||
<if test="userDefined3 != null">#{userDefined3},</if>
|
||||
<if test="userDefined4 != null">#{userDefined4},</if>
|
||||
<if test="userDefined5 != null">#{userDefined5},</if>
|
||||
<if test="userDefined6 != null">#{userDefined6},</if>
|
||||
<if test="userDefined7 != null">#{userDefined7},</if>
|
||||
<if test="userDefined8 != null">#{userDefined8},</if>
|
||||
<if test="userDefined9 != null">#{userDefined9},</if>
|
||||
<if test="userDefined10 != null">#{userDefined10},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate},</if>
|
||||
<if test="lastModifiedBy != null">#{lastModifiedBy},</if>
|
||||
<if test="gmtModified != null">#{gmtModified},</if>
|
||||
<if test="activeFlag != null">#{activeFlag},</if>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSparePartsInStorage" parameterType="SparePartsInStorage">
|
||||
update wms_raw_order_in_sn
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="whCode != null">wh_code = #{whCode},</if>
|
||||
<if test="waCode != null">wa_code = #{waCode},</if>
|
||||
<if test="wlCode != null">wl_code = #{wlCode},</if>
|
||||
<if test="orderNo != null">order_no = #{orderNo},</if>
|
||||
<if test="poNo != null">po_no = #{poNo},</if>
|
||||
<if test="poLine != null">po_line = #{poLine},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialDesc != null">material_desc = #{materialDesc},</if>
|
||||
<if test="sn != null">sn = #{sn},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
|
||||
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
|
||||
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
|
||||
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
|
||||
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
|
||||
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</if>
|
||||
<if test="userDefined7 != null">user_defined7 = #{userDefined7},</if>
|
||||
<if test="userDefined8 != null">user_defined8 = #{userDefined8},</if>
|
||||
<if test="userDefined9 != null">user_defined9 = #{userDefined9},</if>
|
||||
<if test="userDefined10 != null">user_defined10 = #{userDefined10},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||
<if test="lastModifiedBy != null">last_modified_by = #{lastModifiedBy},</if>
|
||||
<if test="gmtModified != null">gmt_modified = #{gmtModified},</if>
|
||||
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
<if test="sapFactoryCode != null">sap_factory_code = #{sapFactoryCode},</if>
|
||||
</trim>
|
||||
where raw_order_in_sn_id = #{rawOrderInSnId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSparePartsInStorageByRawOrderInSnId" parameterType="String">
|
||||
delete from wms_raw_order_in_sn where raw_order_in_sn_id = #{rawOrderInSnId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSparePartsInStorageByRawOrderInSnIds" parameterType="String">
|
||||
delete from wms_raw_order_in_sn where raw_order_in_sn_id in
|
||||
<foreach item="rawOrderInSnId" collection="array" open="(" separator="," close=")">
|
||||
#{rawOrderInSnId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,77 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.quality.domain.QcCheckSampleTask;
|
||||
import com.op.quality.domain.query.QcCheckSampleTaskQuery;
|
||||
import com.op.quality.service.IQcCheckSampleTaskService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 留样检验
|
||||
*
|
||||
* @author 019117
|
||||
* @date 2023/10/12
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/qc-check-sample-task")
|
||||
public class QcCheckSampleTaskController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private IQcCheckSampleTaskService qcCheckSampleTaskService;
|
||||
|
||||
|
||||
/** 获取留样列表 **/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcCheckSampleTaskQuery query) {
|
||||
startPage();
|
||||
List<QcCheckSampleTask> list = qcCheckSampleTaskService.selectQcCheckSampleTaskList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/** 获取待复检样品列表 **/
|
||||
@GetMapping("/wait-list")
|
||||
public TableDataInfo waitList(QcCheckSampleTaskQuery query) {
|
||||
startPage();
|
||||
List<QcCheckSampleTask> list = qcCheckSampleTaskService.selectQcWaitCheckSampleTaskList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/** 更新留样信息 **/
|
||||
@PutMapping()
|
||||
public AjaxResult updateQcCheckSampleTask(@RequestBody QcCheckSampleTask qcCheckSampleTask) {
|
||||
qcCheckSampleTaskService.updateQcCheckSampleTask(qcCheckSampleTask);
|
||||
return success();
|
||||
}
|
||||
|
||||
/** 导出留样观察与复检记录表 **/
|
||||
@Log(title = "留样观察与复检记录表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void exportQcCheckSampleTask(HttpServletResponse response, QcCheckSampleTaskQuery query) {
|
||||
List<QcCheckSampleTask> list = qcCheckSampleTaskService.selectQcCheckSampleTaskList(query);
|
||||
ExcelUtil<QcCheckSampleTask> util = new ExcelUtil<QcCheckSampleTask>(QcCheckSampleTask.class);
|
||||
util.exportExcel(response, list, "留样观察与复检记录表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步留样检验任务
|
||||
* **/
|
||||
@PostMapping("createTask")
|
||||
public AjaxResult createCheckSampleTask() {
|
||||
return qcCheckSampleTaskService.createCheckSampleTask();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,245 @@
|
||||
package com.op.quality.domain;
|
||||
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* 留样检验-实体类
|
||||
* @author 019117
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
public class QcCheckSampleTask extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id **/
|
||||
private String id;
|
||||
|
||||
/** 物料名称 **/
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 来料批次号 **/
|
||||
@Excel(name = "来料批次号")
|
||||
private String incomeBatchNo;
|
||||
|
||||
/** 订单号 **/
|
||||
@Excel(name = "订单号")
|
||||
private String workOrderCodeSap;
|
||||
|
||||
/** 留样时间 **/
|
||||
@Excel(name = "留样时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date sampleTime;
|
||||
|
||||
|
||||
/** 留样数量 **/
|
||||
@Excel(name = "留样数量")
|
||||
private String sampleNum;
|
||||
|
||||
|
||||
/** 留样存放位置 **/
|
||||
@Excel(name = "留样存放位置")
|
||||
private String sampleAddress;
|
||||
|
||||
/** 第一次检验人工号 **/
|
||||
private String firstCheckUserCode;
|
||||
|
||||
/** 第一次检验人姓名 **/
|
||||
@Excel(name = "第一次检验人姓名")
|
||||
private String firstCheckUserName;
|
||||
|
||||
/** 第一次检验结果 **/
|
||||
@Excel(name = "第一次检验结果")
|
||||
private String firstCheckResult;
|
||||
|
||||
/** 第一次检验时间 **/
|
||||
@Excel(name = "第一次检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstCheckTime;
|
||||
|
||||
/** 第二次检验人工号 **/
|
||||
private String secondCheckUserCode;
|
||||
|
||||
/** 第二次检验人姓名 **/
|
||||
@Excel(name = "第二次检验人姓名")
|
||||
private String secondCheckUserName;
|
||||
|
||||
/** 第二次检验结果 **/
|
||||
@Excel(name = "第二次检验结果")
|
||||
private String secondCheckResult;
|
||||
|
||||
/** 第二次检验时间 **/
|
||||
@Excel(name = "第二次检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private String secondCheckTime;
|
||||
|
||||
/** 第三次检验人工号 **/
|
||||
private String thirdCheckUserCode;
|
||||
|
||||
/** 第三次检验人姓名 **/
|
||||
@Excel(name = "第三次检验人姓名")
|
||||
private String thirdCheckUserName;
|
||||
|
||||
/** 第三次检验结果 **/
|
||||
@Excel(name = "第三次检验结果")
|
||||
private String thirdCheckResult;
|
||||
|
||||
/** 第三次检验时间 **/
|
||||
@Excel(name = "第三次检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private String thirdCheckTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getIncomeBatchNo() {
|
||||
return incomeBatchNo;
|
||||
}
|
||||
|
||||
public void setIncomeBatchNo(String incomeBatchNo) {
|
||||
this.incomeBatchNo = incomeBatchNo;
|
||||
}
|
||||
|
||||
public String getWorkOrderCodeSap() {
|
||||
return workOrderCodeSap;
|
||||
}
|
||||
|
||||
public void setWorkOrderCodeSap(String workOrderCodeSap) {
|
||||
this.workOrderCodeSap = workOrderCodeSap;
|
||||
}
|
||||
|
||||
public Date getSampleTime() {
|
||||
return sampleTime;
|
||||
}
|
||||
|
||||
public void setSampleTime(Date sampleTime) {
|
||||
this.sampleTime = sampleTime;
|
||||
}
|
||||
|
||||
public String getSampleNum() {
|
||||
return sampleNum;
|
||||
}
|
||||
|
||||
public void setSampleNum(String sampleNum) {
|
||||
this.sampleNum = sampleNum;
|
||||
}
|
||||
|
||||
public String getSampleAddress() {
|
||||
return sampleAddress;
|
||||
}
|
||||
|
||||
public void setSampleAddress(String sampleAddress) {
|
||||
this.sampleAddress = sampleAddress;
|
||||
}
|
||||
|
||||
public String getFirstCheckUserCode() {
|
||||
return firstCheckUserCode;
|
||||
}
|
||||
|
||||
public void setFirstCheckUserCode(String firstCheckUserCode) {
|
||||
this.firstCheckUserCode = firstCheckUserCode;
|
||||
}
|
||||
|
||||
public String getFirstCheckUserName() {
|
||||
return firstCheckUserName;
|
||||
}
|
||||
|
||||
public void setFirstCheckUserName(String firstCheckUserName) {
|
||||
this.firstCheckUserName = firstCheckUserName;
|
||||
}
|
||||
|
||||
public String getFirstCheckResult() {
|
||||
return firstCheckResult;
|
||||
}
|
||||
|
||||
public void setFirstCheckResult(String firstCheckResult) {
|
||||
this.firstCheckResult = firstCheckResult;
|
||||
}
|
||||
|
||||
public String getFirstCheckTime() {
|
||||
return firstCheckTime;
|
||||
}
|
||||
|
||||
public void setFirstCheckTime(String firstCheckTime) {
|
||||
this.firstCheckTime = firstCheckTime;
|
||||
}
|
||||
|
||||
public String getSecondCheckUserCode() {
|
||||
return secondCheckUserCode;
|
||||
}
|
||||
|
||||
public void setSecondCheckUserCode(String secondCheckUserCode) {
|
||||
this.secondCheckUserCode = secondCheckUserCode;
|
||||
}
|
||||
|
||||
public String getSecondCheckUserName() {
|
||||
return secondCheckUserName;
|
||||
}
|
||||
|
||||
public void setSecondCheckUserName(String secondCheckUserName) {
|
||||
this.secondCheckUserName = secondCheckUserName;
|
||||
}
|
||||
|
||||
public String getSecondCheckResult() {
|
||||
return secondCheckResult;
|
||||
}
|
||||
|
||||
public void setSecondCheckResult(String secondCheckResult) {
|
||||
this.secondCheckResult = secondCheckResult;
|
||||
}
|
||||
|
||||
public String getSecondCheckTime() {
|
||||
return secondCheckTime;
|
||||
}
|
||||
|
||||
public void setSecondCheckTime(String secondCheckTime) {
|
||||
this.secondCheckTime = secondCheckTime;
|
||||
}
|
||||
|
||||
public String getThirdCheckUserCode() {
|
||||
return thirdCheckUserCode;
|
||||
}
|
||||
|
||||
public void setThirdCheckUserCode(String thirdCheckUserCode) {
|
||||
this.thirdCheckUserCode = thirdCheckUserCode;
|
||||
}
|
||||
|
||||
public String getThirdCheckUserName() {
|
||||
return thirdCheckUserName;
|
||||
}
|
||||
|
||||
public void setThirdCheckUserName(String thirdCheckUserName) {
|
||||
this.thirdCheckUserName = thirdCheckUserName;
|
||||
}
|
||||
|
||||
public String getThirdCheckResult() {
|
||||
return thirdCheckResult;
|
||||
}
|
||||
|
||||
public void setThirdCheckResult(String thirdCheckResult) {
|
||||
this.thirdCheckResult = thirdCheckResult;
|
||||
}
|
||||
|
||||
public String getThirdCheckTime() {
|
||||
return thirdCheckTime;
|
||||
}
|
||||
|
||||
public void setThirdCheckTime(String thirdCheckTime) {
|
||||
this.thirdCheckTime = thirdCheckTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.quality.domain.query;
|
||||
|
||||
/**
|
||||
*
|
||||
* 留样检验查询实体类
|
||||
*
|
||||
* @author 019117
|
||||
* @date 2025/3/25 10:50
|
||||
*/
|
||||
public class QcCheckSampleTaskQuery {
|
||||
|
||||
/** 时间查询条件 **/
|
||||
private String queryDate;
|
||||
|
||||
/** 留样起始时间 **/
|
||||
private String startSampleDate;
|
||||
|
||||
/** 留样结束时间 **/
|
||||
private String endSampleDate;
|
||||
|
||||
/** 物料名称 **/
|
||||
private String materialName;
|
||||
|
||||
/** 订单号 **/
|
||||
private String workOrderCodeSap;
|
||||
|
||||
private String firstDate;
|
||||
|
||||
private String secondDate;
|
||||
|
||||
private String thirdDate;
|
||||
|
||||
|
||||
public String getQueryDate() {
|
||||
return queryDate;
|
||||
}
|
||||
|
||||
public void setQueryDate(String queryDate) {
|
||||
this.queryDate = queryDate;
|
||||
}
|
||||
|
||||
public String getStartSampleDate() {
|
||||
return startSampleDate;
|
||||
}
|
||||
|
||||
public void setStartSampleDate(String startSampleDate) {
|
||||
this.startSampleDate = startSampleDate;
|
||||
}
|
||||
|
||||
public String getEndSampleDate() {
|
||||
return endSampleDate;
|
||||
}
|
||||
|
||||
public void setEndSampleDate(String endSampleDate) {
|
||||
this.endSampleDate = endSampleDate;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getWorkOrderCodeSap() {
|
||||
return workOrderCodeSap;
|
||||
}
|
||||
|
||||
public void setWorkOrderCodeSap(String workOrderCodeSap) {
|
||||
this.workOrderCodeSap = workOrderCodeSap;
|
||||
}
|
||||
|
||||
public String getFirstDate() {
|
||||
return firstDate;
|
||||
}
|
||||
|
||||
public void setFirstDate(String firstDate) {
|
||||
this.firstDate = firstDate;
|
||||
}
|
||||
|
||||
public String getSecondDate() {
|
||||
return secondDate;
|
||||
}
|
||||
|
||||
public void setSecondDate(String secondDate) {
|
||||
this.secondDate = secondDate;
|
||||
}
|
||||
|
||||
public String getThirdDate() {
|
||||
return thirdDate;
|
||||
}
|
||||
|
||||
public void setThirdDate(String thirdDate) {
|
||||
this.thirdDate = thirdDate;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import com.op.quality.domain.QcCheckSampleTask;
|
||||
import com.op.quality.domain.query.QcCheckSampleTaskQuery;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* reason
|
||||
*
|
||||
* @author 019117
|
||||
* @date 2025/3/25
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcCheckSampleTaskMapper {
|
||||
|
||||
/**
|
||||
* 留样检验任务列表
|
||||
* **/
|
||||
List<QcCheckSampleTask> selectQcCheckSampleTaskList(QcCheckSampleTaskQuery query);
|
||||
|
||||
/**
|
||||
* 获取待复检样品列表
|
||||
* **/
|
||||
List<QcCheckSampleTask> selectQcWaitCheckSampleTaskList(QcCheckSampleTaskQuery query);
|
||||
|
||||
|
||||
/**
|
||||
* 更新留样信息
|
||||
*
|
||||
* @param qcCheckSampleTask 成品留样实体类
|
||||
**/
|
||||
void updateQcCheckSampleTask(QcCheckSampleTask qcCheckSampleTask);
|
||||
|
||||
|
||||
/**
|
||||
* 获取每天首检任务的各物料的第一条数据
|
||||
* **/
|
||||
List<QcCheckSampleTask> selectScTaskListByDay();
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入留样检验列表
|
||||
* **/
|
||||
|
||||
int batchInsertQcCheckSampleTask(List<QcCheckSampleTask> list);
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.op.quality.service;
|
||||
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.quality.domain.QcCheckSampleTask;
|
||||
import com.op.quality.domain.query.QcCheckSampleTaskQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 019117
|
||||
* @date 2025/3/25
|
||||
*/
|
||||
public interface IQcCheckSampleTaskService {
|
||||
|
||||
/**
|
||||
* 留样检验任务列表
|
||||
* **/
|
||||
List<QcCheckSampleTask> selectQcCheckSampleTaskList(QcCheckSampleTaskQuery query);
|
||||
|
||||
|
||||
/**
|
||||
* 获取待复检样品列表
|
||||
* **/
|
||||
List<QcCheckSampleTask> selectQcWaitCheckSampleTaskList(QcCheckSampleTaskQuery query);
|
||||
|
||||
|
||||
/**
|
||||
* 更新留样信息
|
||||
* **/
|
||||
void updateQcCheckSampleTask(QcCheckSampleTask qcCheckSampleTask);
|
||||
|
||||
|
||||
/**
|
||||
* 同步留样检验任务
|
||||
* **/
|
||||
AjaxResult createCheckSampleTask();
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.op.quality.service.impl;
|
||||
|
||||
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.quality.domain.QcCheckSampleTask;
|
||||
import com.op.quality.domain.query.QcCheckSampleTaskQuery;
|
||||
import com.op.quality.mapper.QcCheckSampleTaskMapper;
|
||||
import com.op.quality.service.IQcCheckSampleTaskService;
|
||||
import com.op.system.api.RemoteUserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
import static com.op.common.core.web.domain.AjaxResult.success;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author 019117
|
||||
* @date 2025/3/25
|
||||
*/
|
||||
@Service()
|
||||
public class QcCheckSampleTaskServiceImpl implements IQcCheckSampleTaskService {
|
||||
|
||||
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Resource
|
||||
private QcCheckSampleTaskMapper qcCheckSampleTaskMapper;
|
||||
|
||||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 留样检验任务列表
|
||||
* **/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<QcCheckSampleTask> selectQcCheckSampleTaskList(QcCheckSampleTaskQuery query) {
|
||||
return qcCheckSampleTaskMapper.selectQcCheckSampleTaskList(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待复检样品列表
|
||||
*
|
||||
* @param query
|
||||
**/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<QcCheckSampleTask> selectQcWaitCheckSampleTaskList(QcCheckSampleTaskQuery query) {
|
||||
return qcCheckSampleTaskMapper.selectQcWaitCheckSampleTaskList(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新留样信息
|
||||
*
|
||||
* @param qcCheckSampleTask 成品留样实体类
|
||||
**/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public void updateQcCheckSampleTask(QcCheckSampleTask qcCheckSampleTask) {
|
||||
qcCheckSampleTaskMapper.updateQcCheckSampleTask(qcCheckSampleTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步留样检验任务操作
|
||||
**/
|
||||
@Override
|
||||
public AjaxResult createCheckSampleTask() {
|
||||
// 这是数据源的key
|
||||
DynamicDataSourceContextHolder.push("ds_1000");
|
||||
List<QcCheckSampleTask> list = qcCheckSampleTaskMapper.selectScTaskListByDay();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (QcCheckSampleTask item : list) {
|
||||
item.setId(IdUtils.fastSimpleUUID());
|
||||
}
|
||||
qcCheckSampleTaskMapper.batchInsertQcCheckSampleTask(list);
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
<?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.quality.mapper.QcCheckSampleTaskMapper">
|
||||
|
||||
<resultMap type="com.op.quality.domain.QcCheckSampleTask" id="QcCheckSampleDefectResult">
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="incomeBatchNo" column="income_batch_no"/>
|
||||
<result property="workOrderCodeSap" column="work_order_code_sap"/>
|
||||
<result property="sampleTime" column="sample_time"/>
|
||||
<result property="sampleNum" column="sample_Num"/>
|
||||
<result property="sampleAddress" column="sample_address"/>
|
||||
<result property="firstCheckUserCode" column="first_check_user_code"/>
|
||||
<result property="firstCheckUserName" column="first_check_user_name"/>
|
||||
<result property="firstCheckResult" column="first_check_result"/>
|
||||
<result property="firstCheckTime" column="first_check_time"/>
|
||||
<result property="secondCheckUserCode" column="second_check_user_code"/>
|
||||
<result property="secondCheckUserName" column="second_check_user_name"/>
|
||||
<result property="secondCheckResult" column="second_check_result"/>
|
||||
<result property="secondCheckTime" column="second_check_time"/>
|
||||
<result property="thirdCheckUserCode" column="third_check_user_code"/>
|
||||
<result property="thirdCheckUserName" column="third_check_user_name"/>
|
||||
<result property="thirdCheckResult" column="third_check_result"/>
|
||||
<result property="thirdCheckTime" column="third_check_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectQcCheckSampleTaskList" parameterType="com.op.quality.domain.query.QcCheckSampleTaskQuery"
|
||||
resultMap="QcCheckSampleDefectResult">
|
||||
select
|
||||
id,
|
||||
material_name,
|
||||
income_batch_no,
|
||||
work_order_code_sap,
|
||||
sample_time,
|
||||
sample_num,
|
||||
sample_address,
|
||||
first_check_user_code,
|
||||
first_check_user_name,
|
||||
first_check_result,
|
||||
first_check_time,
|
||||
second_check_user_code,
|
||||
second_check_user_name,
|
||||
second_check_result,
|
||||
second_check_time,
|
||||
third_check_user_code,
|
||||
third_check_user_name,
|
||||
third_check_result,
|
||||
third_check_time
|
||||
from qc_check_sample_task
|
||||
<where>
|
||||
<if test="queryDate != null and queryDate != ''">
|
||||
and CONVERT(VARCHAR(10), create_time ,23) <![CDATA[ = ]]> #{queryDate}
|
||||
</if>
|
||||
<if test="startSampleDate != null and startSampleDate != ''">
|
||||
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ >= ]]> #{startSampleDate}
|
||||
</if>
|
||||
<if test="endSampleDate != null and endSampleDate != ''">
|
||||
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ <= ]]> #{endSampleDate}
|
||||
</if>
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and material_name like concat('%', #{materialName}, '%')
|
||||
</if>
|
||||
<if test="workOrderCodeSap != null and workOrderCodeSap != ''">
|
||||
and work_order_code_sap <![CDATA[ = ]]> #{workOrderCodeSap}
|
||||
</if>
|
||||
</where>
|
||||
order by sample_time desc,create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectQcWaitCheckSampleTaskList" parameterType="com.op.quality.domain.query.QcCheckSampleTaskQuery"
|
||||
resultMap="QcCheckSampleDefectResult">
|
||||
select
|
||||
id, material_name, income_batch_no, work_order_code_sap, sample_time,
|
||||
first_check_user_code, first_check_user_name, first_check_result, first_check_time,
|
||||
second_check_user_code, second_check_user_name, second_check_result, second_check_time,
|
||||
third_check_user_code, third_check_user_name, third_check_result, third_check_time
|
||||
from qc_check_sample_task
|
||||
<where>
|
||||
<if test="firstDate != null and firstDate != ''">
|
||||
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ <= ]]> #{firstDate}
|
||||
and first_check_result is null
|
||||
</if>
|
||||
</where>
|
||||
UNION
|
||||
|
||||
select
|
||||
id, material_name, income_batch_no, work_order_code_sap, sample_time,
|
||||
first_check_user_code, first_check_user_name, first_check_result, first_check_time,
|
||||
second_check_user_code, second_check_user_name, second_check_result, second_check_time,
|
||||
third_check_user_code, third_check_user_name, third_check_result, third_check_time
|
||||
from qc_check_sample_task
|
||||
<where>
|
||||
<if test="secondDate != null and secondDate != ''">
|
||||
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ <= ]]> #{secondDate}
|
||||
and second_check_result is null
|
||||
</if>
|
||||
</where>
|
||||
UNION
|
||||
select
|
||||
id, material_name, income_batch_no, work_order_code_sap, sample_time,
|
||||
first_check_user_code, first_check_user_name, first_check_result, first_check_time,
|
||||
second_check_user_code, second_check_user_name, second_check_result, second_check_time,
|
||||
third_check_user_code, third_check_user_name, third_check_result, third_check_time
|
||||
from qc_check_sample_task
|
||||
<where>
|
||||
<if test="thirdDate != null and thirdDate != ''">
|
||||
and CONVERT(VARCHAR(10), sample_time ,23) <![CDATA[ <= ]]> #{thirdDate}
|
||||
and third_check_result is null
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateQcCheckSampleTask" parameterType="com.op.quality.domain.QcCheckSampleTask">
|
||||
update qc_check_sample_task
|
||||
<set>
|
||||
<if test="sampleTime != null">
|
||||
sample_time = #{sampleTime},
|
||||
</if>
|
||||
<if test="sampleNum != null">
|
||||
sample_Num = #{sampleNum},
|
||||
</if>
|
||||
<if test="sampleAddress != null">
|
||||
sample_Address = #{sampleAddress},
|
||||
</if>
|
||||
<if test="firstCheckUserCode != null and firstCheckUserCode != ''">
|
||||
first_check_user_code = #{firstCheckUserCode},
|
||||
</if>
|
||||
<if test="firstCheckUserName != null and firstCheckUserName != ''">
|
||||
first_check_user_name = #{firstCheckUserName},
|
||||
</if>
|
||||
<if test="firstCheckResult != null and firstCheckResult != ''">
|
||||
first_check_result = #{firstCheckResult},
|
||||
</if>
|
||||
<if test="firstCheckTime != null and firstCheckTime != ''">
|
||||
first_check_time = #{firstCheckTime},
|
||||
</if>
|
||||
<if test="secondCheckUserCode != null and secondCheckUserCode != ''">
|
||||
second_check_user_code = #{secondCheckUserCode},
|
||||
</if>
|
||||
<if test="secondCheckUserName != null and secondCheckUserName != ''">
|
||||
second_check_user_name = #{secondCheckUserName},
|
||||
</if>
|
||||
<if test="secondCheckResult != null and secondCheckResult != ''">
|
||||
second_check_result = #{secondCheckResult},
|
||||
</if>
|
||||
<if test="secondCheckTime != null and secondCheckTime != ''">
|
||||
second_check_time = #{secondCheckTime},
|
||||
</if>
|
||||
<if test="thirdCheckUserCode != null and thirdCheckUserCode != ''">
|
||||
third_check_user_code = #{thirdCheckUserCode},
|
||||
</if>
|
||||
<if test="thirdCheckUserName != null and thirdCheckUserName != ''">
|
||||
third_check_user_name = #{thirdCheckUserName},
|
||||
</if>
|
||||
<if test="thirdCheckResult != null and thirdCheckResult != ''">
|
||||
third_check_result = #{thirdCheckResult},
|
||||
</if>
|
||||
<if test="thirdCheckTime != null and thirdCheckTime != ''">
|
||||
third_check_time = #{thirdCheckTime},
|
||||
</if>
|
||||
update_time = getDate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
|
||||
</update>
|
||||
|
||||
<select id="selectScTaskListByDay" resultMap="QcCheckSampleDefectResult">
|
||||
SELECT
|
||||
t.material_name AS material_name,
|
||||
CASE
|
||||
WHEN
|
||||
LEN( income_batch_no ) = 24
|
||||
THEN
|
||||
SUBSTRING ( t.income_batch_no, 9, 24 )
|
||||
WHEN
|
||||
LEN( income_batch_no ) <![CDATA[ <= ]]> 24
|
||||
THEN
|
||||
CONVERT ( VARCHAR ( 8 ), create_time, 112 )
|
||||
WHEN
|
||||
LEN( income_batch_no ) > 24
|
||||
THEN income_batch_no
|
||||
ELSE ''
|
||||
END AS income_batch_no,
|
||||
t.create_time AS create_time,
|
||||
t.workorderCodeSap AS workOrderCodeSap
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
qct.income_batch_no,
|
||||
qct.material_name,
|
||||
qct.create_time,
|
||||
SUBSTRING ( pow.workorder_code_sap, 4, 12 ) AS workorderCodeSap,
|
||||
ROW_NUMBER ( ) OVER ( PARTITION BY qct.material_name, SUBSTRING ( pow.workorder_code_sap, 4, 12 ) ORDER BY qct.create_time ASC ) AS RowNum
|
||||
FROM
|
||||
qc_check_task qct
|
||||
LEFT JOIN pro_order_workorder pow ON pow.workorder_code = qct.order_no
|
||||
WHERE
|
||||
pow.workorder_code_sap IS NOT NULL
|
||||
AND qct.income_batch_no IS NOT NULL
|
||||
AND qct.check_type = 'checkTypeSC'
|
||||
) t
|
||||
WHERE t.RowNum = 1 AND CONVERT(VARCHAR(10), t.create_time ,23) >= CONVERT(VARCHAR(10), getDate() ,23)
|
||||
ORDER BY t.create_time DESC
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertQcCheckSampleTask" parameterType="com.op.quality.domain.QcCheckSampleTask">
|
||||
INSERT INTO qc_check_sample_task (
|
||||
id,
|
||||
material_name,
|
||||
income_batch_no,
|
||||
work_order_code_sap,
|
||||
create_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.materialName},
|
||||
#{item.incomeBatchNo},
|
||||
#{item.workOrderCodeSap},
|
||||
#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,117 @@
|
||||
package com.op.sap.domain.vo;
|
||||
|
||||
/**
|
||||
* 反冲类型的领料过账接口
|
||||
* auth YangWL
|
||||
*
|
||||
* MATNR CHAR 18 0 物料号 必填
|
||||
* PLANT CHAR 4 0 工厂 必填
|
||||
* GR_RCPT CHAR 12 0 收货方/运达方 选填
|
||||
* LGORT CHAR 4 0 库存地点 必填
|
||||
* UMLGO CHAR 4 0 收货/发货库存地点 选填
|
||||
* QUANTITY QUAN 13 3 数量 必填
|
||||
* MEINS UNIT 3 0 条目单位 必填
|
||||
* BATCH CHAR 10 0 批号 必填
|
||||
* MOVE_BATCH CHAR 10 0 收货/发货批量 选填
|
||||
*/
|
||||
|
||||
|
||||
public class SapBackflushMPQuery {
|
||||
|
||||
private String matnr;
|
||||
private String plant;
|
||||
private String gr_rcpt;
|
||||
private String lgort;
|
||||
private String umlgo;
|
||||
private String quantity;
|
||||
private String meins;
|
||||
private String batch;
|
||||
private String move_batch;
|
||||
|
||||
public String getMatnr() {
|
||||
return matnr;
|
||||
}
|
||||
|
||||
public void setMatnr(String matnr) {
|
||||
this.matnr = matnr;
|
||||
}
|
||||
|
||||
public String getPlant() {
|
||||
return plant;
|
||||
}
|
||||
|
||||
public void setPlant(String plant) {
|
||||
this.plant = plant;
|
||||
}
|
||||
|
||||
public String getGr_rcpt() {
|
||||
return gr_rcpt;
|
||||
}
|
||||
|
||||
public void setGr_rcpt(String gr_rcpt) {
|
||||
this.gr_rcpt = gr_rcpt;
|
||||
}
|
||||
|
||||
public String getLgort() {
|
||||
return lgort;
|
||||
}
|
||||
|
||||
public void setLgort(String lgort) {
|
||||
this.lgort = lgort;
|
||||
}
|
||||
|
||||
public String getUmlgo() {
|
||||
return umlgo;
|
||||
}
|
||||
|
||||
public void setUmlgo(String umlgo) {
|
||||
this.umlgo = umlgo;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getMeins() {
|
||||
return meins;
|
||||
}
|
||||
|
||||
public void setMeins(String meins) {
|
||||
this.meins = meins;
|
||||
}
|
||||
|
||||
public String getBatch() {
|
||||
return batch;
|
||||
}
|
||||
|
||||
public void setBatch(String batch) {
|
||||
this.batch = batch;
|
||||
}
|
||||
|
||||
public String getMove_batch() {
|
||||
return move_batch;
|
||||
}
|
||||
|
||||
public void setMove_batch(String move_batch) {
|
||||
this.move_batch = move_batch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SapBackflushMPQuery{" +
|
||||
"matnr='" + matnr + '\'' +
|
||||
", plant='" + plant + '\'' +
|
||||
", gr_rcpt='" + gr_rcpt + '\'' +
|
||||
", lgort='" + lgort + '\'' +
|
||||
", umlgo='" + umlgo + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", meins='" + meins + '\'' +
|
||||
", batch='" + batch + '\'' +
|
||||
", move_batch='" + move_batch + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue