入库部分和接口
This commit is contained in:
@@ -2,6 +2,7 @@ package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,13 +17,21 @@ public class ToErpApiController {
|
||||
|
||||
@Autowired
|
||||
private IToErpService toErpService;
|
||||
@Autowired
|
||||
private IRequestLogService requestLogService;
|
||||
|
||||
/**
|
||||
* 接收入出库通知单
|
||||
*/
|
||||
@PostMapping("/receiveDeliveryNotice")
|
||||
@ResponseBody
|
||||
public AjaxResult receiveDeliveryNotice(@RequestBody DeliveryNoticeVo deliveryNoticeVo) {
|
||||
return toErpService.receiveDeliveryNotice(deliveryNoticeVo);
|
||||
|
||||
AjaxResult ajaxResult = toErpService.receiveDeliveryNotice(deliveryNoticeVo);
|
||||
requestLogService.insertRequestLog(requestLogService.getRequestLog(deliveryNoticeVo.toString(), "接收入出库通知单", ajaxResult));
|
||||
return ajaxResult;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +39,9 @@ public class ToErpApiController {
|
||||
* 回传其他出入库单
|
||||
*/
|
||||
// @Scheduled(fixedDelay = 1500)
|
||||
public void callbackTransferBill() {
|
||||
toErpService.callbackTransferBill();
|
||||
@RequestMapping("/callbackDeliveryNotice")
|
||||
@ResponseBody
|
||||
public AjaxResult callbackDeliveryNotice(String billNo) {
|
||||
return toErpService.callbackDeliveryNotice(billNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,12 @@ import lombok.ToString;
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class DeliveryNoticeItemVo {
|
||||
|
||||
|
||||
/** 行号 */
|
||||
private String lineNo;
|
||||
/** 单据号 */
|
||||
private String billNo;
|
||||
/** 存货编码 */
|
||||
private String inventoryCode;
|
||||
/** 存货名称 */
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IToErpService {
|
||||
AjaxResult receiveDeliveryNotice(DeliveryNoticeVo deliveryNoticeVo);
|
||||
|
||||
|
||||
void callbackTransferBill();
|
||||
AjaxResult callbackDeliveryNotice(String billNo);
|
||||
|
||||
AjaxResult createWorkshopInboundOrder(BasProduct basProduct);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.in.stockinfinish.domain.InStockinFinish;
|
||||
import com.ruoyi.in.stockinfinish.service.IInStockinFinishService;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
@@ -25,7 +27,9 @@ import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
|
||||
import com.ruoyi.out.outStockout.mapper.OutStockoutMapper;
|
||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||
import org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -65,6 +69,9 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
@Autowired
|
||||
private IOutStockoutDetailService outStockoutDetailService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinFinishService inStockinFinishService;
|
||||
|
||||
private static final String TO_ERP_URL = "http://192.168.1.100:8080/api/";
|
||||
|
||||
//todo 需要调试
|
||||
@@ -119,6 +126,9 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
if ("2".equals(opType) && exist == null) {
|
||||
return AjaxResult.error("单据不存在,无法修改");
|
||||
}
|
||||
if("1".equals(opType) && exist != null){
|
||||
return AjaxResult.error("单据已存在,请勿重复添加");
|
||||
}
|
||||
if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) {
|
||||
return AjaxResult.error("单据已执行,禁止修改");
|
||||
}
|
||||
@@ -149,8 +159,8 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
inStockinDetailService.deleteInStockinDetailByStockinGuid(inStockin.getStockinGuid());
|
||||
}
|
||||
List<DeliveryNoticeItemVo> items = deliveryNoticeVo.getDetailList();
|
||||
List<InStockinDetail> detailList = new ArrayList<>();
|
||||
int i = 1;
|
||||
|
||||
|
||||
for (DeliveryNoticeItemVo item : items) {
|
||||
InStockinDetail detail = new InStockinDetail();
|
||||
detail.setStockinGuid(inStockin.getStockinGuid());
|
||||
@@ -162,13 +172,16 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
detail.setUnit(item.getUnit());
|
||||
detail.setQuantity(item.getQuantity());
|
||||
detail.setLotNo(item.getLotNo());
|
||||
detail.setStockStatus("0");
|
||||
detail.setSpare1(item.getLevelRelation());
|
||||
detail.setSpare2(item.getUpperMaterial());
|
||||
detail.setSpare3(item.getTopMaterial());
|
||||
detail.setRemark(item.getRemark());
|
||||
detail.setAssignNum("0");
|
||||
detail.setScanNum("0");
|
||||
detailList.add(detail);
|
||||
i++;
|
||||
inStockinDetailService.insertInStockinDetail(detail);
|
||||
|
||||
}
|
||||
inStockinDetailService.insertInStockinDetailList(detailList);
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
@@ -182,14 +195,14 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
// 删除操作(操作类型3)
|
||||
if ("3".equals(opType)) {
|
||||
if (exist == null) {
|
||||
return AjaxResult.success();
|
||||
return AjaxResult.error("单据不存在");
|
||||
}
|
||||
if ("3".equals(exist.getStatus())) {
|
||||
return AjaxResult.error("单据已完成,禁止删除");
|
||||
return AjaxResult.error("单据已执行,禁止删除");
|
||||
}
|
||||
OutStockoutDetail q = new OutStockoutDetail();
|
||||
q.setStockoutId(deliveryNoticeVo.getBillNo());
|
||||
List<OutStockoutDetail> details = outStockoutDetailService.selectOutStockoutDetailList(q);
|
||||
OutStockoutDetail outStockoutDetail = new OutStockoutDetail();
|
||||
outStockoutDetail.setStockoutId(deliveryNoticeVo.getBillNo());
|
||||
List<OutStockoutDetail> details = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail);
|
||||
if (details != null && !details.isEmpty()) {
|
||||
String[] ids = details.stream().map(OutStockoutDetail::getStockoutDetailId).toArray(String[]::new);
|
||||
outStockoutDetailService.deleteOutStockoutDetailByStockoutDetailIds(ids);
|
||||
@@ -203,15 +216,19 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
if ("2".equals(opType) && exist == null) {
|
||||
return AjaxResult.error("单据不存在,无法修改");
|
||||
}
|
||||
if (exist != null && "3".equals(exist.getStatus())) {
|
||||
return AjaxResult.error("单据已完成,禁止修改");
|
||||
if ("1".equals(opType) && exist != null){
|
||||
return AjaxResult.error("单据已存在,请勿重复添加");
|
||||
}
|
||||
if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType) ) {
|
||||
return AjaxResult.error("单据已执行,禁止修改");
|
||||
}
|
||||
OutStockout out = exist != null ? exist : new OutStockout();
|
||||
|
||||
if (exist == null) {
|
||||
out.setStockoutGuid(UUID.randomUUID().toString());
|
||||
}
|
||||
out.setStockoutId(deliveryNoticeVo.getBillNo());
|
||||
out.setOutType(deliveryNoticeVo.getOutType());
|
||||
out.setOutType(deliveryNoticeVo.getBillType());
|
||||
out.setCreateDate(deliveryNoticeVo.getBillDate());
|
||||
out.setCreateManId(deliveryNoticeVo.getCreateMan());
|
||||
out.setStatus("1");
|
||||
@@ -219,6 +236,13 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
out.setStockoutSource("1");
|
||||
out.setDepartmentNo(deliveryNoticeVo.getProjectNo());
|
||||
out.setCustomerNo(deliveryNoticeVo.getCustomerId());
|
||||
out.setClassNowId(deliveryNoticeVo.getCustomerName());
|
||||
out.setSpare1(deliveryNoticeVo.getContractNo());//合同号
|
||||
out.setSpare2(deliveryNoticeVo.getSalesOrderNo());//销售订单号
|
||||
out.setSpare3(deliveryNoticeVo.getApproveDate());//审核时间
|
||||
out.setSpare4(deliveryNoticeVo.getApproveMan());//审核人
|
||||
out.setSpare5(deliveryNoticeVo.getRemark());
|
||||
|
||||
if (exist == null) {
|
||||
outStockoutService.insertOutStockout(out);
|
||||
} else {
|
||||
@@ -231,22 +255,32 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
outStockoutDetailService.deleteOutStockoutDetailByStockoutDetailIds(ids);
|
||||
}
|
||||
}
|
||||
int i = 1;
|
||||
|
||||
for (DeliveryNoticeItemVo item : deliveryNoticeVo.getDetailList()) {
|
||||
OutStockoutDetail d = new OutStockoutDetail();
|
||||
String line = item.getLineNo() != null ? item.getLineNo() : String.valueOf(i);
|
||||
d.setStockoutDetailId(out.getStockoutId()+"-"+line);
|
||||
|
||||
d.setStockoutDetailId(item.getLineNo());
|
||||
d.setStockoutGuid(out.getStockoutGuid());
|
||||
d.setStockoutId(out.getStockoutId());
|
||||
d.setProductId(item.getInventoryCode());
|
||||
d.setProductId(item.getInventoryCode());
|
||||
d.setLotNo(item.getLotNo());
|
||||
d.setSpec(item.getSpecModel());
|
||||
d.setUnit(item.getUnit());
|
||||
d.setSpare1(item.getLevelRelation());
|
||||
d.setSpare2(item.getUpperMaterial());
|
||||
d.setSpare3(item.getTopMaterial());
|
||||
d.setRemark(item.getRemark());
|
||||
|
||||
try {
|
||||
d.setQuantity(new BigDecimal(item.getQuantity()));
|
||||
d.setAllotQuantity(BigDecimal.ZERO);
|
||||
d.setAssignNum(BigDecimal.ZERO);
|
||||
} catch (Exception e) {
|
||||
d.setQuantity(BigDecimal.ZERO);
|
||||
}
|
||||
outStockoutDetailService.insertOutStockoutDetail(d);
|
||||
i++;
|
||||
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -257,19 +291,63 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
|
||||
@Override
|
||||
public void callbackTransferBill() {
|
||||
TransferBillCallback param = new TransferBillCallback();
|
||||
param.setStatus("0");
|
||||
List<TransferBillCallback> list = transferBillCallbackService.selectTransferBillCallbackList(param);
|
||||
for (TransferBillCallback transferBillCallback : list) {
|
||||
//todo 请求其他出入库单回传接口
|
||||
AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(transferBillCallback);
|
||||
if (otherInOutboundOrder.isSuccess()){
|
||||
transferBillCallback.setStatus("1");
|
||||
transferBillCallback.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||
transferBillCallbackService.updateTransferBillCallback(transferBillCallback);
|
||||
public AjaxResult callbackDeliveryNotice(String billNo) {
|
||||
InStockin inStockin = null;
|
||||
|
||||
inStockin = inStockinService.selectInStockinByStockinId(billNo);
|
||||
if(inStockin==null) {
|
||||
InStockinFinish inStockinFinish = inStockinFinishService.selectInStockinFinishByStockinId(billNo);
|
||||
|
||||
if (inStockinFinish == null) {
|
||||
return AjaxResult.error("单据不存在");
|
||||
}else{
|
||||
//将inStockinFinish对象中的所有值赋给inStockin
|
||||
inStockin = new InStockin();
|
||||
BeanUtils.copyProperties(inStockinFinish, inStockin);
|
||||
}
|
||||
}
|
||||
|
||||
DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo();
|
||||
deliveryNoticeVo.setBillNo(inStockin.getStockinId());
|
||||
deliveryNoticeVo.setBillType(inStockin.getInType());
|
||||
deliveryNoticeVo.setBillDate(inStockin.getCreateDate());
|
||||
deliveryNoticeVo.setCreateMan(inStockin.getCreateManId());
|
||||
deliveryNoticeVo.setWarehouseId(inStockin.getWarehouseId());
|
||||
deliveryNoticeVo.setProjectNo(inStockin.getDepartmentNo());
|
||||
deliveryNoticeVo.setCustomerId(inStockin.getSupplierNo());
|
||||
deliveryNoticeVo.setCustomerName(inStockin.getClassNo()); // 对应receiveDeliveryNotice中的映射
|
||||
deliveryNoticeVo.setContractNo(inStockin.getSpare1());
|
||||
deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2());
|
||||
deliveryNoticeVo.setApproveDate(inStockin.getSpare3());
|
||||
deliveryNoticeVo.setApproveMan(inStockin.getSpare4());
|
||||
deliveryNoticeVo.setRemark(inStockin.getSpare5());
|
||||
|
||||
InStockinDetail inStockinDetailParam = new InStockinDetail();
|
||||
inStockinDetailParam.setStockinId(billNo);
|
||||
List<InStockinDetail> inStockinDetails = inStockinDetailService.selectInStockinDetailList(inStockinDetailParam);
|
||||
|
||||
List<DeliveryNoticeItemVo> detailList = new ArrayList<>();
|
||||
if (inStockinDetails != null && !inStockinDetails.isEmpty()) {
|
||||
for (InStockinDetail detail : inStockinDetails) {
|
||||
DeliveryNoticeItemVo item = new DeliveryNoticeItemVo();
|
||||
item.setLineNo(detail.getStockinDetailId());
|
||||
item.setBillNo(detail.getStockinId());
|
||||
item.setInventoryCode(detail.getProductId());
|
||||
item.setInventoryName(detail.getProductName());
|
||||
item.setSpecModel(detail.getSpec());
|
||||
item.setUnit(detail.getUnit());
|
||||
item.setQuantity(detail.getAssignNum());
|
||||
item.setLotNo(detail.getLotNo());
|
||||
item.setLevelRelation(detail.getSpare1());
|
||||
item.setUpperMaterial(detail.getSpare2());
|
||||
item.setTopMaterial(detail.getSpare3());
|
||||
item.setRemark(detail.getRemark());
|
||||
detailList.add(item);
|
||||
}
|
||||
}
|
||||
deliveryNoticeVo.setDetailList(detailList);
|
||||
|
||||
return AjaxResult.success(deliveryNoticeVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
|
||||
|
||||
@Override
|
||||
@Scheduled(fixedDelay=1500)
|
||||
// @Scheduled(fixedDelay=1500)
|
||||
public void pushOutMydoJob() {
|
||||
//查询所有未推送的料箱出库作业
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
|
||||
@@ -20,6 +20,9 @@ public interface InStockinMapper
|
||||
*/
|
||||
public InStockin selectInStockinByStockinGuid(String stockinGuid);
|
||||
|
||||
|
||||
public InStockin selectInStockinByStockinId(String stockinId);
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*
|
||||
|
||||
@@ -21,6 +21,7 @@ public interface IInStockinService
|
||||
* @return 入库单据
|
||||
*/
|
||||
public InStockin selectInStockinByStockinGuid(String stockinGuid);
|
||||
public InStockin selectInStockinByStockinId(String stockinId);
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
|
||||
@@ -50,6 +50,11 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
return inStockinMapper.selectInStockinByStockinGuid(stockinGuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InStockin selectInStockinByStockinId(String stockinId) {
|
||||
return inStockinMapper.selectInStockinByStockinId(stockinId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据列表
|
||||
*
|
||||
|
||||
@@ -20,6 +20,7 @@ public interface InStockinFinishMapper
|
||||
* @return 历史入库单据主信息
|
||||
*/
|
||||
public InStockinFinish selectInStockinFinishByStockinGuid(String stockinGuid);
|
||||
public InStockinFinish selectInStockinFinishByStockinId(String stockinId);
|
||||
|
||||
/**
|
||||
* 查询历史入库单据主信息列表
|
||||
|
||||
@@ -20,6 +20,7 @@ public interface IInStockinFinishService
|
||||
* @return 历史入库单据主信息
|
||||
*/
|
||||
public InStockinFinish selectInStockinFinishByStockinGuid(String stockinGuid);
|
||||
public InStockinFinish selectInStockinFinishByStockinId(String stockinId);
|
||||
|
||||
/**
|
||||
* 查询历史入库单据主信息列表
|
||||
|
||||
@@ -34,6 +34,13 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService
|
||||
return inStockinFinishMapper.selectInStockinFinishByStockinGuid(stockinGuid);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InStockinFinish selectInStockinFinishByStockinId(String stockinId)
|
||||
{
|
||||
return inStockinFinishMapper.selectInStockinFinishByStockinId(stockinId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史入库单据主信息列表
|
||||
*
|
||||
|
||||
@@ -62,11 +62,9 @@ public class RequestLogServiceImpl implements IRequestLogService
|
||||
@Override
|
||||
public int insertRequestLog(RequestLog requestLog)
|
||||
{
|
||||
if (requestLog.getIsSuccessful().equals("1")){
|
||||
|
||||
return requestLogMapper.insertRequestLog(requestLog);
|
||||
}else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,6 +82,15 @@ public class OutStockout extends BaseEntity
|
||||
|
||||
@Excel(name = "确认时间")
|
||||
private String finishDate;
|
||||
private String spare1;
|
||||
|
||||
private String spare2;
|
||||
|
||||
private String spare3;
|
||||
|
||||
private String spare4;
|
||||
|
||||
private String spare5;
|
||||
|
||||
private String customerName;
|
||||
|
||||
@@ -299,24 +308,76 @@ public class OutStockout extends BaseEntity
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
public String getSpare1() {
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1) {
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare2() {
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2) {
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare3() {
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3) {
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare4() {
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4) {
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare5() {
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5) {
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("outType", getOutType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("stockoutSource", getStockoutSource())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("classNowId", getClassNowId())
|
||||
.append("exitId", getExitId())
|
||||
.append("carNumber", getCarNumber())
|
||||
.append("FID", getFID())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.toString();
|
||||
return "OutStockout{" +
|
||||
"stockoutGuid='" + stockoutGuid + '\'' +
|
||||
", stockoutId='" + stockoutId + '\'' +
|
||||
", outType='" + outType + '\'' +
|
||||
", createDate='" + createDate + '\'' +
|
||||
", departmentNo='" + departmentNo + '\'' +
|
||||
", customerNo='" + customerNo + '\'' +
|
||||
", createManId='" + createManId + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", stockoutSource='" + stockoutSource + '\'' +
|
||||
", warehouseId='" + warehouseId + '\'' +
|
||||
", classNowId='" + classNowId + '\'' +
|
||||
", exitId='" + exitId + '\'' +
|
||||
", carNumber='" + carNumber + '\'' +
|
||||
", FID='" + FID + '\'' +
|
||||
", erpStockoutId='" + erpStockoutId + '\'' +
|
||||
", startDate='" + startDate + '\'' +
|
||||
", finishDate='" + finishDate + '\'' +
|
||||
", spare1='" + spare1 + '\'' +
|
||||
", spare2='" + spare2 + '\'' +
|
||||
", spare3='" + spare3 + '\'' +
|
||||
", spare4='" + spare4 + '\'' +
|
||||
", spare5='" + spare5 + '\'' +
|
||||
", customerName='" + customerName + '\'' +
|
||||
", warehouseName='" + warehouseName + '\'' +
|
||||
", productId='" + productId + '\'' +
|
||||
", productName='" + productName + '\'' +
|
||||
", typeData=" + typeData +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,108 @@ public class OutStockoutDetail extends BaseEntity
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
@Excel(name = "型号")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "净重")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "颜色")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "序列号")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "电压")
|
||||
private String spare5;
|
||||
|
||||
/** 备用字段6 */
|
||||
@Excel(name = "功率")
|
||||
private String spare6;
|
||||
@Excel(name = "相位")
|
||||
private String spare7;
|
||||
@Excel(name = "毛重")
|
||||
private String spare8;
|
||||
|
||||
private String spare9;
|
||||
|
||||
|
||||
public String getSpare1() {
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1) {
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare2() {
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2) {
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare3() {
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3) {
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare4() {
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4) {
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare5() {
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5) {
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare6() {
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6) {
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare7() {
|
||||
return spare7;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7) {
|
||||
this.spare7 = spare7;
|
||||
}
|
||||
|
||||
public String getSpare8() {
|
||||
return spare8;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8) {
|
||||
this.spare8 = spare8;
|
||||
}
|
||||
|
||||
public String getSpare9() {
|
||||
return spare9;
|
||||
}
|
||||
|
||||
public void setSpare9(String spare9) {
|
||||
this.spare9 = spare9;
|
||||
}
|
||||
|
||||
public String getVoltage() {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class OutStockoutDetailServiceImpl implements IOutStockoutDetailService
|
||||
@Override
|
||||
public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail)
|
||||
{
|
||||
outStockoutDetail.setCreateTime(DateUtils.getNowDate());
|
||||
// outStockoutDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,10 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
@Override
|
||||
public AjaxResult confirmIn(String trayCode) {
|
||||
//如果有出库作业,修改作业类型改为合盘入库类型
|
||||
//如果有出库作业,修改作业类型改为合盘入库类型,合盘出库放历史表
|
||||
|
||||
|
||||
|
||||
//如果没有出库作业,正常生成入库作业
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
|
||||
isd.supplier_id, isd.customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
|
||||
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
|
||||
bp.product_name,
|
||||
isd.product_name,
|
||||
isd.spare7,isd.spare8,isd.spare9
|
||||
from in_stockin_detail_finish isd
|
||||
left join bas_product bp on bp.product_id = isd.product_id
|
||||
|
||||
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
|
||||
isd.supplier_id, isd.customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
|
||||
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
|
||||
bp.product_name,
|
||||
isd.product_name,
|
||||
isd.spare7,isd.spare8,isd.spare9
|
||||
from in_stockin_detail isd
|
||||
left join bas_product bp on bp.product_id = isd.product_id
|
||||
@@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
|
||||
<if test="scanNum != null">scan_num,</if>
|
||||
<if test="scanNumX != null">scan_num_x,</if>
|
||||
<if test="scanNumJ != null">scan_num_j,</if>
|
||||
@@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
|
||||
<if test="scanNum != null">#{scanNum},</if>
|
||||
<if test="scanNumX != null">#{scanNumX},</if>
|
||||
<if test="scanNumJ != null">#{scanNumJ},</if>
|
||||
|
||||
@@ -110,6 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectInStockinFinishVo"/>
|
||||
where is2.stockin_guid = #{stockinGuid}
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinFinishByStockinId" parameterType="String" resultMap="InStockinFinishResult">
|
||||
<include refid="selectInStockinFinishVo"/>
|
||||
where is2.stockin_id = #{stockinId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectInStockinFinishListByInStockin" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinFinishVo"/>
|
||||
<where>
|
||||
@@ -135,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail_finish isd
|
||||
left join bas_product bp on isd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
where isd.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
|
||||
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail isd
|
||||
left join bas_product bp on isd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
where isd.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
@@ -111,6 +111,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where is2.stockin_guid = #{stockinGuid}
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinByStockinId" parameterType="String" resultMap="InStockinResult">
|
||||
<include refid="selectInStockinVo"/>
|
||||
where is2.stockin_id = #{stockinId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockin" parameterType="InStockin">
|
||||
insert into in_stockin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="targetCargoSpaceName" column="target_cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="departmentName" column="dept_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMydoJobVo">
|
||||
@@ -46,14 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mj.exit_id, mj.class_id, mj.warehouse_id, mj.fault_flag,
|
||||
bs.supplier_name as supplier_name, bc.customer_name as customer_name,
|
||||
bcs.cargo_space_name as cargo_space_name, bcst.cargo_space_name as target_cargo_space_name,
|
||||
bw.warehouse_name as warehouse_name,sd.dept_name
|
||||
bw.warehouse_name as warehouse_name
|
||||
from mydo_job mj
|
||||
left join bas_supplier bs on mj.supplier_id = bs.id
|
||||
left join bas_customer bc on mj.customer_id = bc.id
|
||||
left join bas_cargo_space bcs on mj.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_cargo_space bcst on mj.target_cargo_space_id = bcst.cargo_space_id
|
||||
left join bas_warehouse bw on mj.warehouse_id = bw.warehouse_id
|
||||
left join sys_dept sd on mj.department_id = sd.dept_id
|
||||
|
||||
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -33,18 +33,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
@@ -52,9 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
d.product_name
|
||||
d.erp_stockout_id, d.unit, d.spec,
|
||||
d.product_name ,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9
|
||||
from out_stockout_detail d
|
||||
</sql>
|
||||
|
||||
@@ -88,17 +84,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="unit != null and unit != ''"> and d.unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and d.spec like concat('%', #{spec}, '%')</if>
|
||||
|
||||
<if test="supplierId != null and supplierId != ''"> and d.supplier_id like concat('%', #{supplierId}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and d.cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and d.print_date = #{printDate}</if>
|
||||
<if test="voltage != null and voltage != ''"> and d.voltage = #{voltage}</if>
|
||||
<if test="power != null and power != ''"> and d.power = #{power}</if>
|
||||
<if test="phase != null and phase != ''"> and d.phase = #{phase}</if>
|
||||
<if test="netWeight != null "> and d.net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and d.gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and d.distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and d.model = #{model}</if>
|
||||
<if test="orderId != null and orderId != ''"> and d.order_id = #{orderId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and isd.spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and isd.spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and isd.spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and isd.spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and isd.spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and isd.spare6 = #{spare6}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and isd.spare7 = #{spare7}</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and isd.spare8 = #{spare8}</if>
|
||||
<if test="spare9 != null and spare9 != ''"> and isd.spare9 = #{spare9}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -138,61 +132,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
</trim>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
</trim>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
@@ -224,18 +213,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
@@ -255,9 +242,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
|
||||
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
|
||||
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
|
||||
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
|
||||
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
|
||||
p.product_name
|
||||
d.erp_stockout_id, d.unit, d.spec,
|
||||
p.product_name,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9
|
||||
from out_stockout_detail d left join bas_product p on d.product_id = p.product_id
|
||||
where d.stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
@@ -24,15 +24,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutVo">
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date from out_stockout
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5 from out_stockout
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
|
||||
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name from out_stockout o
|
||||
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name,o.spare1,o.spare2,o.spare3,o.spare4,o.spare5 from out_stockout o
|
||||
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
|
||||
left join bas_customer bc on bc.customer_no = o.customer_no
|
||||
left join out_stockout_detail d on d.stockout_id = o.stockout_id
|
||||
@@ -57,6 +62,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and is2.spare1 like concat('%', #{spare1},'%')</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and is2.spare2 like concat('%', #{spare2},'%')</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and is2.spare4 = #{spare4}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
|
||||
|
||||
</where>
|
||||
order by o.create_date desc
|
||||
</select>
|
||||
@@ -84,6 +95,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
@@ -101,6 +117,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -123,6 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
@@ -188,6 +214,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
o.erp_stockout_id,
|
||||
o.start_date,
|
||||
o.finish_date,
|
||||
o.spare1,
|
||||
o.spare2,
|
||||
o.spare4,
|
||||
o.spare3,
|
||||
o.spare5,
|
||||
bw.warehouse_name,
|
||||
bc.customer_name
|
||||
from out_stockout o
|
||||
|
||||
Reference in New Issue
Block a user