绑定逻辑 作业完成逻辑修改
This commit is contained in:
@@ -795,11 +795,10 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
if (detailRows != null) {
|
||||
for (int i = 0; i < detailRows.size(); i++) {
|
||||
JSONArray d = detailRows.getJSONArray(i);
|
||||
Long erpDetailId = Convert.toLong(d.get(0));
|
||||
String stockinDetailId = newStockin.getStockinId() + "-" + (i + 1);
|
||||
InStockinDetailN detail = new InStockinDetailN();
|
||||
detail.setStockinDetailId(stockinDetailId);
|
||||
detail.setErpDetailId(erpDetailId);
|
||||
detail.setErpDetailId(Convert.toInt(d.get(0)));
|
||||
detail.setStockinGuid(newStockin.getStockinGuid());
|
||||
detail.setStockinId(newStockin.getStockinId());
|
||||
detail.setProductName(Convert.toStr(d.get(1)));
|
||||
|
||||
@@ -34,6 +34,8 @@ import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.service.IInStockinDetailNService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -82,6 +84,10 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
private IInStockinService inStockinService;
|
||||
@Autowired
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinDetailNService inStockinDetailNService;
|
||||
|
||||
@Autowired
|
||||
private IBasRoadwayService basRoadwayService;
|
||||
|
||||
@@ -94,85 +100,87 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
private IBasStockService basStockService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult requestEnterByTrayCode(RequestEnter requestEnter) {
|
||||
|
||||
//校验 - 条码空
|
||||
if (StrUtil.isEmpty(requestEnter.getTrayCode())) {
|
||||
return AjaxResult.error("托盘条码不能为空");
|
||||
}
|
||||
|
||||
MydoJob mydoJob1 = mydoJobService.selectMydoJobByTrayCode(requestEnter.getTrayCode());
|
||||
|
||||
String productId="";
|
||||
if (ObjUtil.isNotNull(mydoJob1) && !"1".equals(mydoJob1.getInOrOut())) {
|
||||
//空托盘处理
|
||||
String productId = "KTP0001";
|
||||
String cargoSpaceId = getCargoSpaceByProductInfo(productId);
|
||||
if (!StringUtils.isNotBlank(cargoSpaceId)) {
|
||||
return AjaxResult.error("无符合条件的货位用于分配,请检查库存区占用情况,物料号:" + productId);
|
||||
}
|
||||
mydoJob1.setCargoSpaceId(cargoSpaceId);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
mydoJob1.setRoadwayId(basCargoSpace.getTheFloor().toString());
|
||||
mydoJob1.setStatus("3");
|
||||
mydoJobService.insertMydoJob(mydoJob1);
|
||||
return AjaxResult.success(mydoJob1);
|
||||
}
|
||||
//校验 - 条码已经有作业
|
||||
if (ObjUtil.isNotNull(mydoJob1) && "1".equals(mydoJob1.getInOrOut())) {
|
||||
return AjaxResult.error("已存在该条码的入库作业:" + requestEnter.getTrayCode());
|
||||
}
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
if (ObjUtil.isNull(mydoJob1)) {
|
||||
//入库分配 20251210
|
||||
//根据已绑定条码获取子单物料号
|
||||
TrayMsg msg = new TrayMsg();
|
||||
msg.setTrayCode(requestEnter.getTrayCode());
|
||||
List<TrayMsg> list = trayMsgService.selectTrayMsgList(msg);
|
||||
|
||||
//校验 - 条码未绑定子单
|
||||
if (!CollUtil.isNotEmpty(list)) {
|
||||
log.info("未找到该托盘【" + requestEnter.getTrayCode() + "】绑定的子单据,请检查绑定列表");
|
||||
return AjaxResult.error("该托盘未绑定子单据:" + requestEnter.getTrayCode());
|
||||
}
|
||||
|
||||
//获取绑定的子单信息
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(list.get(0).getStockinDetailId());
|
||||
productId=inStockinDetail.getProductId();
|
||||
|
||||
//返回入库作业参数
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("v_param", "RK");
|
||||
mydoJobService.getInJobId(map);//存储过程【util_serial_job】生成作业号
|
||||
mydoJob.setJobId(map.get("v_serial"));
|
||||
|
||||
mydoJob.setStatus("1");
|
||||
mydoJob.setInOrOut("1");
|
||||
mydoJob.setTrayCode(requestEnter.getTrayCode());
|
||||
map.put("v_param", "1");
|
||||
mydoJobService.getInTask(map);
|
||||
mydoJob.setTaskNo(map.get("v_serial"));
|
||||
|
||||
mydoJob.setCreateTime(new Date());
|
||||
mydoJobService.insertMydoJob(mydoJob);
|
||||
}else if(ObjUtil.isNotNull(mydoJob1) && !"1".equals(mydoJob1.getInOrOut())){
|
||||
productId="KTP0001";
|
||||
mydoJob=mydoJob1;
|
||||
TrayMsg msg = new TrayMsg();
|
||||
msg.setTrayCode(requestEnter.getTrayCode());
|
||||
List<TrayMsg> list = trayMsgService.selectTrayMsgList(msg);
|
||||
if (!CollUtil.isNotEmpty(list)) {
|
||||
log.info("未找到该托盘【{}】绑定的子单据,请检查绑定列表", requestEnter.getTrayCode());
|
||||
return AjaxResult.error("该托盘未绑定子单据:" + requestEnter.getTrayCode());
|
||||
}
|
||||
//获取货位
|
||||
String cargoSpaceId = getCargoSpaceByProductInfo(productId);
|
||||
|
||||
TrayMsg trayMsg =list.get(0);
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("v_param", "RK");
|
||||
mydoJobService.getInJobId(map);//存储过程【util_serial_job】生成作业号
|
||||
mydoJob.setJobId(map.get("v_serial"));
|
||||
mydoJob.setStatus("1");
|
||||
mydoJob.setInOrOut("1");
|
||||
mydoJob.setTrayCode(requestEnter.getTrayCode());
|
||||
map.put("v_param", "1");
|
||||
mydoJobService.getInTask(map);
|
||||
mydoJob.setTaskNo(map.get("v_serial"));
|
||||
mydoJob.setCreateTime(new Date());
|
||||
String stockinDetailId = trayMsg.getStockinDetailId();
|
||||
InStockinDetailN inStockinDetail = inStockinDetailNService.selectInStockinDetailNByStockinDetailId(stockinDetailId);
|
||||
String cargoSpaceId = getCargoSpaceByProductInfo(inStockinDetail.getProductModel());
|
||||
//是否有符合条件的货位
|
||||
if (!StringUtils.isNotBlank(cargoSpaceId)) {
|
||||
return AjaxResult.error("无符合条件的货位用于分配,请检查库存区占用情况,物料号:" + productId);
|
||||
return AjaxResult.error("无符合条件的货位用于分配,请检查库存区占用情况,物料号:" + inStockinDetail.getProductModel());
|
||||
}
|
||||
|
||||
mydoJob.setCargoSpaceId(cargoSpaceId);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
mydoJob.setRoadwayId(basCargoSpace.getTheFloor().toString());
|
||||
mydoJob.setStatus("3");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
|
||||
mydoJobService.insertMydoJob(mydoJob);
|
||||
MydoJobDetail mydoJobDetail = new MydoJobDetail();
|
||||
mydoJobDetail.setJobDetailId(mydoJob.getJobId() + "-" + 1);
|
||||
mydoJobDetail.setJobId(mydoJob.getJobId());
|
||||
mydoJobDetail.setProductName(inStockinDetail.getProductName());
|
||||
mydoJobDetail.setProductId(inStockinDetail.getProductModel());
|
||||
mydoJobDetail.setInQuantity(trayMsg.getQuantity());
|
||||
mydoJobDetail.setCreateTime(new Date());
|
||||
mydoJobDetail.setUnit(inStockinDetail.getUnit());
|
||||
mydoJobDetail.setInOrOutDId(stockinDetailId);
|
||||
mydoJobDetail.setInOrOutId(inStockinDetail.getStockinId());
|
||||
mydoJobDetailService.insertMydoJobDetail(mydoJobDetail);
|
||||
return AjaxResult.success(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* requestEnterByTrayCode -> 入库货位分配
|
||||
* 入库任务请求根据托盘码 -> 向子单明细分配入库货位
|
||||
* 获取库存物料号 -> 货位id -> 存储区组group -> 状态:未占用 -> 按规则获取货位
|
||||
*
|
||||
* @param productId 物料号
|
||||
* @return
|
||||
*/
|
||||
public String getCargoSpaceByProductInfo(String productId){
|
||||
public String getCargoSpaceByProductInfo(String productId) {
|
||||
//>>>>>>>>>>>>>>获取物料库存信息 -> 有库存 -> 货位(cargospace) -> 存储区组(groupCodingNo) -> 根据groupCoding(由高到低) -> 获取状态1的货位分配
|
||||
//>>>>>>>>>>>>>>获取物料库存信息 -> 无库存 -> 遍历存储区组(groupCodingNo) -> 查找全部货位空的区组 -> 根据groupCoding(由高到低) -> 获取状态1的货位分配
|
||||
try {
|
||||
@@ -207,7 +215,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
List<BasStock> stocksNew = stocks.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//查询对应货位的区域在【BasCargoSpace】是否有空位 - 在groupCodingNo的分组中是否仍然有状态【1】的货位
|
||||
for (BasStock stock : stocksNew){
|
||||
for (BasStock stock : stocksNew) {
|
||||
//获取每种物料的存放货位信息
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(stock.getCargoSpaceId());
|
||||
|
||||
@@ -218,15 +226,15 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
List<BasCargoSpace> cargoSpaces = basCargoSpaceService.selectBasCargoSpaceListByGroupCodingNo(group);
|
||||
|
||||
//在集合中获取状态为【1】的货位
|
||||
for (BasCargoSpace cs : cargoSpaces){
|
||||
for (BasCargoSpace cs : cargoSpaces) {
|
||||
//货位状态:1(未占用) -> 返回该货位结果
|
||||
if ("1".equals(cs.getStatus())){
|
||||
if ("1".equals(cs.getStatus())) {
|
||||
return cs.getCargoSpaceId();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
log.error("入库子单获取目标货位失败,异常信息:" + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
@@ -343,16 +351,16 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
param.setTrayCode(requestEnter.getTrayCode());
|
||||
param.setWarehouseId(requestEnter.getWarehouseId());
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(param);
|
||||
if (CollUtil.isEmpty(mydoJobs)){
|
||||
if (CollUtil.isEmpty(mydoJobs)) {
|
||||
return AjaxResult.error("没有该托盘任务", requestEnter.getTrayCode());
|
||||
}
|
||||
MydoJob mydoJob = mydoJobs.get(0);
|
||||
if(StrUtil.isEmpty(mydoJob.getCargoSpaceId())){
|
||||
if (StrUtil.isEmpty(mydoJob.getCargoSpaceId())) {
|
||||
BasCargoSpace basCargoSpaceParam = new BasCargoSpace();
|
||||
basCargoSpaceParam.setWarehouseId(mydoJob.getWarehouseId());
|
||||
basCargoSpaceParam.setRoadwayId(mydoJob.getRoadwayId());
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectEmptyCargoSpaceByWarehouseId(basCargoSpaceParam);
|
||||
if (ObjUtil.isNull(basCargoSpace)){
|
||||
if (ObjUtil.isNull(basCargoSpace)) {
|
||||
return AjaxResult.error("没有空货位");
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ import com.ruoyi.pda.service.PdaService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.mapper.BasStockMapper;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.service.IInStockinDetailNService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -61,6 +63,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
@Autowired
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
@Autowired
|
||||
private IInStockinDetailNService inStockinDetailNService;
|
||||
@Autowired
|
||||
private ICheckStockinDetailService checkStockinDetailService;
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
@@ -259,9 +263,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
if (mydoJob == null) {
|
||||
return AjaxResult.warn("任务不存在");
|
||||
}
|
||||
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(mydoJob.getWarehouseId());
|
||||
|
||||
if (StrUtil.isEmpty(mydoJob.getCargoSpaceId()) && "1".equals(basWarehouse.getWarehouseType())){
|
||||
if (StrUtil.isEmpty(mydoJob.getCargoSpaceId()) ){
|
||||
return AjaxResult.warn("未分配货位");
|
||||
}
|
||||
|
||||
@@ -338,12 +341,10 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
if ("1".equals(mydoJob.getInOrOut()) ) {
|
||||
//修改单据实际数量
|
||||
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);
|
||||
InStockinDetailN inStockinDetail = inStockinDetailNService.selectInStockinDetailNByStockinDetailId(inOrOutDId);
|
||||
inStockinDetail.setFinishNum(Convert.toBigDecimal(inStockinDetail.getFinishNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity())));
|
||||
inStockinDetailNService.updateInStockinDetailN(inStockinDetail);
|
||||
}
|
||||
|
||||
//}
|
||||
//正常库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||
stockByInStockinDetail.setSpare7("0");
|
||||
@@ -354,16 +355,13 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
|
||||
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()));
|
||||
@@ -425,7 +423,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
stock.setStockinId(mydoJobDetail.getInOrOutId());
|
||||
stock.setStockinDetailId(mydoJobDetail.getInOrOutDId());
|
||||
stock.setInType(mydoJob.getInOrOut());
|
||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setProductName(mydoJobDetail.getProductName());
|
||||
stock.setSpare1(mydoJobDetail.getSpare1());
|
||||
stock.setSpare3(mydoJobDetail.getSpare3());
|
||||
|
||||
@@ -23,6 +23,8 @@ import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.mapper.BasStockMapper;
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.service.IInStockinDetailNService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -42,6 +44,8 @@ public class PdaServiceImp implements PdaService {
|
||||
@Autowired
|
||||
IInStockinDetailService inStockinDetailService;
|
||||
@Autowired
|
||||
IInStockinDetailNService inStockinDetailNService;
|
||||
@Autowired
|
||||
ITrayMsgService trayMsgService;
|
||||
@Autowired
|
||||
private ICheckCommitRecordService checkCommitRecordService;
|
||||
@@ -205,9 +209,10 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
@Override
|
||||
public AjaxResult selectStockinDetail(String stockinDetailId) {
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(stockinDetailId);
|
||||
int i = Integer.parseInt(inStockinDetail.getQuantity()) - Integer.parseInt(inStockinDetail.getScanNum());
|
||||
inStockinDetail.setQuantityX(String.valueOf(i));
|
||||
InStockinDetailN inStockinDetail = inStockinDetailNService.selectInStockinDetailNByStockinDetailId(stockinDetailId);
|
||||
java.math.BigDecimal quantity = inStockinDetail.getQuantity() == null ? java.math.BigDecimal.ZERO : inStockinDetail.getQuantity();
|
||||
java.math.BigDecimal smNum = inStockinDetail.getSmNum() == null ? java.math.BigDecimal.ZERO : inStockinDetail.getSmNum();
|
||||
inStockinDetail.setFinishNum(quantity.subtract(smNum));
|
||||
return AjaxResult.success(inStockinDetail);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.domain.InStockinNFinish;
|
||||
import com.ruoyi.system.service.IInStockinNFinishService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.system.domain.InStockinN;
|
||||
import com.ruoyi.system.service.IInStockinNService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库单据管理Controller
|
||||
*
|
||||
* @author zgw
|
||||
* @date 2025-12-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/inStockIn")
|
||||
public class InStockinNController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInStockinNService inStockinNService;
|
||||
|
||||
@Autowired
|
||||
private IInStockinNFinishService inStockinNFinishService;
|
||||
|
||||
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:list')")
|
||||
@GetMapping("/listAll")
|
||||
public TableDataInfo listAll(InStockinN inStockinN)
|
||||
{
|
||||
if (inStockinN.getStatus()>3){
|
||||
return listFinish(inStockinN);
|
||||
}else {
|
||||
return list(inStockinN);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库单据管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InStockinN inStockinN)
|
||||
{
|
||||
startPage();
|
||||
List<InStockinN> list = inStockinNService.selectInStockinNList(inStockinN);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
public TableDataInfo listFinish(InStockinN inStockinN)
|
||||
{
|
||||
InStockinNFinish inStockinNFinish = new InStockinNFinish();
|
||||
BeanUtils.copyProperties(inStockinN, inStockinNFinish);
|
||||
startPage();
|
||||
List<InStockinNFinish> list = inStockinNFinishService.selectInStockinNFinishList(inStockinNFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库单据管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:export')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InStockinN inStockinN)
|
||||
{
|
||||
List<InStockinN> list = inStockinNService.selectInStockinNList(inStockinN);
|
||||
ExcelUtil<InStockinN> util = new ExcelUtil<InStockinN>(InStockinN.class);
|
||||
util.exportExcel(response, list, "入库单据管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单据管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:query')")
|
||||
@GetMapping(value = "/{stockinGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockinGuid") String stockinGuid)
|
||||
{
|
||||
final InStockinN inStockinN = inStockinNService.selectInStockinNByStockinGuid(stockinGuid);
|
||||
if (inStockinN==null){
|
||||
final InStockinNFinish inStockinNFinish = inStockinNFinishService.selectInStockinNFinishByStockinGuid(stockinGuid);
|
||||
return success(inStockinNFinish);
|
||||
}
|
||||
return success(inStockinN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:add')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockinN inStockinN)
|
||||
{
|
||||
return toAjax(inStockinNService.insertInStockinN(inStockinN));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:add')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.INSERT)
|
||||
@RequestMapping("/addOrder")
|
||||
public AjaxResult addOrder(@RequestBody InStockinN inStockinN)
|
||||
{
|
||||
return inStockinNService.insertInStockinNAndDetail(inStockinN, inStockinN.getInStockinDetailNList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:edit')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockinN inStockinN)
|
||||
{
|
||||
return toAjax(inStockinNService.updateInStockinN(inStockinN));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据管理 --单据作废
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:remove')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockinGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return toAjax(inStockinNService.deleteInStockinNByStockinGuids(stockinGuids));
|
||||
}
|
||||
/**
|
||||
* 单据作废
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:voided')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.DELETE)
|
||||
@RequestMapping("/voided/{stockinGuids}")
|
||||
public AjaxResult voided(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return inStockinNService.voidedInStockinNByStockinGuids(stockinGuids);
|
||||
}
|
||||
/**
|
||||
* 单据确认
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:sure')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.DELETE)
|
||||
@RequestMapping("/sure/{stockinGuids}")
|
||||
public AjaxResult sure(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return inStockinNService.sureInStockinNByStockinGuids(stockinGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单据审核 状态由0→1
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:inStockIn:rvw')")
|
||||
@Log(title = "入库单据管理", businessType = BusinessType.UPDATE)
|
||||
@RequestMapping("/rvw/{stockinGuids}")
|
||||
public AjaxResult rvw(@PathVariable String[] stockinGuids)
|
||||
{
|
||||
return toAjax(inStockinNService.rvw(stockinGuids));
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class InStockinDetailN extends BaseEntity
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long erpDetailId;
|
||||
private int erpDetailId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
@@ -158,12 +158,12 @@ public class InStockinDetailN extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private String stockinDetailId;
|
||||
|
||||
public void setErpDetailId(Long erpDetailId)
|
||||
public void setErpDetailId(int erpDetailId)
|
||||
{
|
||||
this.erpDetailId = erpDetailId;
|
||||
}
|
||||
|
||||
public Long getErpDetailId()
|
||||
public int getErpDetailId()
|
||||
{
|
||||
return erpDetailId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
package com.ruoyi.system.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_n
|
||||
*
|
||||
* @author zgw
|
||||
* @date 2025-12-16
|
||||
*/
|
||||
public class InStockinN extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** GUID(防止重复) */
|
||||
private String stockinGuid;
|
||||
|
||||
/** 入库单据编号 */
|
||||
@Excel(name = "入库单据编号")
|
||||
private String stockinId;
|
||||
|
||||
/** 入库主题 */
|
||||
@Excel(name = "入库主题")
|
||||
private String subject;
|
||||
|
||||
/** 入库id(内部或外部流水ID) */
|
||||
@Excel(name = "入库id", readConverterExp = "内=部或外部流水ID")
|
||||
private String erpStockinId;
|
||||
|
||||
/** 入库状态(0-草稿,1-待确认,2-已确认,3-已入库等) */
|
||||
@Excel(name = "入库状态", readConverterExp = "0=-草稿,1-待确认,2-已确认,3-已入库等")
|
||||
private int status;
|
||||
|
||||
/** 单据数量 */
|
||||
@Excel(name = "单据数量")
|
||||
private java.math.BigDecimal orderNum;
|
||||
|
||||
/** 完成数量 */
|
||||
@Excel(name = "完成数量")
|
||||
private java.math.BigDecimal finishNum;
|
||||
|
||||
/** 申请人 */
|
||||
@Excel(name = "申请人")
|
||||
private String applicant;
|
||||
|
||||
/** 申请日期 */
|
||||
@Excel(name = "申请日期")
|
||||
private String applyDate;
|
||||
|
||||
/** 确认日期 */
|
||||
@Excel(name = "确认日期")
|
||||
private String confirmDate;
|
||||
|
||||
/** 审批人 */
|
||||
@Excel(name = "审批人")
|
||||
private String approver;
|
||||
|
||||
/** 审批意见 */
|
||||
@Excel(name = "审批意见")
|
||||
private String approvalComment;
|
||||
|
||||
/** 关联其他单据id */
|
||||
@Excel(name = "关联其他单据id")
|
||||
private String relatedDocId;
|
||||
|
||||
/** 添加时间(记录插入时间) */
|
||||
@Excel(name = "添加时间", readConverterExp = "记=录插入时间")
|
||||
private String createdAt;
|
||||
|
||||
/** 库管id(用户ID或职员ID) */
|
||||
@Excel(name = "库管id", readConverterExp = "用=户ID或职员ID")
|
||||
private Long keeperId;
|
||||
|
||||
/** 入库类别 */
|
||||
@Excel(name = "入库类别")
|
||||
private String category;
|
||||
|
||||
/** 入库编号(流水或业务编号) */
|
||||
@Excel(name = "入库编号", readConverterExp = "流=水或业务编号")
|
||||
private String entryCode;
|
||||
|
||||
/** 审批状态(0-未审批,1-通过,2-驳回) */
|
||||
@Excel(name = "审批状态", readConverterExp = "0=-未审批,1-通过,2-驳回")
|
||||
private Long approvalStatus;
|
||||
|
||||
/** 产品明细(建议存JSON或文本) */
|
||||
@Excel(name = "产品明细", readConverterExp = "建=议存JSON或文本")
|
||||
private String productDetails;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 磅单编号 */
|
||||
@Excel(name = "磅单编号")
|
||||
private String weighbillNo;
|
||||
|
||||
/** 入库车号 */
|
||||
@Excel(name = "入库车号")
|
||||
private String vehicleNo;
|
||||
|
||||
/** ERP单据状态 */
|
||||
@Excel(name = "ERP单据状态")
|
||||
private String erpStatus;
|
||||
|
||||
@Excel(name = "ERP单据来源")
|
||||
private String orderSrc;
|
||||
|
||||
/** 子单列表 */
|
||||
private java.util.List<InStockinDetailN> inStockinDetailNList;
|
||||
|
||||
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 setSubject(String subject)
|
||||
{
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public String getSubject()
|
||||
{
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setErpStockinId(String erpStockinId)
|
||||
{
|
||||
this.erpStockinId = erpStockinId;
|
||||
}
|
||||
|
||||
public String getErpStockinId()
|
||||
{
|
||||
return erpStockinId;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setApplicant(String applicant)
|
||||
{
|
||||
this.applicant = applicant;
|
||||
}
|
||||
|
||||
public String getApplicant()
|
||||
{
|
||||
return applicant;
|
||||
}
|
||||
|
||||
public void setApplyDate(String applyDate)
|
||||
{
|
||||
this.applyDate = applyDate;
|
||||
}
|
||||
|
||||
public String getApplyDate()
|
||||
{
|
||||
return applyDate;
|
||||
}
|
||||
|
||||
public void setConfirmDate(String confirmDate)
|
||||
{
|
||||
this.confirmDate = confirmDate;
|
||||
}
|
||||
|
||||
public String getConfirmDate()
|
||||
{
|
||||
return confirmDate;
|
||||
}
|
||||
|
||||
public void setApprover(String approver)
|
||||
{
|
||||
this.approver = approver;
|
||||
}
|
||||
|
||||
public String getApprover()
|
||||
{
|
||||
return approver;
|
||||
}
|
||||
|
||||
public void setApprovalComment(String approvalComment)
|
||||
{
|
||||
this.approvalComment = approvalComment;
|
||||
}
|
||||
|
||||
public String getApprovalComment()
|
||||
{
|
||||
return approvalComment;
|
||||
}
|
||||
|
||||
public void setRelatedDocId(String relatedDocId)
|
||||
{
|
||||
this.relatedDocId = relatedDocId;
|
||||
}
|
||||
|
||||
public String getRelatedDocId()
|
||||
{
|
||||
return relatedDocId;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setKeeperId(Long keeperId)
|
||||
{
|
||||
this.keeperId = keeperId;
|
||||
}
|
||||
|
||||
public Long getKeeperId()
|
||||
{
|
||||
return keeperId;
|
||||
}
|
||||
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setEntryCode(String entryCode)
|
||||
{
|
||||
this.entryCode = entryCode;
|
||||
}
|
||||
|
||||
public String getEntryCode()
|
||||
{
|
||||
return entryCode;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(Long approvalStatus)
|
||||
{
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public Long getApprovalStatus()
|
||||
{
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
public void setProductDetails(String productDetails)
|
||||
{
|
||||
this.productDetails = productDetails;
|
||||
}
|
||||
|
||||
public String getProductDetails()
|
||||
{
|
||||
return productDetails;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setWeighbillNo(String weighbillNo)
|
||||
{
|
||||
this.weighbillNo = weighbillNo;
|
||||
}
|
||||
|
||||
public String getWeighbillNo()
|
||||
{
|
||||
return weighbillNo;
|
||||
}
|
||||
|
||||
public void setVehicleNo(String vehicleNo)
|
||||
{
|
||||
this.vehicleNo = vehicleNo;
|
||||
}
|
||||
|
||||
public String getVehicleNo()
|
||||
{
|
||||
return vehicleNo;
|
||||
}
|
||||
|
||||
public void setErpStatus(String erpStatus)
|
||||
{
|
||||
this.erpStatus = erpStatus;
|
||||
}
|
||||
|
||||
public String getErpStatus()
|
||||
{
|
||||
return erpStatus;
|
||||
}
|
||||
|
||||
public java.math.BigDecimal getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(java.math.BigDecimal orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public java.math.BigDecimal getFinishNum() {
|
||||
return finishNum;
|
||||
}
|
||||
|
||||
public void setFinishNum(java.math.BigDecimal finishNum) {
|
||||
this.finishNum = finishNum;
|
||||
}
|
||||
|
||||
|
||||
public void setOrderSrc(String orderSrc) {
|
||||
this.orderSrc = orderSrc;
|
||||
}
|
||||
|
||||
public String getOrderSrc() {
|
||||
return orderSrc;
|
||||
}
|
||||
|
||||
public java.util.List<InStockinDetailN> getInStockinDetailNList() {
|
||||
return inStockinDetailNList;
|
||||
}
|
||||
|
||||
public void setInStockinDetailNList(java.util.List<InStockinDetailN> inStockinDetailNList) {
|
||||
this.inStockinDetailNList = inStockinDetailNList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockinGuid", getStockinGuid())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("subject", getSubject())
|
||||
.append("erpStockinId", getErpStockinId())
|
||||
.append("status", getStatus())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("finishNum", getFinishNum())
|
||||
.append("applicant", getApplicant())
|
||||
.append("applyDate", getApplyDate())
|
||||
.append("confirmDate", getConfirmDate())
|
||||
.append("approver", getApprover())
|
||||
.append("approvalComment", getApprovalComment())
|
||||
.append("remark", getRemark())
|
||||
.append("relatedDocId", getRelatedDocId())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("keeperId", getKeeperId())
|
||||
.append("category", getCategory())
|
||||
.append("entryCode", getEntryCode())
|
||||
.append("approvalStatus", getApprovalStatus())
|
||||
.append("productDetails", getProductDetails())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("weighbillNo", getWeighbillNo())
|
||||
.append("vehicleNo", getVehicleNo())
|
||||
.append("erpStatus", getErpStatus())
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 入库单据查询请求实体
|
||||
* <p>
|
||||
* 用于接收前端查询入库单据的过滤条件与分页参数。
|
||||
* 字段命名通过 {@link JsonProperty} 与前端 JSON 键名保持一致,内部使用更符合 Java 的驼峰命名。
|
||||
* 说明:日期字段使用字符串类型以兼容各种格式,服务层可按需解析为时间类型。
|
||||
*/
|
||||
public class InStockinNQueryRequest {
|
||||
/**
|
||||
* 申请开始时间,对应 JSON: "Date3_start"
|
||||
* 示例:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonProperty("Date3_start")
|
||||
private String date3Start = "";
|
||||
|
||||
/**
|
||||
* 申请结束时间,对应 JSON: "Date3_end"
|
||||
* 示例:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonProperty("Date3_end")
|
||||
private String date3End = "";
|
||||
|
||||
/**
|
||||
* 确认开始时间,对应 JSON: "Date5_start"
|
||||
* 示例:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonProperty("Date5_start")
|
||||
private String date5Start = "";
|
||||
|
||||
/**
|
||||
* 确认结束时间,对应 JSON: "Date5_end"
|
||||
* 示例:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonProperty("Date5_end")
|
||||
private String date5End = "";
|
||||
|
||||
/**
|
||||
* 入库类别(数值),对应 JSON: "Sort1"
|
||||
* 例如:0-默认类别 等
|
||||
*/
|
||||
@JsonProperty("Sort1")
|
||||
private Integer sort1;
|
||||
|
||||
/**
|
||||
* 入库状态(数值),对应 JSON: "Complete1"
|
||||
* 例如:3-已入库 等
|
||||
*/
|
||||
@JsonProperty("Complete1")
|
||||
private Integer complete1;
|
||||
|
||||
/**
|
||||
* 入库主题(文本),对应 JSON: "Title"
|
||||
*/
|
||||
@JsonProperty("Title")
|
||||
private String title = "";
|
||||
|
||||
/**
|
||||
* 入库编号(文本),对应 JSON: "Rkbh"
|
||||
*/
|
||||
@JsonProperty("Rkbh")
|
||||
private String rkbh = "";
|
||||
|
||||
/**
|
||||
* 产品名称(文本),对应 JSON: "CPTitle"
|
||||
*/
|
||||
@JsonProperty("CPTitle")
|
||||
private String cpTitle = "";
|
||||
|
||||
/**
|
||||
* 产品编号(文本),对应 JSON: "Order1"
|
||||
*/
|
||||
@JsonProperty("Order1")
|
||||
private String order1 = "";
|
||||
|
||||
/**
|
||||
* 申请人员(文本),对应 JSON: "Cateid"
|
||||
*/
|
||||
@JsonProperty("Cateid")
|
||||
private String cateid = "";
|
||||
|
||||
/**
|
||||
* 库管人员(文本),对应 JSON: "Kg"
|
||||
*/
|
||||
@JsonProperty("Kg")
|
||||
private String kg = "";
|
||||
|
||||
/**
|
||||
* 是否返回明细信息(0/1),对应 JSON: "needList"
|
||||
*/
|
||||
@JsonProperty("needList")
|
||||
private Integer needList;
|
||||
|
||||
/**
|
||||
* 每页返回数据行数(分页),对应 JSON: "page_size"
|
||||
*/
|
||||
@JsonProperty("page_size")
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 从第几页开始返回(分页),对应 JSON: "page_index"
|
||||
*/
|
||||
@JsonProperty("page_index")
|
||||
private Integer pageIndex;
|
||||
|
||||
public String getDate3Start() {
|
||||
return date3Start;
|
||||
}
|
||||
|
||||
public void setDate3Start(String date3Start) {
|
||||
this.date3Start = date3Start;
|
||||
}
|
||||
|
||||
public String getDate3End() {
|
||||
return date3End;
|
||||
}
|
||||
|
||||
public void setDate3End(String date3End) {
|
||||
this.date3End = date3End;
|
||||
}
|
||||
|
||||
public String getDate5Start() {
|
||||
return date5Start;
|
||||
}
|
||||
|
||||
public void setDate5Start(String date5Start) {
|
||||
this.date5Start = date5Start;
|
||||
}
|
||||
|
||||
public String getDate5End() {
|
||||
return date5End;
|
||||
}
|
||||
|
||||
public void setDate5End(String date5End) {
|
||||
this.date5End = date5End;
|
||||
}
|
||||
|
||||
public Integer getSort1() {
|
||||
return sort1;
|
||||
}
|
||||
|
||||
public void setSort1(Integer sort1) {
|
||||
this.sort1 = sort1;
|
||||
}
|
||||
|
||||
public Integer getComplete1() {
|
||||
return complete1;
|
||||
}
|
||||
|
||||
public void setComplete1(Integer complete1) {
|
||||
this.complete1 = complete1;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getRkbh() {
|
||||
return rkbh;
|
||||
}
|
||||
|
||||
public void setRkbh(String rkbh) {
|
||||
this.rkbh = rkbh;
|
||||
}
|
||||
|
||||
public String getCpTitle() {
|
||||
return cpTitle;
|
||||
}
|
||||
|
||||
public void setCpTitle(String cpTitle) {
|
||||
this.cpTitle = cpTitle;
|
||||
}
|
||||
|
||||
public String getOrder1() {
|
||||
return order1;
|
||||
}
|
||||
|
||||
public void setOrder1(String order1) {
|
||||
this.order1 = order1;
|
||||
}
|
||||
|
||||
public String getCateid() {
|
||||
return cateid;
|
||||
}
|
||||
|
||||
public void setCateid(String cateid) {
|
||||
this.cateid = cateid;
|
||||
}
|
||||
|
||||
public String getKg() {
|
||||
return kg;
|
||||
}
|
||||
|
||||
public void setKg(String kg) {
|
||||
this.kg = kg;
|
||||
}
|
||||
|
||||
public Integer getNeedList() {
|
||||
return needList;
|
||||
}
|
||||
|
||||
public void setNeedList(Integer needList) {
|
||||
this.needList = needList;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Integer getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
public void setPageIndex(Integer pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("date3Start", date3Start)
|
||||
.append("date3End", date3End)
|
||||
.append("date5Start", date5Start)
|
||||
.append("date5End", date5End)
|
||||
.append("sort1", sort1)
|
||||
.append("complete1", complete1)
|
||||
.append("title", title)
|
||||
.append("rkbh", rkbh)
|
||||
.append("cpTitle", cpTitle)
|
||||
.append("order1", order1)
|
||||
.append("cateid", cateid)
|
||||
.append("kg", kg)
|
||||
.append("needList", needList)
|
||||
.append("pageSize", pageSize)
|
||||
.append("pageIndex", pageIndex)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,5 @@ public interface InStockinDetailNMapper
|
||||
public int deleteInStockinDetailNByStockinDetailIds(String[] stockinDetailIds);
|
||||
|
||||
void deleteByStockInId(@Param("stockinId") String stockinId);
|
||||
|
||||
}
|
||||
|
||||
@@ -58,4 +58,5 @@ public interface IInStockinDetailNService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinDetailNByStockinDetailId(String stockinDetailId);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.domain.InStockinN;
|
||||
|
||||
/**
|
||||
* 入库单据管理Service接口
|
||||
*
|
||||
* @author zgw
|
||||
* @date 2025-12-16
|
||||
*/
|
||||
public interface IInStockinNService
|
||||
{
|
||||
/**
|
||||
* 查询入库单据管理
|
||||
*
|
||||
* @param stockinGuid 入库单据管理主键
|
||||
* @return 入库单据管理
|
||||
*/
|
||||
public InStockinN selectInStockinNByStockinGuid(String stockinGuid);
|
||||
|
||||
/**
|
||||
* 查询入库单据管理列表
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 入库单据管理集合
|
||||
*/
|
||||
public List<InStockinN> selectInStockinNList(InStockinN inStockinN);
|
||||
|
||||
/**
|
||||
* 新增入库单据管理
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInStockinN(InStockinN inStockinN);
|
||||
|
||||
/**
|
||||
* 修改入库单据管理
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInStockinN(InStockinN inStockinN);
|
||||
|
||||
/**
|
||||
* 批量删除入库单据管理
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinNByStockinGuids(String[] stockinGuids);
|
||||
|
||||
/**
|
||||
* 删除入库单据管理信息
|
||||
*
|
||||
* @param stockinGuid 入库单据管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInStockinNByStockinGuid(String stockinGuid);
|
||||
/**
|
||||
* 根据入库编号和日期查询
|
||||
* @param stockinId
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public InStockinN selectInStockinNByStockinIdAndDate(String stockinId, String date);
|
||||
|
||||
int rvw(String[] stockinGuids);
|
||||
|
||||
AjaxResult voidedInStockinNByStockinGuids(String[] stockinGuids);
|
||||
|
||||
AjaxResult sureInStockinNByStockinGuids(String[] stockinGuids);
|
||||
|
||||
AjaxResult insertInStockinNAndDetail(InStockinN inStockinN, List<InStockinDetailN> inStockinDetailNS);
|
||||
}
|
||||
@@ -93,4 +93,6 @@ public class InStockinDetailNServiceImpl implements IInStockinDetailNService
|
||||
{
|
||||
return inStockinDetailNMapper.deleteInStockinDetailNByStockinDetailId(stockinDetailId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain.InStockinDetailN;
|
||||
import com.ruoyi.system.domain.InStockinNFinish;
|
||||
import com.ruoyi.system.mapper.InStockinDetailNFinishMapper;
|
||||
import com.ruoyi.system.mapper.InStockinDetailNMapper;
|
||||
import com.ruoyi.system.mapper.InStockinNFinishMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.InStockinNMapper;
|
||||
import com.ruoyi.system.domain.InStockinN;
|
||||
import com.ruoyi.system.service.IInStockinNService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 入库单据管理Service业务层处理
|
||||
*
|
||||
* @author zgw
|
||||
* @date 2025-12-16
|
||||
*/
|
||||
@Service
|
||||
public class InStockinNServiceImpl implements IInStockinNService {
|
||||
@Autowired
|
||||
private InStockinNMapper inStockinNMapper;
|
||||
@Autowired
|
||||
private InStockinNFinishMapper inStockinNFinishMapper;
|
||||
@Autowired
|
||||
private InStockinDetailNMapper inStockinDetailNMapper;
|
||||
@Autowired
|
||||
private InStockinDetailNFinishMapper inStockinDetailNFinishMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库单据管理
|
||||
*
|
||||
* @param stockinGuid 入库单据管理主键
|
||||
* @return 入库单据管理
|
||||
*/
|
||||
@Override
|
||||
public InStockinN selectInStockinNByStockinGuid(String stockinGuid) {
|
||||
return inStockinNMapper.selectInStockinNByStockinGuid(stockinGuid);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public InStockinN selectInStockinNByStockinIdAndDate(String stockinId, String date) {
|
||||
return inStockinNMapper.selectInStockinNByStockinIdAndDate(stockinId, date);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rvw(String[] stockinGuids) {
|
||||
int updateNum = 0;
|
||||
for (String stockinGuid : stockinGuids) {
|
||||
InStockinN inStockinN = inStockinNMapper.selectInStockinNByStockinGuid(stockinGuid);
|
||||
if (inStockinN.getStatus() == 1) {
|
||||
inStockinN.setStatus(2);
|
||||
}
|
||||
updateNum += inStockinNMapper.updateInStockinN(inStockinN);
|
||||
}
|
||||
return updateNum > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult voidedInStockinNByStockinGuids(String[] stockinGuids) {
|
||||
for (String stockinGuid : stockinGuids) {
|
||||
InStockinN inStockinN = inStockinNMapper.selectInStockinNByStockinGuid(stockinGuid);
|
||||
//未执行可以作废
|
||||
if (inStockinN.getStatus() == 1) {
|
||||
inStockinN.setStatus(4);
|
||||
InStockinNFinish inStockinNFinish = new InStockinNFinish();
|
||||
BeanUtils.copyProperties(inStockinN, inStockinNFinish);
|
||||
inStockinNFinish.setDeleteTime(DateUtil.now());
|
||||
inStockinNFinishMapper.insertInStockinNFinish(inStockinNFinish);
|
||||
inStockinNMapper.deleteInStockinNByStockinGuid(stockinGuid);
|
||||
//处理子单信息
|
||||
inStockinDetailNFinishMapper.insertByStockInId(inStockinN.getStockinId());
|
||||
inStockinDetailNMapper.deleteByStockInId(inStockinN.getStockinId());
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult sureInStockinNByStockinGuids(String[] stockinGuids) {
|
||||
for (String stockinGuid : stockinGuids) {
|
||||
InStockinN inStockinN = inStockinNMapper.selectInStockinNByStockinGuid(stockinGuid);
|
||||
//未执行可以作废
|
||||
inStockinN.setStatus(5);
|
||||
InStockinNFinish inStockinNFinish = new InStockinNFinish();
|
||||
if (inStockinN.getStatus() == 3) {
|
||||
BeanUtils.copyProperties(inStockinN, inStockinNFinish);
|
||||
inStockinNFinish.setDeleteTime(DateUtil.now());
|
||||
inStockinNFinishMapper.insertInStockinNFinish(inStockinNFinish);
|
||||
inStockinNMapper.deleteInStockinNByStockinGuids(stockinGuids);
|
||||
//处理子单信息
|
||||
inStockinDetailNFinishMapper.insertByStockInId(inStockinN.getStockinId());
|
||||
inStockinDetailNMapper.deleteByStockInId(inStockinN.getStockinId());
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult insertInStockinNAndDetail(InStockinN inStockinN, List<InStockinDetailN> inStockinDetailNS) {
|
||||
String stockinGuid = UUID.randomUUID().toString();
|
||||
inStockinN.setStockinGuid(stockinGuid);
|
||||
java.math.BigDecimal orderSum = new java.math.BigDecimal("0");
|
||||
for (int i = 0; i < inStockinDetailNS.size(); i++) {
|
||||
InStockinDetailN inStockinDetailN = inStockinDetailNS.get(i);
|
||||
inStockinDetailN.setStockinGuid(inStockinN.getStockinGuid());
|
||||
String stockinDetailId = inStockinN.getStockinId() + "-" + (i + 1);
|
||||
inStockinDetailN.setStockinId(inStockinN.getStockinId());
|
||||
inStockinDetailN.setStockinDetailId(stockinDetailId);
|
||||
orderSum=orderSum.add(inStockinDetailN.getInQuantity());
|
||||
inStockinDetailNMapper.insertInStockinDetailN(inStockinDetailN);
|
||||
}
|
||||
inStockinNMapper.insertInStockinN(inStockinN);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库单据管理列表
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 入库单据管理
|
||||
*/
|
||||
@Override
|
||||
public List<InStockinN> selectInStockinNList(InStockinN inStockinN) {
|
||||
return inStockinNMapper.selectInStockinNList(inStockinN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单据管理
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInStockinN(InStockinN inStockinN) {
|
||||
return inStockinNMapper.insertInStockinN(inStockinN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单据管理
|
||||
*
|
||||
* @param inStockinN 入库单据管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInStockinN(InStockinN inStockinN) {
|
||||
return inStockinNMapper.updateInStockinN(inStockinN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单据管理
|
||||
*
|
||||
* @param stockinGuids 需要删除的入库单据管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteInStockinNByStockinGuids(String[] stockinGuids) {
|
||||
try {
|
||||
for (String stockinGuid : stockinGuids) {
|
||||
InStockinN inStockinN = inStockinNMapper.selectInStockinNByStockinGuid(stockinGuid);
|
||||
inStockinN.setStatus(10);
|
||||
InStockinNFinish inStockinNFinish = new InStockinNFinish();
|
||||
BeanUtils.copyProperties(inStockinN,inStockinNFinish);
|
||||
inStockinNFinish.setDeleteTime(DateUtil.now());
|
||||
inStockinNFinishMapper.insertInStockinNFinish(inStockinNFinish);
|
||||
inStockinNMapper.deleteInStockinNByStockinGuid(stockinGuid);
|
||||
inStockinDetailNFinishMapper.insertByStockInId(inStockinN.getStockinId());
|
||||
inStockinDetailNMapper.deleteByStockInId(inStockinN.getStockinId());
|
||||
}
|
||||
return 1;
|
||||
} catch (BeansException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库单据管理信息
|
||||
*
|
||||
* @param stockinGuid 入库单据管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInStockinNByStockinGuid(String stockinGuid) {
|
||||
return inStockinNMapper.deleteInStockinNByStockinGuid(stockinGuid);
|
||||
}
|
||||
}
|
||||
@@ -488,9 +488,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
pd_detail_id,pd_product_name,pd_model,pd_unit,pd_unit_price,pd_aux_unit,pd_attr1,pd_attr2,pd_quantity,pd_in_qty,pd_aux_quantity,pd_total_price,pd_cost_unit_price,pd_total_price_2,pd_account_cost_total,pd_account_quantity,pd_account_status,pd_batch_no,pd_serial_no,pd_prod_date,pd_valid_date,pd_arrival_date,pd_remark,pd_custom1,pd_custom2,pd_custom3,pd_custom4,pd_custom5,pd_custom6,pd_loader)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.productId}
|
||||
,#{item.productName},/*#{item.voltage},#{item.netWeight},#{item.grossWeight},#{item.distribution},*/#{item.orderId},
|
||||
#{item.pdDetailId},#{item.pdProductName},#{item.pdModel},#{item.pdUnit},#{item.pdUnitPrice},#{item.pdAuxUnit},#{item.pdAttr1},#{item.pdAttr2},#{item.pdQuantity},#{item.pdInQty},#{item.pdAuxQuantity},#{item.pdTotalPrice},#{item.pdCostUnitPrice},#{item.pdTotalPrice2},#{item.pdAccountCostTotal},#{item.pdAccountQuantity},#{item.pdAccountStatus},#{item.pdBatchNo},#{item.pdSerialNo},#{item.pdProdDate},#{item.pdValidDate},#{item.pdArrivalDate},#{item.pdRemark},#{item.pdCustom1},#{item.pdCustom2},#{item.pdCustom3},#{item.pdCustom4},#{item.pdCustom5},#{item.pdCustom6},#{item.pdLoader})
|
||||
(#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate, jdbcType=VARCHAR},#{item.backDate, jdbcType=VARCHAR},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.productId}
|
||||
,#{item.productName},#{item.orderId},
|
||||
#{item.pdDetailId},#{item.pdProductName},#{item.pdModel},#{item.pdUnit},#{item.pdUnitPrice},#{item.pdAuxUnit},#{item.pdAttr1},#{item.pdAttr2},#{item.pdQuantity},#{item.pdInQty},#{item.pdAuxQuantity},#{item.pdTotalPrice},#{item.pdCostUnitPrice},#{item.pdTotalPrice2},#{item.pdAccountCostTotal},#{item.pdAccountQuantity},#{item.pdAccountStatus},#{item.pdBatchNo},#{item.pdSerialNo},#{item.pdProdDate, jdbcType=VARCHAR},#{item.pdValidDate, jdbcType=VARCHAR},#{item.pdArrivalDate, jdbcType=VARCHAR},#{item.pdRemark},#{item.pdCustom1},#{item.pdCustom2},#{item.pdCustom3},#{item.pdCustom4},#{item.pdCustom5},#{item.pdCustom6},#{item.pdLoader})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectInStockinDetailNList" parameterType="InStockinDetailN" resultMap="InStockinDetailNResult">
|
||||
<include refid="selectInStockinDetailNVo"/>
|
||||
<where>
|
||||
<if test="erpDetailId != null "> and erp_detail_id = #{erpDetailId}</if>
|
||||
<if test="erpDetailId != null and erpDetailId!=0"> and erp_detail_id = #{erpDetailId}</if>
|
||||
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid = #{stockinGuid}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
@@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertInStockinDetailN" parameterType="InStockinDetailN">
|
||||
insert into in_stockin_detail_n
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="erpDetailId != null">erp_detail_id,</if>
|
||||
<if test="erpDetailId != null and erpDetailId!=0">erp_detail_id,</if>
|
||||
<if test="stockinGuid != null">stockin_guid,</if>
|
||||
<if test="stockinId != null">stockin_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
@@ -128,6 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="custom4 != null">custom4,</if>
|
||||
<if test="custom5 != null">custom5,</if>
|
||||
<if test="custom6 != null">custom6,</if>
|
||||
<if test="smNum != null">sm_num,</if>
|
||||
<if test="finishNum != null">finish_num,</if>
|
||||
<if test="stevedore != null">stevedore,</if>
|
||||
<if test="orderSrc != null">order_src,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
@@ -135,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="erpDetailId != null">#{erpDetailId},</if>
|
||||
<if test="erpDetailId != null and erpDetailId!=0">#{erpDetailId},</if>
|
||||
<if test="stockinGuid != null">#{stockinGuid},</if>
|
||||
<if test="stockinId != null">#{stockinId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
<?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.system.mapper.InStockinNMapper">
|
||||
|
||||
<resultMap type="InStockinN" id="InStockinNResult">
|
||||
<result property="stockinGuid" column="stockin_guid" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="subject" column="subject" />
|
||||
<result property="erpStockinId" column="erp_stockin_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="finishNum" column="finish_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="applicant" column="applicant" />
|
||||
<result property="applyDate" column="apply_date" />
|
||||
<result property="confirmDate" column="confirm_date" />
|
||||
<result property="approver" column="approver" />
|
||||
<result property="approvalComment" column="approval_comment" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="relatedDocId" column="related_doc_id" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="keeperId" column="keeper_id" />
|
||||
<result property="category" column="category" />
|
||||
<result property="entryCode" column="entry_code" />
|
||||
<result property="approvalStatus" column="approval_status" />
|
||||
<result property="productDetails" column="product_details" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="weighbillNo" column="weighbill_no" />
|
||||
<result property="vehicleNo" column="vehicle_no" />
|
||||
<result property="erpStatus" column="erp_status" />
|
||||
<result property="orderSrc" column="order_src" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInStockinNVo">
|
||||
select stockin_guid, stockin_id,subject, erp_stockin_id, order_num, finish_num, status, applicant, apply_date, confirm_date, approver, approval_comment, remark, related_doc_id, created_at, keeper_id, category, entry_code, approval_status, product_details, customer_name, weighbill_no, vehicle_no, erp_status, order_src, create_time, update_time from in_stockin_n
|
||||
</sql>
|
||||
|
||||
<select id="selectInStockinNList" parameterType="InStockinN" resultMap="InStockinNResult">
|
||||
<include refid="selectInStockinNVo"/>
|
||||
<where>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="subject != null and subject != ''"> and subject = #{subject}</if>
|
||||
<if test="erpStockinId != null and erpStockinId != ''"> and erp_stockin_id = #{erpStockinId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="finishNum != null "> and finish_num = #{finishNum}</if>
|
||||
<if test="status != null and status != 0"> and status = #{status}</if>
|
||||
<if test="applicant != null and applicant != ''"> and applicant = #{applicant}</if>
|
||||
<if test="applyDate != null and applyDate != ''"> and apply_date = #{applyDate}</if>
|
||||
<if test="confirmDate != null and confirmDate != ''"> and confirm_date = #{confirmDate}</if>
|
||||
<if test="approver != null and approver != ''"> and approver = #{approver}</if>
|
||||
<if test="approvalComment != null and approvalComment != ''"> and approval_comment = #{approvalComment}</if>
|
||||
<if test="relatedDocId != null and relatedDocId != ''"> and related_doc_id = #{relatedDocId}</if>
|
||||
<if test="createdAt != null and createdAt != ''"> and created_at = #{createdAt}</if>
|
||||
<if test="keeperId != null "> and keeper_id = #{keeperId}</if>
|
||||
<if test="category != null and category != ''"> and category = #{category}</if>
|
||||
<if test="entryCode != null and entryCode != ''"> and entry_code = #{entryCode}</if>
|
||||
<if test="approvalStatus != null "> and approval_status = #{approvalStatus}</if>
|
||||
<if test="productDetails != null and productDetails != ''"> and product_details = #{productDetails}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="weighbillNo != null and weighbillNo != ''"> and weighbill_no = #{weighbillNo}</if>
|
||||
<if test="vehicleNo != null and vehicleNo != ''"> and vehicle_no = #{vehicleNo}</if>
|
||||
<if test="erpStatus != null and erpStatus != ''"> and erp_status = #{erpStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInStockinNByStockinGuid" parameterType="String" resultMap="InStockinNResult">
|
||||
<include refid="selectInStockinNVo"/>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinN" parameterType="InStockinN">
|
||||
insert into in_stockin_n
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">stockin_guid,</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id,</if>
|
||||
<if test="subject != null">subject,</if>
|
||||
<if test="erpStockinId != null">erp_stockin_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="finishNum != null">finish_num,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="applicant != null">applicant,</if>
|
||||
<if test="applyDate != null">apply_date,</if>
|
||||
<if test="confirmDate != null">confirm_date,</if>
|
||||
<if test="approver != null">approver,</if>
|
||||
<if test="approvalComment != null">approval_comment,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="relatedDocId != null">related_doc_id,</if>
|
||||
<if test="createdAt != null and createdAt != ''">created_at,</if>
|
||||
<if test="keeperId != null">keeper_id,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="entryCode != null">entry_code,</if>
|
||||
<if test="approvalStatus != null">approval_status,</if>
|
||||
<if test="productDetails != null">product_details,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="weighbillNo != null">weighbill_no,</if>
|
||||
<if test="vehicleNo != null">vehicle_no,</if>
|
||||
<if test="erpStatus != null">erp_status,</if>
|
||||
<if test="orderSrc != null">order_Src,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockinGuid != null">#{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">#{stockinId},</if>
|
||||
<if test="subject != null">#{subject},</if>
|
||||
<if test="erpStockinId != null">#{erpStockinId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="finishNum != null">#{finishNum},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="applicant != null">#{applicant},</if>
|
||||
<if test="applyDate != null">#{applyDate},</if>
|
||||
<if test="confirmDate != null">#{confirmDate},</if>
|
||||
<if test="approver != null">#{approver},</if>
|
||||
<if test="approvalComment != null">#{approvalComment},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="relatedDocId != null">#{relatedDocId},</if>
|
||||
<if test="createdAt != null and createdAt != ''">#{createdAt},</if>
|
||||
<if test="keeperId != null">#{keeperId},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="entryCode != null">#{entryCode},</if>
|
||||
<if test="approvalStatus != null">#{approvalStatus},</if>
|
||||
<if test="productDetails != null">#{productDetails},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="weighbillNo != null">#{weighbillNo},</if>
|
||||
<if test="vehicleNo != null">#{vehicleNo},</if>
|
||||
<if test="erpStatus != null">#{erpStatus},</if>
|
||||
<if test="orderSrc != null">#{orderSrc},</if>
|
||||
GETDATE()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInStockinN" parameterType="InStockinN">
|
||||
update in_stockin_n
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
<if test="subject != null">subject = #{subject},</if>
|
||||
<if test="erpStockinId != null">erp_stockin_id = #{erpStockinId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="finishNum != null">finish_num = #{finishNum},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="applicant != null">applicant = #{applicant},</if>
|
||||
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
||||
<if test="confirmDate != null">confirm_date = #{confirmDate},</if>
|
||||
<if test="approver != null">approver = #{approver},</if>
|
||||
<if test="approvalComment != null">approval_comment = #{approvalComment},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="relatedDocId != null">related_doc_id = #{relatedDocId},</if>
|
||||
<if test="createdAt != null and createdAt != ''">created_at = #{createdAt},</if>
|
||||
<if test="keeperId != null">keeper_id = #{keeperId},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="entryCode != null">entry_code = #{entryCode},</if>
|
||||
<if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
|
||||
<if test="productDetails != null">product_details = #{productDetails},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="weighbillNo != null">weighbill_no = #{weighbillNo},</if>
|
||||
<if test="vehicleNo != null">vehicle_no = #{vehicleNo},</if>
|
||||
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
|
||||
<if test="orderSrc != null">order_src = #{orderSrc},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinNByStockinGuid" parameterType="String">
|
||||
delete from in_stockin_n where stockin_guid = #{stockinGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInStockinNByStockinGuids" parameterType="String">
|
||||
delete from in_stockin_n where stockin_guid in
|
||||
<foreach item="stockinGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockinGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectInStockinNByStockinIdAndDate" resultMap="InStockinNResult">
|
||||
<include refid="selectInStockinNVo"/>
|
||||
where erp_stockin_id = #{stockinId} and created_at like concat(#{date}, '%')
|
||||
</select>
|
||||
<select id="selectInStockinNByStockinId" parameterType="String" resultMap="InStockinNResult">
|
||||
<include refid="selectInStockinNVo"/>
|
||||
where stockin_id = #{stockinGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
44
ruoyi-ui/src/api/pda/trayMsg.js
Normal file
44
ruoyi-ui/src/api/pda/trayMsg.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询入库绑定信息列表
|
||||
export function listTrayMsg(query) {
|
||||
return request({
|
||||
url: '/pda/trayMsg/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入库绑定信息详细
|
||||
export function getTrayMsg(id) {
|
||||
return request({
|
||||
url: '/pda/trayMsg/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增入库绑定信息
|
||||
export function addTrayMsg(data) {
|
||||
return request({
|
||||
url: '/pda/trayMsg',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改入库绑定信息
|
||||
export function updateTrayMsg(data) {
|
||||
return request({
|
||||
url: '/pda/trayMsg',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除入库绑定信息
|
||||
export function delTrayMsg(id) {
|
||||
return request({
|
||||
url: '/pda/trayMsg/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
277
ruoyi-ui/src/views/pda/trayMsg/index.vue
Normal file
277
ruoyi-ui/src/views/pda/trayMsg/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="托盘编码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<el-input
|
||||
v-model="queryParams.stockinDetailId"
|
||||
placeholder="请输入入库子单ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库ID" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['pda:trayMsg:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['pda:trayMsg:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['pda:trayMsg:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['pda:trayMsg:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="trayMsgList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="唯一ID" align="center" prop="id" />
|
||||
<el-table-column label="托盘编码" align="center" prop="trayCode" />
|
||||
<el-table-column label="入库子单ID" align="center" prop="stockinDetailId" />
|
||||
<el-table-column label="入库数量" align="center" prop="quantity" />
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['pda:trayMsg:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pda:trayMsg:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改入库绑定信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="托盘编码" prop="trayCode">
|
||||
<el-input v-model="form.trayCode" placeholder="请输入托盘编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库ID" prop="warehouseId">
|
||||
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTrayMsg, getTrayMsg, delTrayMsg, addTrayMsg, updateTrayMsg } from "@/api/pda/trayMsg"
|
||||
|
||||
export default {
|
||||
name: "TrayMsg",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 入库绑定信息表格数据
|
||||
trayMsgList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
trayCode: null,
|
||||
stockinDetailId: null,
|
||||
quantity: null,
|
||||
warehouseId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询入库绑定信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listTrayMsg(this.queryParams).then(response => {
|
||||
this.trayMsgList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
trayCode: null,
|
||||
stockinDetailId: null,
|
||||
quantity: null,
|
||||
warehouseId: null,
|
||||
createTime: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加入库绑定信息"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getTrayMsg(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改入库绑定信息"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateTrayMsg(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addTrayMsg(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除入库绑定信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delTrayMsg(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('pda/trayMsg/export', {
|
||||
...this.queryParams
|
||||
}, `trayMsg_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user