入库部分和接口
This commit is contained in:
@@ -36,12 +36,22 @@ public class ToErpApiController {
|
||||
|
||||
|
||||
/**
|
||||
* 回传其他出入库单
|
||||
* 回传其他入库单
|
||||
*/
|
||||
// @Scheduled(fixedDelay = 1500)
|
||||
@RequestMapping("/callbackDeliveryNotice")
|
||||
@RequestMapping("/callbackInDeliveryNotice")
|
||||
@ResponseBody
|
||||
public AjaxResult callbackDeliveryNotice(String billNo) {
|
||||
return toErpService.callbackDeliveryNotice(billNo);
|
||||
public void callbackInDeliveryNotice() {
|
||||
toErpService.callbackInDeliveryNotice();
|
||||
}
|
||||
|
||||
/**
|
||||
* 回传其他出库单
|
||||
*/
|
||||
@RequestMapping("/callbackOutDeliveryNotice")
|
||||
@ResponseBody
|
||||
public void callbackDeliveryOutNotice() {
|
||||
toErpService.callbackoutDeliveryNotice();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ public class DeliveryNoticeItemVo {
|
||||
|
||||
/** 行号 */
|
||||
private String lineNo;
|
||||
/** 对应通知行号 */
|
||||
private String notelineNo;
|
||||
/** 单据号 */
|
||||
private String billNo;
|
||||
/** 存货编码 */
|
||||
|
||||
@@ -25,6 +25,8 @@ public class DeliveryNoticeVo {
|
||||
private String isProjectOut;
|
||||
/** 单据号 */
|
||||
private String billNo;
|
||||
/** 原通知单号 */
|
||||
private String noteBillNo;
|
||||
/** 单据时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
private String billDate;
|
||||
/** 审核时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
|
||||
@@ -12,7 +12,9 @@ public interface IToErpService {
|
||||
AjaxResult receiveDeliveryNotice(DeliveryNoticeVo deliveryNoticeVo);
|
||||
|
||||
|
||||
AjaxResult callbackDeliveryNotice(String billNo);
|
||||
void callbackInDeliveryNotice();
|
||||
|
||||
void callbackoutDeliveryNotice();
|
||||
|
||||
AjaxResult createWorkshopInboundOrder(BasProduct basProduct);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.ruoyi.in.erp.domain.TransferBillCallback;
|
||||
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockinback.service.IInStockinBackService;
|
||||
import com.ruoyi.in.stockindeatilback.service.IInStockinDetailBackService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.in.stockinfinish.domain.InStockinFinish;
|
||||
@@ -71,6 +73,10 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
@Autowired
|
||||
private IInStockinFinishService inStockinFinishService;
|
||||
@Autowired
|
||||
private IInStockinBackService inStockinBackService;
|
||||
@Autowired
|
||||
private IInStockinDetailBackService inStockinDetailBackService;
|
||||
|
||||
private static final String TO_ERP_URL = "http://192.168.1.100:8080/api/";
|
||||
|
||||
@@ -293,24 +299,15 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult callbackDeliveryNotice(String billNo) {
|
||||
public void callbackInDeliveryNotice() {
|
||||
InStockin inStockin = null;
|
||||
|
||||
inStockin = inStockinService.selectInStockinByStockinId(billNo);
|
||||
if(inStockin==null) {
|
||||
InStockinFinish inStockinFinish = inStockinFinishService.selectInStockinFinishByStockinId(billNo);
|
||||
// inStockin = inStockinService.selectInStockinByStockinId(billNo);
|
||||
|
||||
if (inStockinFinish == null) {
|
||||
return AjaxResult.error("单据不存在");
|
||||
}else{
|
||||
//将inStockinFinish对象中的所有值赋给inStockin
|
||||
inStockin = new InStockin();
|
||||
BeanUtils.copyProperties(inStockinFinish, inStockin);
|
||||
}
|
||||
}
|
||||
|
||||
String billNo="";
|
||||
DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo();
|
||||
deliveryNoticeVo.setBillNo(inStockin.getStockinId());
|
||||
deliveryNoticeVo.setNoteBillNo(inStockin.getStockinId());
|
||||
deliveryNoticeVo.setBillType(inStockin.getInType());
|
||||
deliveryNoticeVo.setBillDate(inStockin.getCreateDate());
|
||||
deliveryNoticeVo.setCreateMan(inStockin.getCreateManId());
|
||||
@@ -333,6 +330,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
for (InStockinDetail detail : inStockinDetails) {
|
||||
DeliveryNoticeItemVo item = new DeliveryNoticeItemVo();
|
||||
item.setLineNo(detail.getStockinDetailId());
|
||||
item.setNotelineNo(detail.getStockinDetailId());
|
||||
item.setBillNo(detail.getStockinId());
|
||||
item.setInventoryCode(detail.getProductId());
|
||||
item.setInventoryName(detail.getProductName());
|
||||
@@ -349,7 +347,13 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
}
|
||||
deliveryNoticeVo.setDetailList(detailList);
|
||||
|
||||
return AjaxResult.success(deliveryNoticeVo);
|
||||
// return AjaxResult.success(deliveryNoticeVo);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void callbackoutDeliveryNotice() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -349,7 +349,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
|
||||
return AjaxResult.error("任务号不能为空");
|
||||
}
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getJobId())) {
|
||||
if (StrUtil.isEmpty(wmsJobRequest.getJobId())) {
|
||||
return AjaxResult.error("任务Id不能为空");
|
||||
}
|
||||
//入库
|
||||
|
||||
@@ -14,8 +14,14 @@ import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.in.stockin.mapper.InStockinMapper;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockinback.domain.InStockinBack;
|
||||
import com.ruoyi.in.stockinback.mapper.InStockinBackMapper;
|
||||
import com.ruoyi.in.stockinback.service.IInStockinBackService;
|
||||
import com.ruoyi.in.stockindeatilback.mapper.InStockinDetailBackMapper;
|
||||
import com.ruoyi.in.stockindeatilback.service.IInStockinDetailBackService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -37,6 +43,10 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
private IInStockinDetailService iInStockinDetailService;
|
||||
@Autowired
|
||||
private IBasJobIdService iBasJobIdService;
|
||||
@Autowired
|
||||
private InStockinBackMapper inStockinBackMapper;
|
||||
@Autowired
|
||||
private InStockinDetailBackMapper inStockinDetailBackMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单据
|
||||
@@ -176,7 +186,9 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
}
|
||||
inStockin.setFinishDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||
inStockinMapper.updateInStockin(inStockin);
|
||||
insertInStockinBack(inStockin);
|
||||
insertInStockinHistory(inStockin);
|
||||
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -196,6 +208,13 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
iInStockinDetailService.deleteInStockinDetailByStockinGuid(inStockin.getStockinGuid());
|
||||
}
|
||||
|
||||
private void insertInStockinBack(InStockin inStockin){
|
||||
|
||||
inStockinBackMapper.insertInStockinBackById(inStockin);
|
||||
inStockinDetailBackMapper.insertInStockinDetailBackById(inStockin);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据
|
||||
*
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.in.stockinback.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.in.stockinback.domain.InStockinBack;
|
||||
import com.ruoyi.in.stockinback.service.IInStockinBackService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库单据主信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/in/stockinback")
|
||||
public class InStockinBackController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInStockinBackService inStockinBackService;
|
||||
|
||||
/**
|
||||
* 查询入库单据主信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InStockinBack inStockinBack)
|
||||
{
|
||||
startPage();
|
||||
List<InStockinBack> list = inStockinBackService.selectInStockinBackList(inStockinBack);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库单据主信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:export')")
|
||||
@Log(title = "入库单据主信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InStockinBack inStockinBack)
|
||||
{
|
||||
List<InStockinBack> list = inStockinBackService.selectInStockinBackList(inStockinBack);
|
||||
ExcelUtil<InStockinBack> util = new ExcelUtil<InStockinBack>(InStockinBack.class);
|
||||
util.exportExcel(response, list, "入库单据主信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据主信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:query')")
|
||||
@GetMapping(value = "/{stockinGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinGuid") String stockinGuid)
|
||||
{
|
||||
return success(inStockinBackService.selectInStockinBackByStockinGuid(stockinGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:add')")
|
||||
@Log(title = "入库单据主信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockinBack inStockinBack)
|
||||
{
|
||||
return toAjax(inStockinBackService.insertInStockinBack(inStockinBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:edit')")
|
||||
@Log(title = "入库单据主信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockinBack inStockinBack)
|
||||
{
|
||||
return toAjax(inStockinBackService.updateInStockinBack(inStockinBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockinback:remove')")
|
||||
@Log(title = "入库单据主信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return toAjax(inStockinBackService.deleteInStockinBackByStockinGuids(stockinGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
package com.ruoyi.in.stockinback.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入库单据主信息对象 in_stockin_back
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class InStockinBack extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID */
|
||||
private String stockinGuid;
|
||||
|
||||
/** 入库订单ID */
|
||||
@Excel(name = "入库订单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 入库类型546 */
|
||||
@Excel(name = "入库类型546")
|
||||
private String inType;
|
||||
|
||||
/** 单据时间546 */
|
||||
@Excel(name = "单据时间546")
|
||||
private String createDate;
|
||||
|
||||
/** 制单人546 */
|
||||
@Excel(name = "制单人546")
|
||||
private String createManId;
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 仓库ID546 */
|
||||
@Excel(name = "仓库ID546")
|
||||
private String warehouseId;
|
||||
|
||||
/** 备注546 */
|
||||
@Excel(name = "备注546")
|
||||
private String spare5;
|
||||
|
||||
/** 审核人546 */
|
||||
@Excel(name = "审核人546")
|
||||
private String spare4;
|
||||
|
||||
/** 审核时间546 */
|
||||
@Excel(name = "审核时间546")
|
||||
private String spare3;
|
||||
|
||||
/** 完成日期 */
|
||||
@Excel(name = " 完成日期")
|
||||
private String finishDate;
|
||||
|
||||
/** 销售订单号546 */
|
||||
@Excel(name = "销售订单号546")
|
||||
private String spare2;
|
||||
|
||||
/** 合同号546 */
|
||||
@Excel(name = "合同号546")
|
||||
private String spare1;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String erpBill;
|
||||
|
||||
/** 单据来源 */
|
||||
@Excel(name = "单据来源")
|
||||
private String stockSource;
|
||||
|
||||
/** 项目号546 */
|
||||
@Excel(name = "项目号546")
|
||||
private String departmentNo;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String customerNo;
|
||||
|
||||
/** 供应商名称546 */
|
||||
@Excel(name = "供应商名称546")
|
||||
private String classNo;
|
||||
|
||||
/** 供应商编码546 */
|
||||
@Excel(name = "供应商编码546")
|
||||
private String supplierNo;
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setInType(String inType)
|
||||
{
|
||||
this.inType = inType;
|
||||
}
|
||||
|
||||
public String getInType()
|
||||
{
|
||||
return inType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateManId(String createManId)
|
||||
{
|
||||
this.createManId = createManId;
|
||||
}
|
||||
|
||||
public String getCreateManId()
|
||||
{
|
||||
return createManId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setErpBill(String erpBill)
|
||||
{
|
||||
this.erpBill = erpBill;
|
||||
}
|
||||
|
||||
public String getErpBill()
|
||||
{
|
||||
return erpBill;
|
||||
}
|
||||
|
||||
public void setStockSource(String stockSource)
|
||||
{
|
||||
this.stockSource = stockSource;
|
||||
}
|
||||
|
||||
public String getStockSource()
|
||||
{
|
||||
return stockSource;
|
||||
}
|
||||
|
||||
public void setDepartmentNo(String departmentNo)
|
||||
{
|
||||
this.departmentNo = departmentNo;
|
||||
}
|
||||
|
||||
public String getDepartmentNo()
|
||||
{
|
||||
return departmentNo;
|
||||
}
|
||||
|
||||
public void setCustomerNo(String customerNo)
|
||||
{
|
||||
this.customerNo = customerNo;
|
||||
}
|
||||
|
||||
public String getCustomerNo()
|
||||
{
|
||||
return customerNo;
|
||||
}
|
||||
|
||||
public void setClassNo(String classNo)
|
||||
{
|
||||
this.classNo = classNo;
|
||||
}
|
||||
|
||||
public String getClassNo()
|
||||
{
|
||||
return classNo;
|
||||
}
|
||||
|
||||
public void setSupplierNo(String supplierNo)
|
||||
{
|
||||
this.supplierNo = supplierNo;
|
||||
}
|
||||
|
||||
public String getSupplierNo()
|
||||
{
|
||||
return supplierNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("inType", getInType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare3", getSpare3())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare1", getSpare1())
|
||||
.append("erpBill", getErpBill())
|
||||
.append("stockSource", getStockSource())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("classNo", getClassNo())
|
||||
.append("supplierNo", getSupplierNo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.in.stockinback.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockinback.domain.InStockinBack;
|
||||
|
||||
/**
|
||||
* 入库单据主信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface InStockinBackMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库单据主信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 入库单据主信息
|
||||
*/
|
||||
public InStockinBack selectInStockinBackByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询入库单据主信息列表
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 入库单据主信息集合
|
||||
*/
|
||||
public List<InStockinBack> selectInStockinBackList(InStockinBack inStockinBack);
|
||||
|
||||
/**
|
||||
* 新增入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinBack(InStockinBack inStockinBack);
|
||||
|
||||
public int insertInStockinBackById(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 修改入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinBack(InStockinBack inStockinBack);
|
||||
|
||||
/**
|
||||
* 删除入库单据主信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinBackByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据主信息
|
||||
*
|
||||
* @param stockinGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinBackByStockinGuids(String[] stockinGuids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockinback.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockinback.domain.InStockinBack;
|
||||
|
||||
/**
|
||||
* 入库单据主信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface IInStockinBackService
|
||||
{
|
||||
/**
|
||||
* 查询入库单据主信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 入库单据主信息
|
||||
*/
|
||||
public InStockinBack selectInStockinBackByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询入库单据主信息列表
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 入库单据主信息集合
|
||||
*/
|
||||
public List<InStockinBack> selectInStockinBackList(InStockinBack inStockinBack);
|
||||
|
||||
/**
|
||||
* 新增入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinBack(InStockinBack inStockinBack);
|
||||
|
||||
/**
|
||||
* 修改入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinBack(InStockinBack inStockinBack);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据主信息
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据主信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinBackByStockinGuids(String[] stockinGuids);
|
||||
|
||||
/**
|
||||
* 删除入库单据主信息信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinBackByStockinGuid(String stockinGuid);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.in.stockinback.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.in.stockinback.mapper.InStockinBackMapper;
|
||||
import com.ruoyi.in.stockinback.domain.InStockinBack;
|
||||
import com.ruoyi.in.stockinback.service.IInStockinBackService;
|
||||
|
||||
/**
|
||||
* 入库单据主信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Service
|
||||
public class InStockinBackServiceImpl implements IInStockinBackService
|
||||
{
|
||||
@Autowired
|
||||
private InStockinBackMapper inStockinBackMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单据主信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 入库单据主信息
|
||||
*/
|
||||
@Override
|
||||
public InStockinBack selectInStockinBackByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return inStockinBackMapper.selectInStockinBackByStockinGuid(stockinGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据主信息列表
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 入库单据主信息
|
||||
*/
|
||||
@Override
|
||||
public List<InStockinBack> selectInStockinBackList(InStockinBack inStockinBack)
|
||||
{
|
||||
return inStockinBackMapper.selectInStockinBackList(inStockinBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInStockinBack(InStockinBack inStockinBack)
|
||||
{
|
||||
return inStockinBackMapper.insertInStockinBack(inStockinBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据主信息
|
||||
*
|
||||
* @param inStockinBack 入库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInStockinBack(InStockinBack inStockinBack)
|
||||
{
|
||||
return inStockinBackMapper.updateInStockinBack(inStockinBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据主信息
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinBackByStockinGuids(String[] stockinGuids)
|
||||
{
|
||||
return inStockinBackMapper.deleteInStockinBackByStockinGuids(stockinGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据主信息信息
|
||||
*
|
||||
* @param stockinGuid 入库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinBackByStockinGuid(String stockinGuid)
|
||||
{
|
||||
return inStockinBackMapper.deleteInStockinBackByStockinGuid(stockinGuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.in.stockindeatilback.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.in.stockindeatilback.domain.InStockinDetailBack;
|
||||
import com.ruoyi.in.stockindeatilback.service.IInStockinDetailBackService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库单据子信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/in/stockindeatilback")
|
||||
public class InStockinDetailBackController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInStockinDetailBackService inStockinDetailBackService;
|
||||
|
||||
/**
|
||||
* 查询入库单据子信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
startPage();
|
||||
List<InStockinDetailBack> list = inStockinDetailBackService.selectInStockinDetailBackList(inStockinDetailBack);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库单据子信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:export')")
|
||||
@Log(title = "入库单据子信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
List<InStockinDetailBack> list = inStockinDetailBackService.selectInStockinDetailBackList(inStockinDetailBack);
|
||||
ExcelUtil<InStockinDetailBack> util = new ExcelUtil<InStockinDetailBack>(InStockinDetailBack.class);
|
||||
util.exportExcel(response, list, "入库单据子信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据子信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:query')")
|
||||
@GetMapping(value = "/{stockinDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinDetailId") String stockinDetailId)
|
||||
{
|
||||
return success(inStockinDetailBackService.selectInStockinDetailBackByStockinDetailId(stockinDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:add')")
|
||||
@Log(title = "入库单据子信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
return toAjax(inStockinDetailBackService.insertInStockinDetailBack(inStockinDetailBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:edit')")
|
||||
@Log(title = "入库单据子信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
return toAjax(inStockinDetailBackService.updateInStockinDetailBack(inStockinDetailBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('in:stockindeatilback:remove')")
|
||||
@Log(title = "入库单据子信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinDetailIds)
|
||||
{
|
||||
return toAjax(inStockinDetailBackService.deleteInStockinDetailBackByStockinDetailIds(stockinDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,518 @@
|
||||
package com.ruoyi.in.stockindeatilback.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入库单据子信息对象 in_stockin_detail_back
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class InStockinDetailBack extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子单ID */
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 主单GUID */
|
||||
@Excel(name = "主单GUID")
|
||||
private String stockinGuid;
|
||||
|
||||
/** 主单ID */
|
||||
@Excel(name = "主单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 批次号546 */
|
||||
@Excel(name = "批次号546")
|
||||
private String lotNo;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private String productGuid;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private String quantity;
|
||||
|
||||
/** 计划数量(箱) */
|
||||
@Excel(name = "计划数量(箱)")
|
||||
private String quantityX;
|
||||
|
||||
/** 计划数量(件) */
|
||||
@Excel(name = "计划数量(件)")
|
||||
private String quantityJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String price;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String cargoNo;
|
||||
|
||||
/** 实际数量 */
|
||||
@Excel(name = "实际数量")
|
||||
private String assignNum;
|
||||
|
||||
/** 实际数量(箱) */
|
||||
@Excel(name = "实际数量(箱)")
|
||||
private String assignNumX;
|
||||
|
||||
/** 实际数量(件) */
|
||||
@Excel(name = "实际数量(件)")
|
||||
private String assignNumJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String printDate;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String stockStatus;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String supplierId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String customerId;
|
||||
|
||||
/** 计量单位546 */
|
||||
@Excel(name = "计量单位546")
|
||||
private String unit;
|
||||
|
||||
/** 规格型号546 */
|
||||
@Excel(name = "规格型号546")
|
||||
private String spec;
|
||||
|
||||
/** 层级关系546 */
|
||||
@Excel(name = "层级关系546")
|
||||
private String spare1;
|
||||
|
||||
/** 上层物料546 */
|
||||
@Excel(name = "上层物料546")
|
||||
private String spare2;
|
||||
|
||||
/** 顶层物料546 */
|
||||
@Excel(name = "顶层物料546")
|
||||
private String spare3;
|
||||
|
||||
/** 项目号546 */
|
||||
@Excel(name = "项目号546")
|
||||
private String spare4;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare5;
|
||||
|
||||
/** 行号546 */
|
||||
@Excel(name = "行号546")
|
||||
private String spare6;
|
||||
|
||||
/** 扫码数量 */
|
||||
@Excel(name = "扫码数量")
|
||||
private String scanNum;
|
||||
|
||||
/** 扫码数量(箱) */
|
||||
@Excel(name = "扫码数量(箱)")
|
||||
private String scanNumX;
|
||||
|
||||
/** 扫码数量(件) */
|
||||
@Excel(name = "扫码数量(件)")
|
||||
private String scanNumJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare7;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare8;
|
||||
|
||||
/** 货位,托盘加数量按逗号分开 */
|
||||
@Excel(name = "货位,托盘加数量按逗号分开")
|
||||
private String spare9;
|
||||
|
||||
/** 物料名称546 */
|
||||
@Excel(name = "物料名称546")
|
||||
private String productName;
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getStockinDetailId()
|
||||
{
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setStockinGuid(String stockinGuid)
|
||||
{
|
||||
this.stockinGuid = stockinGuid;
|
||||
}
|
||||
|
||||
public String getStockinGuid()
|
||||
{
|
||||
return stockinGuid;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantityX(String quantityX)
|
||||
{
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public String getQuantityX()
|
||||
{
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(String quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public String getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
{
|
||||
return cargoNo;
|
||||
}
|
||||
|
||||
public void setAssignNum(String assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public String getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(String assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public String getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(String assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public String getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setScanNum(String scanNum)
|
||||
{
|
||||
this.scanNum = scanNum;
|
||||
}
|
||||
|
||||
public String getScanNum()
|
||||
{
|
||||
return scanNum;
|
||||
}
|
||||
|
||||
public void setScanNumX(String scanNumX)
|
||||
{
|
||||
this.scanNumX = scanNumX;
|
||||
}
|
||||
|
||||
public String getScanNumX()
|
||||
{
|
||||
return scanNumX;
|
||||
}
|
||||
|
||||
public void setScanNumJ(String scanNumJ)
|
||||
{
|
||||
this.scanNumJ = scanNumJ;
|
||||
}
|
||||
|
||||
public String getScanNumJ()
|
||||
{
|
||||
return scanNumJ;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7)
|
||||
{
|
||||
this.spare7 = spare7;
|
||||
}
|
||||
|
||||
public String getSpare7()
|
||||
{
|
||||
return spare7;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8)
|
||||
{
|
||||
this.spare8 = spare8;
|
||||
}
|
||||
|
||||
public String getSpare8()
|
||||
{
|
||||
return spare8;
|
||||
}
|
||||
|
||||
public void setSpare9(String spare9)
|
||||
{
|
||||
this.spare9 = spare9;
|
||||
}
|
||||
|
||||
public String getSpare9()
|
||||
{
|
||||
return spare9;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinDetailId", getStockinDetailId())
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("cargoNo", getCargoNo())
|
||||
.append("remark", getRemark())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("stockStatus", getStockStatus())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("scanNum", getScanNum())
|
||||
.append("scanNumX", getScanNumX())
|
||||
.append("scanNumJ", getScanNumJ())
|
||||
.append("spare7", getSpare7())
|
||||
.append("spare8", getSpare8())
|
||||
.append("spare9", getSpare9())
|
||||
.append("productName", getProductName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.in.stockindeatilback.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockindeatilback.domain.InStockinDetailBack;
|
||||
|
||||
/**
|
||||
* 入库单据子信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface InStockinDetailBackMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库单据子信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 入库单据子信息
|
||||
*/
|
||||
public InStockinDetailBack selectInStockinDetailBackByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询入库单据子信息列表
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 入库单据子信息集合
|
||||
*/
|
||||
public List<InStockinDetailBack> selectInStockinDetailBackList(InStockinDetailBack inStockinDetailBack);
|
||||
|
||||
/**
|
||||
* 新增入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinDetailBack(InStockinDetailBack inStockinDetailBack);
|
||||
public int insertInStockinDetailBackById(InStockin inStockin);
|
||||
|
||||
/**
|
||||
* 修改入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinDetailBack(InStockinDetailBack inStockinDetailBack);
|
||||
|
||||
/**
|
||||
* 删除入库单据子信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailBackByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子信息
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailBackByStockinDetailIds(String[] stockinDetailIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.in.stockindeatilback.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.in.stockindeatilback.domain.InStockinDetailBack;
|
||||
|
||||
/**
|
||||
* 入库单据子信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface IInStockinDetailBackService
|
||||
{
|
||||
/**
|
||||
* 查询入库单据子信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 入库单据子信息
|
||||
*/
|
||||
public InStockinDetailBack selectInStockinDetailBackByStockinDetailId(String stockinDetailId);
|
||||
|
||||
/**
|
||||
* 查询入库单据子信息列表
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 入库单据子信息集合
|
||||
*/
|
||||
public List<InStockinDetailBack> selectInStockinDetailBackList(InStockinDetailBack inStockinDetailBack);
|
||||
|
||||
/**
|
||||
* 新增入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinDetailBack(InStockinDetailBack inStockinDetailBack);
|
||||
|
||||
/**
|
||||
* 修改入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinDetailBack(InStockinDetailBack inStockinDetailBack);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子信息
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的入库单据子信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailBackByStockinDetailIds(String[] stockinDetailIds);
|
||||
|
||||
/**
|
||||
* 删除入库单据子信息信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailBackByStockinDetailId(String stockinDetailId);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.in.stockindeatilback.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.in.stockindeatilback.mapper.InStockinDetailBackMapper;
|
||||
import com.ruoyi.in.stockindeatilback.domain.InStockinDetailBack;
|
||||
import com.ruoyi.in.stockindeatilback.service.IInStockinDetailBackService;
|
||||
|
||||
/**
|
||||
* 入库单据子信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Service
|
||||
public class InStockinDetailBackServiceImpl implements IInStockinDetailBackService
|
||||
{
|
||||
@Autowired
|
||||
private InStockinDetailBackMapper inStockinDetailBackMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单据子信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 入库单据子信息
|
||||
*/
|
||||
@Override
|
||||
public InStockinDetailBack selectInStockinDetailBackByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return inStockinDetailBackMapper.selectInStockinDetailBackByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据子信息列表
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 入库单据子信息
|
||||
*/
|
||||
@Override
|
||||
public List<InStockinDetailBack> selectInStockinDetailBackList(InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
return inStockinDetailBackMapper.selectInStockinDetailBackList(inStockinDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInStockinDetailBack(InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
return inStockinDetailBackMapper.insertInStockinDetailBack(inStockinDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据子信息
|
||||
*
|
||||
* @param inStockinDetailBack 入库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInStockinDetailBack(InStockinDetailBack inStockinDetailBack)
|
||||
{
|
||||
return inStockinDetailBackMapper.updateInStockinDetailBack(inStockinDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据子信息
|
||||
*
|
||||
* @param stockinDetailIds 需要删除的入库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinDetailBackByStockinDetailIds(String[] stockinDetailIds)
|
||||
{
|
||||
return inStockinDetailBackMapper.deleteInStockinDetailBackByStockinDetailIds(stockinDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据子信息信息
|
||||
*
|
||||
* @param stockinDetailId 入库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinDetailBackByStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
return inStockinDetailBackMapper.deleteInStockinDetailBackByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
}
|
||||
@@ -76,4 +76,6 @@ public interface MydoJobMapper
|
||||
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
|
||||
|
||||
List<MydoJob> getInJobBySerial(String trayCode);
|
||||
|
||||
void manualCompleted(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@@ -73,10 +73,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
private IOutStockoutDetailService outStockoutDetailService;
|
||||
@Autowired
|
||||
private IBasCargoSpaceService basCargoSpaceService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private IBasWarehouseService basWarehouseService;
|
||||
|
||||
@Autowired
|
||||
private IToWcsService iToWcsService;
|
||||
@Autowired
|
||||
@@ -247,119 +244,129 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult manualCompleted(MydoJob mydoJobParam, int type) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
String jobId = mydoJobParam.getJobId();
|
||||
MydoJob mydoJob = selectMydoJobByJobId(jobId);
|
||||
if (mydoJob == null) {
|
||||
return AjaxResult.warn("任务不存在");
|
||||
map.put("v_job_id", jobId);
|
||||
mydoJobMapper.manualCompleted(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
if ("5".equals(mydoJob.getInOrOut())){
|
||||
|
||||
//盘点入库
|
||||
//入库作业
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
|
||||
|
||||
//查询盘点信息中的异常信息
|
||||
CheckDifferenceRecord checkDifferenceRecordParam = new CheckDifferenceRecord();
|
||||
checkDifferenceRecordParam.setTrayCode(mydoJob.getTrayCode());
|
||||
checkDifferenceRecordParam.setWarehouseId(mydoJob.getWarehouseId());
|
||||
List<CheckDifferenceRecord> checkDifferenceRecords = checkDifferenceRecordService.selectCheckDifferenceRecordList(checkDifferenceRecordParam);
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
//如果存在盘点异常信息 根据托盘条码和物料id 筛选异常信息
|
||||
Optional<CheckDifferenceRecord> first = checkDifferenceRecords.stream().filter(x -> x.getTrayCode().equals(mydoJob.getTrayCode()) && x.getProductId().equals(mydoJobDetail.getProductId())).findFirst();
|
||||
if (first.isPresent()) {
|
||||
//生成盘点待审批库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2");
|
||||
stockByInStockinDetail.setSpare7("1");
|
||||
list.add(stockByInStockinDetail);
|
||||
//修改异常记录中的库存id
|
||||
CheckDifferenceRecord checkDifferenceRecord = first.get();
|
||||
checkDifferenceRecord.setStockId(stockByInStockinDetail.getStockId());
|
||||
checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord);
|
||||
|
||||
} else {
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("1");
|
||||
//正常库存
|
||||
list.add(stockByInStockinDetail);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.warn("不存在子作业");
|
||||
}
|
||||
}else {
|
||||
//正常入库任务
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
// if ("2".equals(mydoJob.getInOrOut()) || "3".equals(mydoJob.getInOrOut())) {
|
||||
// //修改单据实际数量 2-退料入库 3-其它入库
|
||||
// String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
// InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||
// inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
|
||||
// inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
// String jobId = mydoJobParam.getJobId();
|
||||
// MydoJob mydoJob = selectMydoJobByJobId(jobId);
|
||||
// if (mydoJob == null) {
|
||||
// return AjaxResult.warn("任务不存在");
|
||||
// }
|
||||
// if ("5".equals(mydoJob.getInOrOut())){
|
||||
//
|
||||
// //盘点入库
|
||||
// //入库作业
|
||||
// MydoJobDetail param = new MydoJobDetail();
|
||||
// param.setJobId(jobId);
|
||||
// List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
// BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
// if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
// List<BasStock> list = new ArrayList<>();
|
||||
//
|
||||
//
|
||||
// //查询盘点信息中的异常信息
|
||||
// CheckDifferenceRecord checkDifferenceRecordParam = new CheckDifferenceRecord();
|
||||
// checkDifferenceRecordParam.setTrayCode(mydoJob.getTrayCode());
|
||||
// checkDifferenceRecordParam.setWarehouseId(mydoJob.getWarehouseId());
|
||||
// List<CheckDifferenceRecord> checkDifferenceRecords = checkDifferenceRecordService.selectCheckDifferenceRecordList(checkDifferenceRecordParam);
|
||||
// for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
// //如果存在盘点异常信息 根据托盘条码和物料id 筛选异常信息
|
||||
// Optional<CheckDifferenceRecord> first = checkDifferenceRecords.stream().filter(x -> x.getTrayCode().equals(mydoJob.getTrayCode()) && x.getProductId().equals(mydoJobDetail.getProductId())).findFirst();
|
||||
// if (first.isPresent()) {
|
||||
// //生成盘点待审批库存
|
||||
// BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2");
|
||||
// stockByInStockinDetail.setSpare7("1");
|
||||
// list.add(stockByInStockinDetail);
|
||||
// //修改异常记录中的库存id
|
||||
// CheckDifferenceRecord checkDifferenceRecord = first.get();
|
||||
// checkDifferenceRecord.setStockId(stockByInStockinDetail.getStockId());
|
||||
// checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord);
|
||||
//
|
||||
// } else {
|
||||
// BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
// stockByInStockinDetail.setSpare7("1");
|
||||
// //正常库存
|
||||
// list.add(stockByInStockinDetail);
|
||||
// }
|
||||
//正常库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("0");
|
||||
list.add(stockByInStockinDetail);
|
||||
}
|
||||
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
|
||||
//其他出入库单据回传
|
||||
TransferBillCallback transferBillCallback = new TransferBillCallback();
|
||||
transferBillCallback.setJobId(mydoJob.getJobId());
|
||||
transferBillCallback.setErpBill(mydoJob.getLineId());
|
||||
transferBillCallback.setType("1");
|
||||
transferBillCallback.setStatus("0");
|
||||
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.warn("不存在子作业");
|
||||
}
|
||||
}
|
||||
//
|
||||
// }
|
||||
//
|
||||
// //修改货位状态
|
||||
// basCargoSpace.setStatus("2");
|
||||
// basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
// basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
// basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
//
|
||||
// //插入库存信息
|
||||
// basStockService.insertBasStockList(list);
|
||||
//
|
||||
// //结束任务
|
||||
// mydoJob.setStatus("4");
|
||||
// mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
// updateMydoJob(mydoJob);
|
||||
// // 插入任务历史表 删除任务
|
||||
// insertHistory(mydoJob.getJobId());
|
||||
// return AjaxResult.success();
|
||||
// } else {
|
||||
// return AjaxResult.warn("不存在子作业");
|
||||
// }
|
||||
// }else {
|
||||
// //正常入库任务
|
||||
// MydoJobDetail param = new MydoJobDetail();
|
||||
// param.setJobId(jobId);
|
||||
// List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
// BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
// if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
// List<BasStock> list = new ArrayList<>();
|
||||
// for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
//// if ("2".equals(mydoJob.getInOrOut()) || "3".equals(mydoJob.getInOrOut())) {
|
||||
//// //修改单据实际数量 2-退料入库 3-其它入库
|
||||
//// String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
//// InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||
//// inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
|
||||
//// inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
//// }
|
||||
// //正常库存
|
||||
// BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
// stockByInStockinDetail.setSpare7("0");
|
||||
// list.add(stockByInStockinDetail);
|
||||
// }
|
||||
//
|
||||
// //修改货位状态
|
||||
// basCargoSpace.setStatus("2");
|
||||
// basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||
// basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
// basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
//
|
||||
// //插入库存信息
|
||||
// basStockService.insertBasStockList(list);
|
||||
//
|
||||
// //结束任务
|
||||
// mydoJob.setStatus("4");
|
||||
// mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
// updateMydoJob(mydoJob);
|
||||
// // 插入任务历史表 删除任务
|
||||
// insertHistory(mydoJob.getJobId());
|
||||
//
|
||||
// //其他出入库单据回传
|
||||
// TransferBillCallback transferBillCallback = new TransferBillCallback();
|
||||
// transferBillCallback.setJobId(mydoJob.getJobId());
|
||||
// transferBillCallback.setErpBill(mydoJob.getLineId());
|
||||
// transferBillCallback.setType("1");
|
||||
// transferBillCallback.setStatus("0");
|
||||
// transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
||||
// return AjaxResult.success();
|
||||
// } else {
|
||||
// return AjaxResult.warn("不存在子作业");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail, MydoJob mydoJob, String productStatus) {
|
||||
|
||||
@@ -150,6 +150,8 @@ public class MydoJobDetail extends BaseEntity
|
||||
private String unit;
|
||||
private String trayCode;
|
||||
|
||||
private String stockinDetailId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -38,8 +38,9 @@ public class PdaController extends BaseController {
|
||||
*/
|
||||
@RequestMapping("/selectHasHalfTray")
|
||||
@ResponseBody
|
||||
public List<BasStock> selectHasHalfTray(String inStockinDetailId) {
|
||||
return pdaService.selectHasHalfTray(inStockinDetailId);
|
||||
public AjaxResult selectHasHalfTray(String inStockinDetailId) {
|
||||
List<BasStock> basStocks = pdaService.selectHasHalfTray(inStockinDetailId);
|
||||
return AjaxResult.success(basStocks);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,6 +50,9 @@ public class PdaController extends BaseController {
|
||||
@ResponseBody
|
||||
public AjaxResult selectDetailById(String inStockinDetailId) {
|
||||
InStockinDetail inStockinDetail = iInStockinDetailService.selectInStockinDetailByStockinDetailId(inStockinDetailId);
|
||||
if(inStockinDetail != null) {
|
||||
inStockinDetail.setQuantity(String.valueOf(Integer.valueOf(inStockinDetail.getQuantity()) - Integer.valueOf(inStockinDetail.getScanNum())));
|
||||
}
|
||||
return AjaxResult.success(inStockinDetail);
|
||||
}
|
||||
|
||||
@@ -58,8 +62,8 @@ public class PdaController extends BaseController {
|
||||
|
||||
@RequestMapping("/halfTrayOut")
|
||||
@ResponseBody
|
||||
public AjaxResult halfTrayOut(String trayCode) {
|
||||
return pdaService.halfTrayOut(trayCode);
|
||||
public AjaxResult halfTrayOut(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
return pdaService.halfTrayOut(trayCodeMsg);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,19 +81,54 @@ public class PdaController extends BaseController {
|
||||
*/
|
||||
@RequestMapping("/bindTray")
|
||||
@ResponseBody
|
||||
public AjaxResult bindTray(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
return pdaService.bindTray(trayCodeMsg);
|
||||
public AjaxResult bindTray(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
return pdaService.bindTray(trayCodeMakeSure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认入库
|
||||
* 空托盘入库
|
||||
*/
|
||||
@RequestMapping("/confirmIn")
|
||||
@RequestMapping("/tpIn")
|
||||
@ResponseBody
|
||||
public AjaxResult confirmIn(String trayCode) {
|
||||
return pdaService.confirmIn(trayCode);
|
||||
public AjaxResult tpIn(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
return pdaService.tpIn(trayCodeMsg.getTrayCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 空托盘出库
|
||||
*/
|
||||
@RequestMapping("/tpOut")
|
||||
@ResponseBody
|
||||
public AjaxResult tpOut(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
return pdaService.tpOut(trayCodeMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库确认查询子作业信息
|
||||
* @param trayCodeMsg
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/selectJobDetailByTray")
|
||||
@ResponseBody
|
||||
public AjaxResult selectJobDetailByTray(@RequestBody TrayCodeMsg trayCodeMsg){
|
||||
return pdaService.selectJobDetailByTray(trayCodeMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库确认
|
||||
*
|
||||
* @param trayCodeMakeSure 托盘信息
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:out:outMakeSure')")
|
||||
@PostMapping("/outMakeSure")
|
||||
@Log(title = "手持机出库确认", businessType = BusinessType.INSERT)
|
||||
@ResponseBody
|
||||
public AjaxResult outMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
return pdaService.outMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,19 +150,7 @@ public class PdaController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认
|
||||
*
|
||||
* @param trayCodeMakeSure 托盘信息
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:out:outMakeSure')")
|
||||
@PostMapping("/outMakeSure")
|
||||
@Log(title = "手持机出库确认", businessType = BusinessType.INSERT)
|
||||
@ResponseBody
|
||||
public AjaxResult outMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||
return pdaService.outMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,6 +21,7 @@ public class TrayCodeMakeSure {
|
||||
private String warehouseId;
|
||||
|
||||
private String exitId;
|
||||
private String isFull;
|
||||
//拣选详情列表
|
||||
private List<MydoJobDetail> mydoJobDetailList;
|
||||
//盘点详情列表
|
||||
|
||||
@@ -6,6 +6,11 @@ public interface PdaMapper {
|
||||
|
||||
void bindTray(HashMap<String, Object> map);
|
||||
|
||||
void tpIn(HashMap<String, Object> map);
|
||||
|
||||
void halfTrayOut(HashMap<String, Object> map);
|
||||
|
||||
void tpOut(HashMap<String, Object> map);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,17 @@ public interface PdaService {
|
||||
*/
|
||||
List<BasStock> selectHasHalfTray(String inStockinDetailId);
|
||||
|
||||
AjaxResult halfTrayOut(String trayCode);
|
||||
AjaxResult halfTrayOut(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
Object selectMsgByTray(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
AjaxResult bindTray(TrayCodeMsg trayCodeMsg);
|
||||
AjaxResult bindTray(TrayCodeMakeSure trayCodeMakeSure);
|
||||
|
||||
AjaxResult confirmIn(String trayCode);
|
||||
AjaxResult tpIn(String trayCode);
|
||||
|
||||
AjaxResult tpOut(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
AjaxResult selectJobDetailByTray(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.ruoyi.check.commit.service.ICheckCommitRecordService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
|
||||
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.job.mydojob.domain.MydoJob;
|
||||
@@ -56,20 +58,37 @@ public class PdaServiceImp implements PdaService {
|
||||
private IToWcsService toWcsService;
|
||||
@Autowired
|
||||
private BasStockMapper basStockMapper;
|
||||
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BasStock> selectHasHalfTray(String inStockinDetailId) {
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inStockinDetailId);
|
||||
InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
|
||||
inStockinDetail.setSpare4(inStockin.getDepartmentNo());
|
||||
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
||||
return hasHalfTray;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult halfTrayOut(String trayCode) {
|
||||
return null;
|
||||
public AjaxResult halfTrayOut(TrayCodeMsg trayCodeMsg) {
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(trayCodeMsg.getStockinDetailId());
|
||||
InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
|
||||
inStockinDetail.setSpare4(inStockin.getDepartmentNo());
|
||||
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", hasHalfTray.get(0).getTrayCode());
|
||||
map.put("v_exit_id",trayCodeMsg.getExitId());
|
||||
pdaMapper.halfTrayOut(map);
|
||||
if(!"10".equals(map.get("v_result").toString())){
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,70 +98,102 @@ public class PdaServiceImp implements PdaService {
|
||||
//todo 半盘出库作业类型
|
||||
mydoJob.setInOrOut("");
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByTrayCode(mydoJob);
|
||||
if(mydoJobDetails.size()==0){
|
||||
if (mydoJobDetails.size() == 0) {
|
||||
TrayMsg trayMsg = new TrayMsg();
|
||||
trayMsg.setTrayCode(trayCodeMsg.getTrayCode());
|
||||
List<TrayMsg> trayMsgList = trayMsgService.selectTrayMsgList(trayMsg);
|
||||
return trayMsgList;
|
||||
}else{
|
||||
} else {
|
||||
return mydoJobDetails;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult bindTray(TrayCodeMsg trayCodeMsg) {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult bindTray(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
StringBuilder errorbulider = new StringBuilder();
|
||||
|
||||
|
||||
for (MydoJobDetail mydoJobDetail : trayCodeMakeSure.getMydoJobDetailList()) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_stockin_detail_id", mydoJobDetail.getStockinDetailId());
|
||||
map.put("v_quantity", Integer.valueOf(mydoJobDetail.getInQuantity()));
|
||||
pdaMapper.bindTray(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
errorbulider.append(mydoJobDetail.getStockinDetailId() + map.get("v_resultmsg").toString());
|
||||
return AjaxResult.error(errorbulider.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_stockin_detail_id", trayCodeMsg.getStockinDetailId());
|
||||
map.put("v_quantity", Integer.valueOf(trayCodeMsg.getInQuantity()));
|
||||
pdaMapper.bindTray(map);
|
||||
if("10".equals(map.get("v_result").toString())){
|
||||
return AjaxResult.success();
|
||||
}else{
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_is_full", trayCodeMakeSure.getIsFull());
|
||||
pdaMapper.addInJob(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
return AjaxResult.error(errorbulider.toString());
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult tpIn(String trayCode) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCode);
|
||||
pdaMapper.tpIn(map);
|
||||
if(!"10".equals(map.get("v_result").toString())){
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult confirmIn(String trayCode) {
|
||||
//如果有出库作业,修改作业类型改为合盘入库类型,合盘出库放历史表
|
||||
public AjaxResult tpOut(TrayCodeMsg trayCodeMsg) {
|
||||
|
||||
|
||||
|
||||
//如果没有出库作业,正常生成入库作业
|
||||
return null;
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_exit_id", trayCodeMsg.getExitId());
|
||||
pdaMapper.tpOut(map);
|
||||
if(!"10".equals(map.get("v_result").toString())){
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult selectJobDetailByTray(TrayCodeMsg trayCodeMsg) {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setTrayCode(trayCodeMsg.getTrayCode());
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByTrayCode(mydoJob);
|
||||
return AjaxResult.success(mydoJobDetails);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult addInJob(RequestEnter requestEnter) {
|
||||
if(requestEnter.getEntranceId()!=null){
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJob.setStatus("1");
|
||||
MydoJob mydoJob1 = mydoJobService.selectMydoJobByEntranceId(mydoJob);
|
||||
if(mydoJob1!=null){
|
||||
return AjaxResult.error("该入口已有作业");
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("请选择出口");
|
||||
}
|
||||
requestEnter.setFlag("1");
|
||||
if (requestEnter.getEntranceId() != null) {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
||||
mydoJob.setStatus("1");
|
||||
MydoJob mydoJob1 = mydoJobService.selectMydoJobByEntranceId(mydoJob);
|
||||
if (mydoJob1 != null) {
|
||||
return AjaxResult.error("该入口已有作业");
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error("请选择出口");
|
||||
}
|
||||
requestEnter.setFlag("1");
|
||||
AjaxResult ajaxResult = iToWmsService.requestEnterByTrayCode(requestEnter);
|
||||
return ajaxResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult selectDetailByPDTray(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
@@ -156,25 +207,25 @@ public class PdaServiceImp implements PdaService {
|
||||
@Override
|
||||
public AjaxResult outMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
String trayCode = trayCodeMakeSure.getTrayCode();
|
||||
String[] split = trayCode.split(" ");
|
||||
String productId = split[8].substring(10);
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
mydoJob.setExitId(trayCodeMakeSure.getExitId());
|
||||
mydoJob.setProductId(productId);
|
||||
mydoJob.setStatus("3");
|
||||
mydoJob.setInOrOut("21");
|
||||
// String[] split = trayCode.split(" ");
|
||||
// String productId = split[8].substring(10);
|
||||
// MydoJob mydoJob = new MydoJob();
|
||||
// mydoJob.setExitId(trayCodeMakeSure.getExitId());
|
||||
// mydoJob.setProductId(productId);
|
||||
// mydoJob.setStatus("3");
|
||||
// mydoJob.setInOrOut("21");
|
||||
// List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJob);
|
||||
// if(mydoJobDetails.size()==0){
|
||||
// return AjaxResult.error("该物料没有出库作业,请检查");
|
||||
// }
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
// map.put("v_tray_code", mydoJobDetails.get(0).getTrayCode());
|
||||
map.put("v_tray_code", trayCode);
|
||||
pdaMapper.outMakeSure(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.error( map.get("v_resultmsg").toString());
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +241,7 @@ public class PdaServiceImp implements PdaService {
|
||||
mydoJob.setStatus("3");
|
||||
mydoJob.setInOrOut("26");
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
|
||||
if(mydoJobDetails.isEmpty()){
|
||||
if (mydoJobDetails.isEmpty()) {
|
||||
return AjaxResult.error("该物料没有盘点出库作业,请检查");
|
||||
}
|
||||
|
||||
|
||||
148
ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml
Normal file
148
ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.in.stockinback.mapper.InStockinBackMapper">
|
||||
|
||||
<resultMap type="InStockinBack" id="InStockinBackResult">
|
||||
<result property="stockinGuid" column="stockin_guid" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="erpBill" column="erp_bill" />
|
||||
<result property="stockSource" column="stock_source" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="classNo" column="class_no" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinBackVo">
|
||||
select stockin_guid, stockin_id, in_type, create_date, create_man_id, status, warehouse_id, spare5, spare4, spare3, finish_date, spare2, spare1, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no from in_stockin_back
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinBackList" parameterType="InStockinBack" resultMap="InStockinBackResult">
|
||||
<include refid="selectInStockinBackVo"/>
|
||||
<where>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
||||
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinBackByStockinGuid" parameterType="String" resultMap="InStockinBackResult">
|
||||
<include refid="selectInStockinBackVo"/>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinBack" parameterType="InStockinBack">
|
||||
insert into in_stockin_back
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">stockin_guid,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="inType != null and inType != ''">in_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="erpBill != null">erp_bill,</if>
|
||||
<if test="stockSource != null">stock_source,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="classNo != null">class_no,</if>
|
||||
<if test="supplierNo != null">supplier_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">#{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="inType != null and inType != ''">#{inType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="erpBill != null">#{erpBill},</if>
|
||||
<if test="stockSource != null">#{stockSource},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="classNo != null">#{classNo},</if>
|
||||
<if test="supplierNo != null">#{supplierNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertInStockinBackById" parameterType="InStockin" >
|
||||
insert into in_stockin_back
|
||||
select * from in_stockin where stockin_guid = #{stockinGuid}
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockinBack" parameterType="InStockinBack">
|
||||
update in_stockin_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="inType != null and inType != ''">in_type = #{inType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="erpBill != null">erp_bill = #{erpBill},</if>
|
||||
<if test="stockSource != null">stock_source = #{stockSource},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="classNo != null">class_no = #{classNo},</if>
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
</trim>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinBackByStockinGuid" parameterType="String">
|
||||
delete from in_stockin_back where stockin_guid = #{stockinGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinBackByStockinGuids" parameterType="String">
|
||||
delete from in_stockin_back where stockin_guid in
|
||||
<foreach item="stockinGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockinGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,223 @@
|
||||
<?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.ruoyi.in.stockindeatilback.mapper.InStockinDetailBackMapper">
|
||||
|
||||
<resultMap type="InStockinDetailBack" id="InStockinDetailBackResult">
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinGuid" column="stockin_guid" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<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="scanNum" column="scan_num" />
|
||||
<result property="scanNumX" column="scan_num_x" />
|
||||
<result property="scanNumJ" column="scan_num_j" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinDetailBackVo">
|
||||
select stockin_detail_id, stockin_guid, stockin_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j, print_date, stock_status, supplier_id, customer_id, unit, spec, spare1, spare2, spare3, spare4, spare5, spare6, scan_num, scan_num_x, scan_num_j, spare7, spare8, spare9, product_name from in_stockin_detail_back
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinDetailBackList" parameterType="InStockinDetailBack" resultMap="InStockinDetailBackResult">
|
||||
<include refid="selectInStockinDetailBackVo"/>
|
||||
<where>
|
||||
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid = #{stockinGuid}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
|
||||
<if test="spare9 != null and spare9 != ''"> and spare9 = #{spare9}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinDetailBackByStockinDetailId" parameterType="String" resultMap="InStockinDetailBackResult">
|
||||
<include refid="selectInStockinDetailBackVo"/>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinDetailBack" parameterType="InStockinDetailBack">
|
||||
insert into in_stockin_detail_back
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="customerId != null">customer_id,</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="scanNum != null">scan_num,</if>
|
||||
<if test="scanNumX != null">scan_num_x,</if>
|
||||
<if test="scanNumJ != null">scan_num_j,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''">#{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="customerId != null">#{customerId},</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="scanNum != null">#{scanNum},</if>
|
||||
<if test="scanNumX != null">#{scanNumX},</if>
|
||||
<if test="scanNumJ != null">#{scanNumJ},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="insertInStockinDetailBackById" parameterType="InStockin">
|
||||
insert into in_stockin_detail_back
|
||||
select * from in_stockin_detail where stockin_guid = #{stockinGuid}
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockinDetailBack" parameterType="InStockinDetailBack">
|
||||
update in_stockin_detail_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</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="scanNum != null">scan_num = #{scanNum},</if>
|
||||
<if test="scanNumX != null">scan_num_x = #{scanNumX},</if>
|
||||
<if test="scanNumJ != null">scan_num_j = #{scanNumJ},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
</trim>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinDetailBackByStockinDetailId" parameterType="String">
|
||||
delete from in_stockin_detail_back where stockin_detail_id = #{stockinDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinDetailBackByStockinDetailIds" parameterType="String">
|
||||
delete from in_stockin_detail_back where stockin_detail_id in
|
||||
<foreach item="stockinDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockinDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="outLayerQuantity" column="out_layer_quantity" />
|
||||
<result property="giveNum" column="give_num" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stackingId" column="stacking_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="printDate" column="print_date" />
|
||||
@@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mjd.spare2,
|
||||
mjd.spare3,
|
||||
mjd.spare4,
|
||||
mjd.stockin_detail_id,
|
||||
mjd.pick_quantity,
|
||||
bp.product_name,
|
||||
mjd.spare5,
|
||||
@@ -138,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mjd.spare2,
|
||||
mjd.spare3,
|
||||
mjd.spare4,
|
||||
mjd.stockin_detail_id,
|
||||
mjd.pick_quantity,
|
||||
mjd.product_name,
|
||||
mjd.spare5,
|
||||
|
||||
@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="outLayerQuantity" column="out_layer_quantity" />
|
||||
<result property="giveNum" column="give_num" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stackingId" column="stacking_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="printDate" column="print_date" />
|
||||
@@ -71,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mjd.spare2,
|
||||
mjd.spare3,
|
||||
mjd.spare4,
|
||||
mjd.stockin_detail_id,
|
||||
mjd.pick_quantity,
|
||||
mjd.out_quantity-mjd.pick_quantity as pick_quantity_real,
|
||||
mjd.product_name,
|
||||
@@ -355,7 +357,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mjd.spare4,
|
||||
mjd.pick_quantity,
|
||||
mjd.out_quantity-mjd.pick_quantity as pick_quantity_real,
|
||||
bp.product_name,
|
||||
mjd.product_name,
|
||||
mjd.spare5,
|
||||
mjd.spare6,
|
||||
mjd.spare7,
|
||||
@@ -370,7 +372,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join mydo_job mj on mjd.job_id = mj.job_id
|
||||
where mj.tray_code=#{trayCode}
|
||||
and mj.status='3'
|
||||
and mj.in_or_out=#{inOrOut}
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectPdMydoJobDetailListByExit" parameterType="MydoJob" resultMap="MydoJobDetailResult">
|
||||
|
||||
@@ -98,8 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 and mj.in_or_out not in(25,26)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 and mj.in_or_out not in(5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test="productId != null and productId != ''"> and mjd.product_id like concat('%', #{productId}, '%')</if>
|
||||
@@ -246,4 +246,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="getInJobBySerial" parameterType="String" resultMap="MydoJobResult">
|
||||
select * from mydo_job where tray_code=#{trayCode}
|
||||
</select>
|
||||
|
||||
<select id="manualCompleted" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_complete_in_job(
|
||||
#{v_job_id,jdbcType=VARCHAR,mode=IN},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<mapper namespace="com.ruoyi.pda.mapper.PdaMapper">
|
||||
|
||||
<select id="bindTray" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_bind_tray(
|
||||
{call proc_bind_tray_msg(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_quantity,mode=IN,jdbcType=INTEGER},
|
||||
@@ -14,6 +14,32 @@
|
||||
)}
|
||||
</select>
|
||||
|
||||
<select id="tpIn" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_tp_in(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<select id="tpOut" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_tp_out(
|
||||
|
||||
#{v_exit_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<select id="halfTrayOut" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_half_tray_out(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_exit_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -79,7 +105,7 @@
|
||||
<select id="addInJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_add_in_job(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_cargo_space_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_is_full,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
@@ -111,7 +137,7 @@
|
||||
|
||||
<select id="pkOut" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_pk_out(
|
||||
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_job_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
|
||||
@@ -250,10 +250,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectHasHalfTray" parameterType="InStockinDetail" resultMap="BasStockResult">
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_sapce bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.product_id=#{productId} and bs.spare2=#{spare2} and bs.model=0 and bcs.status=2
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_space bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.product_id=#{productId} and bs.spare2=#{spare2} and bs.model=0 and bcs.status=2
|
||||
union
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_sapce bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.spare2=#{spare2} and bs.model=0 and bcs.status=2
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_space bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.spare2=#{spare2} and bs.model=0 and bcs.status=2
|
||||
UNION
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bs left join bas_cargo_sapce bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.model=0 and bcs.status=2
|
||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_space bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.model=0 and bcs.status=2
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="子作业编码" align="left" prop="jobDetailId" width="150" />
|
||||
<el-table-column label="作业编码" align="left" prop="jobId" width="140" />
|
||||
<el-table-column label="单据编码" align="left" prop="inOrOutId" width="150" />
|
||||
<el-table-column label="子单据编码" align="left" prop="inOrOutDId" width="160" />
|
||||
<el-table-column label="单据编码" align="left" prop="stockinId" width="150" />
|
||||
<el-table-column label="子单据编码" align="left" prop="stockinDetailId" width="160" />
|
||||
<el-table-column label="存货编码" align="left" prop="productId" width="140" />
|
||||
<el-table-column label="存货名称" align="left" prop="productName" />
|
||||
<el-table-column label="批号" align="left" prop="lotNo" />
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
|
||||
<el-table :data="productList" border style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<!-- <el-table-column type="index" label="序号" width="50" align="center"/>-->
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<el-table-column fixed label="存货编码" align="left" prop="productId" />
|
||||
<el-table-column fixed label="存货名称" align="left" prop="productName" />
|
||||
@@ -78,8 +78,7 @@
|
||||
<el-table-column fixed label="层级关系" align="left" prop="spare1" />
|
||||
<el-table-column fixed label="上层物料" align="left" prop="spare2" />
|
||||
<el-table-column fixed label="顶层物料" align="left" prop="spare3" />
|
||||
|
||||
<el-table-column label="数量" width="120" align="right">
|
||||
<el-table-column label="数量" width="120" align="left">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.quantity"
|
||||
@@ -88,7 +87,7 @@
|
||||
required="required"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批号" width="120" align="right">
|
||||
<el-table-column label="批号" width="120" align="left">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.lotNo"
|
||||
|
||||
Reference in New Issue
Block a user