9 changed files with 778 additions and 0 deletions
-
2src/main/java/com/gaotao/modules/orderIssure/vo/SOIssueNotifyOrderList.java
-
63src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java
-
35src/main/java/com/gaotao/modules/wms/dao/WmsPrintDao.java
-
45src/main/java/com/gaotao/modules/wms/data/InboundQcResultData.java
-
26src/main/java/com/gaotao/modules/wms/data/PoOrderRollNoOutData.java
-
398src/main/java/com/gaotao/modules/wms/entity/PoOrderRollNo.java
-
31src/main/java/com/gaotao/modules/wms/service/WmsPrintService.java
-
99src/main/java/com/gaotao/modules/wms/service/impl/WmsPrintServiceImpl.java
-
79src/main/resources/mapper/wms/WmsPrintMapper.xml
@ -0,0 +1,63 @@ |
|||||
|
package com.gaotao.modules.wms.controller; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.common.utils.R; |
||||
|
import com.gaotao.modules.toolman.entity.ToolHeader; |
||||
|
import com.gaotao.modules.toolman.query.ToolHeaderQuery; |
||||
|
import com.gaotao.modules.wms.data.InboundQcResultData; |
||||
|
import com.gaotao.modules.wms.data.PoOrderRollNoOutData; |
||||
|
import com.gaotao.modules.wms.service.WmsPrintService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/wmsPrint") |
||||
|
public class WmsPrintController { |
||||
|
|
||||
|
@Autowired |
||||
|
private WmsPrintService wmsPrintService; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @description |
||||
|
* @author 常熟吴彦祖 |
||||
|
* @date 2025/8/19 14:07 |
||||
|
* @return R |
||||
|
*/ |
||||
|
@PostMapping("getInboundQcResultData") |
||||
|
public R getInboundQcResultData(@RequestBody InboundQcResultData inData){ |
||||
|
PageUtils page = wmsPrintService.getInboundQcResultData( inData); |
||||
|
return R.ok().put("page", page); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("getPoOrderRollNoOutData") |
||||
|
public R getPoOrderRollNoOutData(@RequestBody PoOrderRollNoOutData inData){ |
||||
|
List<PoOrderRollNoOutData> rows = wmsPrintService.getPoOrderRollNoOutData( inData); |
||||
|
return R.ok().put("rows", rows); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @description 把发行标签需要的其他内容带出来 |
||||
|
* @author 常熟吴彦祖 |
||||
|
* @date 2025/8/19 15:01 |
||||
|
* @return R |
||||
|
*/ |
||||
|
@PostMapping("getInboundQcResultOtherData") |
||||
|
public R getInboundQcResultOtherData(@RequestBody InboundQcResultData inData){ |
||||
|
PoOrderRollNoOutData row = wmsPrintService.getInboundQcResultOtherData( inData); |
||||
|
return R.ok().put("row", row); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("submitPoOrderRollNo") |
||||
|
public R submitPoOrderRollNo(@RequestBody PoOrderRollNoOutData inData){ |
||||
|
wmsPrintService.submitPoOrderRollNo( inData); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package com.gaotao.modules.wms.dao; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.gaotao.modules.pms.data.QcDetailReport; |
||||
|
import com.gaotao.modules.wms.data.InboundQcResultData; |
||||
|
import com.gaotao.modules.wms.data.PoOrderRollNoOutData; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @CLASSNAME WmsPrintDao |
||||
|
* @DESCRIPTION 采购标签生成数据访问层 |
||||
|
* @DATE 2024/01/01 |
||||
|
* @VERSION 1.0 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WmsPrintDao { |
||||
|
IPage<InboundQcResultData> getInboundQcResultData(Page<InboundQcResultData> pageData, @Param("query") InboundQcResultData data); |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @description |
||||
|
* @author 常熟吴彦祖 |
||||
|
* @date 2025/8/19 14:10 |
||||
|
* @return List<PoOrderRollNoOutData> |
||||
|
*/ |
||||
|
List<PoOrderRollNoOutData> getPoOrderRollNoOutData(PoOrderRollNoOutData inData); |
||||
|
|
||||
|
PoOrderRollNoOutData getInboundQcResultOtherData(InboundQcResultData inData); |
||||
|
void savePoOrderRollNo(PoOrderRollNoOutData inData); |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.gaotao.modules.wms.data; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.gaotao.common.utils.QueryPage; |
||||
|
import lombok.Data; |
||||
|
import org.apache.ibatis.type.Alias; |
||||
|
import org.apache.poi.hpsf.Decimal; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@Alias("InboundQcResultData") |
||||
|
public class InboundQcResultData extends QueryPage { |
||||
|
private String site; |
||||
|
private String buNo; |
||||
|
private String orderNo; |
||||
|
private String orderStatus; |
||||
|
private String partNo; |
||||
|
private String partDesc; |
||||
|
private String poOrderNo; |
||||
|
private String poItemNo; |
||||
|
private String inspectorNo; |
||||
|
private String supplierName; |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date inspectorDate; |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date submitDate; |
||||
|
private Double orderQty; |
||||
|
private BigDecimal rollQty; |
||||
|
private BigDecimal rollCount; |
||||
|
private String inspectionResult; |
||||
|
private String disposalMeasures; |
||||
|
private String supplierId; |
||||
|
private BigDecimal batchQualifiedQty; |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date startDate; |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date endDate; |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.gaotao.modules.wms.data; |
||||
|
|
||||
|
import com.gaotao.modules.wms.entity.PoOrderRollNo; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import org.apache.ibatis.type.Alias; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Alias("PoOrderRollNoOutData") |
||||
|
public class PoOrderRollNoOutData extends PoOrderRollNo { |
||||
|
private Integer orderId; |
||||
|
private String poItemNo; |
||||
|
private String poOrderNo; |
||||
|
private BigDecimal orderRollCount; |
||||
|
private BigDecimal batchQualifiedQty; |
||||
|
private BigDecimal remainingIssuableQty; |
||||
|
private Double exceedInRatio; |
||||
|
private String expirationFlag; |
||||
|
private Integer expirationDay; |
||||
|
private BigDecimal nowRollQty; |
||||
|
private Integer rollCount; |
||||
|
private BigDecimal tailRollQty; |
||||
|
private Integer expirationWarningDay; |
||||
|
} |
||||
@ -0,0 +1,398 @@ |
|||||
|
package com.gaotao.modules.wms.entity; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.gaotao.common.utils.QueryPage; |
||||
|
import com.gaotao.modules.finishedProduct.entity.Warehouse; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class PoOrderRollNo extends QueryPage { |
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String site; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String buNo; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String inspectionNo; |
||||
|
|
||||
|
/** |
||||
|
* 采购单号 |
||||
|
*/ |
||||
|
private String orderNo; |
||||
|
|
||||
|
/** |
||||
|
* 行号 |
||||
|
*/ |
||||
|
private String itemNo; |
||||
|
|
||||
|
/** |
||||
|
* 卷号 |
||||
|
*/ |
||||
|
private String rollNo; |
||||
|
|
||||
|
/** |
||||
|
* 卷数量 |
||||
|
*/ |
||||
|
private BigDecimal rollQty; |
||||
|
|
||||
|
/** |
||||
|
* 物料编码 |
||||
|
*/ |
||||
|
private String partNo; |
||||
|
|
||||
|
/** |
||||
|
* 物料名称 |
||||
|
*/ |
||||
|
private String partDesc; |
||||
|
|
||||
|
/** |
||||
|
* 供应商编码 |
||||
|
*/ |
||||
|
private String supplierId; |
||||
|
|
||||
|
/** |
||||
|
* 供应商名称 |
||||
|
*/ |
||||
|
private String supplierName; |
||||
|
|
||||
|
/** |
||||
|
* 采购订单数量 |
||||
|
*/ |
||||
|
private String orderQty; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建日期 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date createdDate; |
||||
|
|
||||
|
/** |
||||
|
* 最近更新人 |
||||
|
*/ |
||||
|
private String updateBy; |
||||
|
|
||||
|
/** |
||||
|
* 最近更新时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date updatedDate; |
||||
|
|
||||
|
/** |
||||
|
* 删除状态 |
||||
|
*/ |
||||
|
private String delflag; |
||||
|
|
||||
|
/** |
||||
|
* 版本号 |
||||
|
*/ |
||||
|
private Integer version; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Integer printFlag; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String citemCode; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String citemClass; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String sendtoAddress; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String hardtagInFlag; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String batchNo; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date productionDate; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String validityPeriod; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String chipDiskNo; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date expirationWarningDate; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8") |
||||
|
private Date expirationDate; |
||||
|
|
||||
|
public String getSite() { |
||||
|
return site; |
||||
|
} |
||||
|
|
||||
|
public void setSite(String site) { |
||||
|
this.site = site; |
||||
|
} |
||||
|
|
||||
|
public String getBuNo() { |
||||
|
return buNo; |
||||
|
} |
||||
|
|
||||
|
public void setBuNo(String buNo) { |
||||
|
this.buNo = buNo; |
||||
|
} |
||||
|
|
||||
|
public String getInspectionNo() { |
||||
|
return inspectionNo; |
||||
|
} |
||||
|
|
||||
|
public void setInspectionNo(String inspectionNo) { |
||||
|
this.inspectionNo = inspectionNo; |
||||
|
} |
||||
|
|
||||
|
public String getOrderNo() { |
||||
|
return orderNo; |
||||
|
} |
||||
|
|
||||
|
public void setOrderNo(String orderNo) { |
||||
|
this.orderNo = orderNo; |
||||
|
} |
||||
|
|
||||
|
public String getItemNo() { |
||||
|
return itemNo; |
||||
|
} |
||||
|
|
||||
|
public void setItemNo(String itemNo) { |
||||
|
this.itemNo = itemNo; |
||||
|
} |
||||
|
|
||||
|
public String getRollNo() { |
||||
|
return rollNo; |
||||
|
} |
||||
|
|
||||
|
public void setRollNo(String rollNo) { |
||||
|
this.rollNo = rollNo; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getRollQty() { |
||||
|
return rollQty; |
||||
|
} |
||||
|
|
||||
|
public void setRollQty(BigDecimal rollQty) { |
||||
|
this.rollQty = rollQty; |
||||
|
} |
||||
|
|
||||
|
public String getPartNo() { |
||||
|
return partNo; |
||||
|
} |
||||
|
|
||||
|
public void setPartNo(String partNo) { |
||||
|
this.partNo = partNo; |
||||
|
} |
||||
|
|
||||
|
public String getPartDesc() { |
||||
|
return partDesc; |
||||
|
} |
||||
|
|
||||
|
public void setPartDesc(String partDesc) { |
||||
|
this.partDesc = partDesc; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierId() { |
||||
|
return supplierId; |
||||
|
} |
||||
|
|
||||
|
public void setSupplierId(String supplierId) { |
||||
|
this.supplierId = supplierId; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierName() { |
||||
|
return supplierName; |
||||
|
} |
||||
|
|
||||
|
public void setSupplierName(String supplierName) { |
||||
|
this.supplierName = supplierName; |
||||
|
} |
||||
|
|
||||
|
public String getOrderQty() { |
||||
|
return orderQty; |
||||
|
} |
||||
|
|
||||
|
public void setOrderQty(String orderQty) { |
||||
|
this.orderQty = orderQty; |
||||
|
} |
||||
|
|
||||
|
public String getCreatedBy() { |
||||
|
return createdBy; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedBy(String createdBy) { |
||||
|
this.createdBy = createdBy; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedDate() { |
||||
|
return createdDate; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedDate(Date createdDate) { |
||||
|
this.createdDate = createdDate; |
||||
|
} |
||||
|
|
||||
|
public String getUpdateBy() { |
||||
|
return updateBy; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateBy(String updateBy) { |
||||
|
this.updateBy = updateBy; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedDate() { |
||||
|
return updatedDate; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedDate(Date updatedDate) { |
||||
|
this.updatedDate = updatedDate; |
||||
|
} |
||||
|
|
||||
|
public String getDelflag() { |
||||
|
return delflag; |
||||
|
} |
||||
|
|
||||
|
public void setDelflag(String delflag) { |
||||
|
this.delflag = delflag; |
||||
|
} |
||||
|
|
||||
|
public Integer getVersion() { |
||||
|
return version; |
||||
|
} |
||||
|
|
||||
|
public void setVersion(Integer version) { |
||||
|
this.version = version; |
||||
|
} |
||||
|
|
||||
|
public Integer getPrintFlag() { |
||||
|
return printFlag; |
||||
|
} |
||||
|
|
||||
|
public void setPrintFlag(Integer printFlag) { |
||||
|
this.printFlag = printFlag; |
||||
|
} |
||||
|
|
||||
|
public String getCitemCode() { |
||||
|
return citemCode; |
||||
|
} |
||||
|
|
||||
|
public void setCitemCode(String citemCode) { |
||||
|
this.citemCode = citemCode; |
||||
|
} |
||||
|
|
||||
|
public String getCitemClass() { |
||||
|
return citemClass; |
||||
|
} |
||||
|
|
||||
|
public void setCitemClass(String citemClass) { |
||||
|
this.citemClass = citemClass; |
||||
|
} |
||||
|
|
||||
|
public String getSendtoAddress() { |
||||
|
return sendtoAddress; |
||||
|
} |
||||
|
|
||||
|
public void setSendtoAddress(String sendtoAddress) { |
||||
|
this.sendtoAddress = sendtoAddress; |
||||
|
} |
||||
|
|
||||
|
public String getHardtagInFlag() { |
||||
|
return hardtagInFlag; |
||||
|
} |
||||
|
|
||||
|
public void setHardtagInFlag(String hardtagInFlag) { |
||||
|
this.hardtagInFlag = hardtagInFlag; |
||||
|
} |
||||
|
|
||||
|
public String getBatchNo() { |
||||
|
return batchNo; |
||||
|
} |
||||
|
|
||||
|
public void setBatchNo(String batchNo) { |
||||
|
this.batchNo = batchNo; |
||||
|
} |
||||
|
|
||||
|
public Date getProductionDate() { |
||||
|
return productionDate; |
||||
|
} |
||||
|
|
||||
|
public void setProductionDate(Date productionDate) { |
||||
|
this.productionDate = productionDate; |
||||
|
} |
||||
|
|
||||
|
public String getValidityPeriod() { |
||||
|
return validityPeriod; |
||||
|
} |
||||
|
|
||||
|
public void setValidityPeriod(String validityPeriod) { |
||||
|
this.validityPeriod = validityPeriod; |
||||
|
} |
||||
|
|
||||
|
public String getChipDiskNo() { |
||||
|
return chipDiskNo; |
||||
|
} |
||||
|
|
||||
|
public void setChipDiskNo(String chipDiskNo) { |
||||
|
this.chipDiskNo = chipDiskNo; |
||||
|
} |
||||
|
|
||||
|
public Date getExpirationWarningDate() { |
||||
|
return expirationWarningDate; |
||||
|
} |
||||
|
|
||||
|
public void setExpirationWarningDate(Date expirationWarningDate) { |
||||
|
this.expirationWarningDate = expirationWarningDate; |
||||
|
} |
||||
|
|
||||
|
public Date getExpirationDate() { |
||||
|
return expirationDate; |
||||
|
} |
||||
|
|
||||
|
public void setExpirationDate(Date expirationDate) { |
||||
|
this.expirationDate = expirationDate; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package com.gaotao.modules.wms.service; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.wms.data.InboundQcResultData; |
||||
|
import com.gaotao.modules.wms.data.PoOrderRollNoOutData; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @CLASSNAME WmsPrintService |
||||
|
* @DESCRIPTION 采购标签生成服务接口 |
||||
|
* @DATE 2024/01/01 |
||||
|
* @VERSION 1.0 |
||||
|
**/ |
||||
|
public interface WmsPrintService { |
||||
|
PageUtils getInboundQcResultData(InboundQcResultData inData); |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @description |
||||
|
* @author 常熟吴彦祖 |
||||
|
* @date 2025/8/19 14:08 |
||||
|
* @return List<PoOrderRollNoOutData> |
||||
|
*/ |
||||
|
List<PoOrderRollNoOutData> getPoOrderRollNoOutData(PoOrderRollNoOutData inData); |
||||
|
|
||||
|
PoOrderRollNoOutData getInboundQcResultOtherData(InboundQcResultData inData); |
||||
|
|
||||
|
void submitPoOrderRollNo(PoOrderRollNoOutData inData); |
||||
|
} |
||||
@ -0,0 +1,99 @@ |
|||||
|
package com.gaotao.modules.wms.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.gaotao.common.utils.DateUtils; |
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.modules.pms.data.QcDetailReport; |
||||
|
import com.gaotao.modules.sys.entity.SysUserEntity; |
||||
|
import com.gaotao.modules.trans.entity.TransNoControl; |
||||
|
import com.gaotao.modules.trans.service.TransNoControlService; |
||||
|
import com.gaotao.modules.wms.dao.WmsPrintDao; |
||||
|
import com.gaotao.modules.wms.data.InboundQcResultData; |
||||
|
import com.gaotao.modules.wms.data.PoOrderRollNoOutData; |
||||
|
import com.gaotao.modules.wms.service.WmsPrintService; |
||||
|
import org.apache.shiro.SecurityUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @CLASSNAME WmsPrintServiceImpl |
||||
|
* @DESCRIPTION 采购标签生成服务实现类 |
||||
|
* @DATE 2024/01/01 |
||||
|
* @VERSION 1.0 |
||||
|
**/ |
||||
|
@Service("wmsPrintService") |
||||
|
public class WmsPrintServiceImpl implements WmsPrintService { |
||||
|
@Autowired |
||||
|
private WmsPrintDao wmsPrintDao; |
||||
|
@Autowired |
||||
|
private TransNoControlService transNoService; |
||||
|
|
||||
|
@Override |
||||
|
public PageUtils getInboundQcResultData(InboundQcResultData data) { |
||||
|
IPage<InboundQcResultData> list = this.wmsPrintDao.getInboundQcResultData(new Page<InboundQcResultData>(data.getPage(), data.getLimit()), data); |
||||
|
return new PageUtils(list); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PoOrderRollNoOutData> getPoOrderRollNoOutData(PoOrderRollNoOutData inData){ |
||||
|
return wmsPrintDao.getPoOrderRollNoOutData(inData); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PoOrderRollNoOutData getInboundQcResultOtherData(InboundQcResultData inData){ |
||||
|
return wmsPrintDao.getInboundQcResultOtherData(inData); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional |
||||
|
public void submitPoOrderRollNo(PoOrderRollNoOutData inData){ |
||||
|
Integer nowRollCount=inData.getRollCount(); |
||||
|
SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
||||
|
for (int i = 0; i <nowRollCount ; i++) { |
||||
|
PoOrderRollNoOutData saveData = new PoOrderRollNoOutData(); |
||||
|
TransNoControl transNo = transNoService.getTransNo(inData.getSite(),"LabelNo",inData.getBuNo()); |
||||
|
if(transNo == null){ |
||||
|
throw new RuntimeException("卷号生成失败,请联系管理员!"); |
||||
|
} |
||||
|
saveData.setSite(inData.getSite()); |
||||
|
saveData.setBuNo(inData.getBuNo()); |
||||
|
saveData.setInspectionNo(inData.getOrderNo()); |
||||
|
saveData.setOrderNo(inData.getPoOrderNo()); |
||||
|
saveData.setItemNo(inData.getPoItemNo()); |
||||
|
saveData.setRollNo(transNo.getNewTransNo()); |
||||
|
if(i==(nowRollCount-1)&&inData.getTailRollQty().compareTo(new BigDecimal(0))>0){ |
||||
|
saveData.setRollQty(inData.getTailRollQty()); |
||||
|
}else { |
||||
|
saveData.setRollQty(inData.getRollQty()); |
||||
|
} |
||||
|
saveData.setPartNo(inData.getPartNo()); |
||||
|
saveData.setPartDesc(inData.getPartDesc()); |
||||
|
saveData.setSupplierId(inData.getSupplierId()); |
||||
|
saveData.setSupplierName(inData.getSupplierName()); |
||||
|
saveData.setOrderQty(inData.getOrderQty()); |
||||
|
saveData.setCreatedBy(currentUser.getUsername()); |
||||
|
saveData.setDelflag("N"); |
||||
|
saveData.setVersion(0); |
||||
|
saveData.setPrintFlag(0); |
||||
|
saveData.setHardtagInFlag("未入库"); |
||||
|
saveData.setProductionDate(inData.getProductionDate()); |
||||
|
saveData.setBatchNo(inData.getBatchNo()); |
||||
|
if("Y".equals(saveData.getExpirationFlag())&&inData.getProductionDate()!=null){ |
||||
|
if(inData.getExpirationDay()!=null&&inData.getExpirationDay()>0){ |
||||
|
saveData.setExpirationDate( DateUtils.addDateDays(inData.getProductionDate(),inData.getExpirationDay())); |
||||
|
} |
||||
|
if(inData.getExpirationWarningDay()!=null&&inData.getExpirationWarningDay()>0){ |
||||
|
saveData.setExpirationWarningDate( DateUtils.addDateDays(inData.getProductionDate(),inData.getExpirationWarningDay())); |
||||
|
} |
||||
|
} |
||||
|
wmsPrintDao.savePoOrderRollNo(saveData); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
<?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.gaotao.modules.wms.dao.WmsPrintDao"> |
||||
|
|
||||
|
<select id="getInboundQcResultData" resultType="InboundQcResultData"> |
||||
|
select a.site,a.bu_no,a.order_no,a.order_status,b.part_no,b.part_desc,b.po_orderNo,b.po_itemNo,c.SupplierName,c.supplierID as supplierId, |
||||
|
b.inspector_date,b.submit_date,a.order_qty,roll_qty,roll_count,inspection_result,disposal_measures, |
||||
|
B.batch_qualified_qty,b.inspector_no |
||||
|
from inbound_notification_head a |
||||
|
inner join qc_iqc_record b on a.site = b.site and a.bu_no = b.bu_no and a.order_no = b.inspection_no AND A.order_type ='采购入库' |
||||
|
left join Supplier c on a.site = c.Site and a.Supplier_ID = c.supplierID |
||||
|
<where> |
||||
|
<if test="query.site != null and query.site != ''"> |
||||
|
and A.site=#{query.site,jdbcType=VARCHAR} |
||||
|
</if> |
||||
|
<if test="query.buNo != null and query.buNo != ''"> |
||||
|
and A.bu_no=#{query.buNo,jdbcType=CHAR} |
||||
|
</if> |
||||
|
<if test="query.orderNo != null and query.orderNo != ''"> |
||||
|
and A.order_no like '%'+ #{query.orderNo,jdbcType=CHAR} +'%' |
||||
|
</if> |
||||
|
<if test="query.startDate != null"> |
||||
|
and b.inspector_date > #{query.startDate} |
||||
|
</if> |
||||
|
<if test="query.endDate != null"> |
||||
|
and #{query.endDate} > b.inspector_date |
||||
|
</if> |
||||
|
<if test="query.supplierName != null and query.supplierName != ''"> |
||||
|
and c.SupplierName like '%'+ #{query.supplierName} +'%' |
||||
|
</if> |
||||
|
<if test="query.poOrderNo != null and query.poOrderNo != ''"> |
||||
|
and c.po_orderNo like '%'+ #{query.poOrderNo} +'%' |
||||
|
</if> |
||||
|
<if test="query.poItemNo != null and query.poItemNo != ''"> |
||||
|
and c.po_itemNo = #{query.supplierName} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="getPoOrderRollNoOutData" resultType="PoOrderRollNoOutData"> |
||||
|
select ROW_NUMBER() OVER (ORDER BY a.created_date) orderId,a.site,a.bu_no,a.inspection_no,a.order_no,a.item_no,a.roll_no,a.roll_qty,a.part_no,a.part_desc,a.supplier_id,a.supplier_name, |
||||
|
a.order_qty,a.created_by,a.created_date,a.update_by,a.updated_date,a.delflag,a.version,a.print_flag,a.citem_code, |
||||
|
a.citem_class,a.sendto_address,a.hardtag_in_flag,a.batch_no,a.production_date,a.validity_period,a.chip_disk_no, |
||||
|
a.expiration_warning_date,a.expiration_date |
||||
|
|
||||
|
from po_order_roll_no a |
||||
|
<where> |
||||
|
|
||||
|
and A.site=#{site} |
||||
|
|
||||
|
|
||||
|
and A.bu_no=#{buNo} |
||||
|
|
||||
|
|
||||
|
and A.inspection_no=#{inspectionNo,jdbcType=VARCHAR} |
||||
|
|
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="getInboundQcResultOtherData" resultType="PoOrderRollNoOutData"> |
||||
|
select top 1 b.expiration_day,b.expiration_flag,b.exceed_in_ratio,b.expiration_warning_day, |
||||
|
isnull(a.batch_qualified_qty,0)-isnull((select sum(roll_qty) from po_order_roll_no where site=#{site} and bu_no=#{buNo} and inspection_no=#{orderNo} ),0) as remainingIssuableQty |
||||
|
from qc_iqc_record a |
||||
|
left join part b on a.site=b.site and a.bu_no=b.bu_No and a.part_no=b.PartNo |
||||
|
and a.inspection_no=#{orderNo} and a.site=#{site} and a.bu_no=#{buNo} |
||||
|
</select> |
||||
|
<insert id="savePoOrderRollNo"> |
||||
|
insert into po_order_roll_no |
||||
|
(site,bu_no,inspection_no,order_no,item_no,roll_no,roll_qty,part_no,part_desc,supplier_id,supplier_name,order_qty, |
||||
|
created_by,created_date,delflag,version,print_flag, |
||||
|
hardtag_in_flag,batch_no,production_date,expiration_warning_date,expiration_date |
||||
|
) values |
||||
|
(#{site},#{buNo},#{inspectionNo},#{orderNo},#{itemNo},#{rollNo},#{rollQty},#{partNo},#{partDesc},#{supplierId},#{supplierName},#{orderQty}, |
||||
|
#{createdBy},GetDate(),#{delflag},#{version},#{printFlag}, |
||||
|
#{hardtagInFlag},#{batchNo},#{productionDate},#{expirationWarningDate},#{expirationDate}) |
||||
|
</insert> |
||||
|
</mapper> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue