diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java b/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java index 3b0e3f0..3b7c186 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java @@ -1,9 +1,11 @@ package com.ruoyi.api.controller; +import com.ruoyi.api.moveMsg.domain.MoveMsg; import com.ruoyi.api.service.IToErpService; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.log.service.IRequestLogService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.*; import com.ruoyi.api.domain.DeliveryNoticeVo; @@ -48,10 +50,20 @@ public class ToErpApiController { /** * 回传其他出库单 */ +// @Scheduled(fixedDelay = 1500) @RequestMapping("/callbackOutDeliveryNotice") @ResponseBody public void callbackDeliveryOutNotice() { toErpService.callbackoutDeliveryNotice(); } + /** + * 移库回调接口 + */ +// @Scheduled(fixedDelay = 1500) + @RequestMapping("/moveCargoSpace") + @ResponseBody + public void moveCargoSpace(){ + toErpService.moveCargoSpace(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java index 8fd3ecd..2cc9117 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java @@ -4,6 +4,9 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; +import org.w3c.dom.stylesheets.LinkStyle; + +import java.util.List; /** * 出入库通知单-子表接收对象 @@ -42,7 +45,14 @@ public class DeliveryNoticeItemVo { /** 备注 */ private String remark; + private List locations; + /**货位*/ private String area; - + /**托盘*/ private String location; + + private String areaBefore; + + private String locationBefore; + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeVo.java b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeVo.java index f11d15f..c896dcf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeVo.java @@ -49,6 +49,10 @@ public class DeliveryNoticeVo { private String warehouseId; /** 备注 */ private String remark; + /** 配送终点 */ + private String destination; + /** 领料车间 */ + private String workshop; /** 子表明细列表 */ private List detailList; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/LocationDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/LocationDetail.java new file mode 100644 index 0000000..db5c3bc --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/LocationDetail.java @@ -0,0 +1,34 @@ +package com.ruoyi.api.domain; + +public class LocationDetail { + + private String locationNo; + + private String areaNo; + + private String quantity; + + public String getLocationNo() { + return locationNo; + } + + public void setLocationNo(String locationNo) { + this.locationNo = locationNo; + } + + public String getAreaNo() { + return areaNo; + } + + public void setAreaNo(String areaNo) { + this.areaNo = areaNo; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/controller/MoveMsgController.java b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/controller/MoveMsgController.java new file mode 100644 index 0000000..69b3893 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/controller/MoveMsgController.java @@ -0,0 +1,104 @@ +package com.ruoyi.api.moveMsg.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.api.moveMsg.domain.MoveMsg; +import com.ruoyi.api.moveMsg.service.IMoveMsgService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 移库信息回传Controller + * + * @author ruoyi + * @date 2026-01-29 + */ +@RestController +@RequestMapping("/api/moveMsg") +public class MoveMsgController extends BaseController +{ + @Autowired + private IMoveMsgService moveMsgService; + + /** + * 查询移库信息回传列表 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:list')") + @GetMapping("/list") + public TableDataInfo list(MoveMsg moveMsg) + { + startPage(); + List list = moveMsgService.selectMoveMsgList(moveMsg); + return getDataTable(list); + } + + /** + * 导出移库信息回传列表 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:export')") + @Log(title = "移库信息回传", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MoveMsg moveMsg) + { + List list = moveMsgService.selectMoveMsgList(moveMsg); + ExcelUtil util = new ExcelUtil(MoveMsg.class); + util.exportExcel(response, list, "移库信息回传数据"); + } + + /** + * 获取移库信息回传详细信息 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(moveMsgService.selectMoveMsgById(id)); + } + + /** + * 新增移库信息回传 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:add')") + @Log(title = "移库信息回传", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MoveMsg moveMsg) + { + return toAjax(moveMsgService.insertMoveMsg(moveMsg)); + } + + /** + * 修改移库信息回传 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:edit')") + @Log(title = "移库信息回传", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MoveMsg moveMsg) + { + return toAjax(moveMsgService.updateMoveMsg(moveMsg)); + } + + /** + * 删除移库信息回传 + */ + @PreAuthorize("@ss.hasPermi('api:moveMsg:remove')") + @Log(title = "移库信息回传", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(moveMsgService.deleteMoveMsgByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/domain/MoveMsg.java b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/domain/MoveMsg.java new file mode 100644 index 0000000..fc8ccad --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/domain/MoveMsg.java @@ -0,0 +1,202 @@ +package com.ruoyi.api.moveMsg.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; + +/** + * 移库信息回传对象 move_msg + * + * @author ruoyi + * @date 2026-01-29 + */ +public class MoveMsg extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 序号 */ + private String id; + + /** 托盘条码 */ + @Excel(name = "托盘条码") + private String trayCode; + + /** 原货位 */ + @Excel(name = "原货位") + private String oldSpace; + + /** 新货位 */ + @Excel(name = "新货位") + private String newSpace; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** 发送时间 */ + @Excel(name = "发送时间") + private String sendTime; + + /** 信息 */ + @Excel(name = "信息") + private String msg; + + /** 备用 */ + @Excel(name = "备用") + private String spare1; + + /** 备用 */ + @Excel(name = "备用") + private String spare2; + + /** 备用 */ + @Excel(name = "备用") + private String spare3; + + /** 备用 */ + @Excel(name = "备用") + private String spare4; + + /** 备用 */ + @Excel(name = "备用") + private String spare5; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setTrayCode(String trayCode) + { + this.trayCode = trayCode; + } + + public String getTrayCode() + { + return trayCode; + } + + public void setOldSpace(String oldSpace) + { + this.oldSpace = oldSpace; + } + + public String getOldSpace() + { + return oldSpace; + } + + public void setNewSpace(String newSpace) + { + this.newSpace = newSpace; + } + + public String getNewSpace() + { + return newSpace; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setSendTime(String sendTime) + { + this.sendTime = sendTime; + } + + public String getSendTime() + { + return sendTime; + } + + public void setMsg(String msg) + { + this.msg = msg; + } + + public String getMsg() + { + return msg; + } + + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("trayCode", getTrayCode()) + .append("oldSpace", getOldSpace()) + .append("newSpace", getNewSpace()) + .append("status", getStatus()) + .append("sendTime", getSendTime()) + .append("msg", getMsg()) + .append("spare1", getSpare1()) + .append("spare2", getSpare2()) + .append("spare3", getSpare3()) + .append("spare4", getSpare4()) + .append("spare5", getSpare5()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/mapper/MoveMsgMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/mapper/MoveMsgMapper.java new file mode 100644 index 0000000..80a588b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/mapper/MoveMsgMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.api.moveMsg.mapper; + +import java.util.List; +import com.ruoyi.api.moveMsg.domain.MoveMsg; + +/** + * 移库信息回传Mapper接口 + * + * @author ruoyi + * @date 2026-01-29 + */ +public interface MoveMsgMapper +{ + /** + * 查询移库信息回传 + * + * @param id 移库信息回传主键 + * @return 移库信息回传 + */ + public MoveMsg selectMoveMsgById(String id); + + /** + * 查询移库信息回传列表 + * + * @param moveMsg 移库信息回传 + * @return 移库信息回传集合 + */ + public List selectMoveMsgList(MoveMsg moveMsg); + + /** + * 新增移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + public int insertMoveMsg(MoveMsg moveMsg); + + /** + * 修改移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + public int updateMoveMsg(MoveMsg moveMsg); + + /** + * 删除移库信息回传 + * + * @param id 移库信息回传主键 + * @return 结果 + */ + public int deleteMoveMsgById(String id); + + /** + * 批量删除移库信息回传 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMoveMsgByIds(String[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/IMoveMsgService.java b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/IMoveMsgService.java new file mode 100644 index 0000000..23c4ee9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/IMoveMsgService.java @@ -0,0 +1,61 @@ +package com.ruoyi.api.moveMsg.service; + +import java.util.List; +import com.ruoyi.api.moveMsg.domain.MoveMsg; + +/** + * 移库信息回传Service接口 + * + * @author ruoyi + * @date 2026-01-29 + */ +public interface IMoveMsgService +{ + /** + * 查询移库信息回传 + * + * @param id 移库信息回传主键 + * @return 移库信息回传 + */ + public MoveMsg selectMoveMsgById(String id); + + /** + * 查询移库信息回传列表 + * + * @param moveMsg 移库信息回传 + * @return 移库信息回传集合 + */ + public List selectMoveMsgList(MoveMsg moveMsg); + + /** + * 新增移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + public int insertMoveMsg(MoveMsg moveMsg); + + /** + * 修改移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + public int updateMoveMsg(MoveMsg moveMsg); + + /** + * 批量删除移库信息回传 + * + * @param ids 需要删除的移库信息回传主键集合 + * @return 结果 + */ + public int deleteMoveMsgByIds(String[] ids); + + /** + * 删除移库信息回传信息 + * + * @param id 移库信息回传主键 + * @return 结果 + */ + public int deleteMoveMsgById(String id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/impl/MoveMsgServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/impl/MoveMsgServiceImpl.java new file mode 100644 index 0000000..0334df5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/moveMsg/service/impl/MoveMsgServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.api.moveMsg.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.api.moveMsg.mapper.MoveMsgMapper; +import com.ruoyi.api.moveMsg.domain.MoveMsg; +import com.ruoyi.api.moveMsg.service.IMoveMsgService; + +/** + * 移库信息回传Service业务层处理 + * + * @author ruoyi + * @date 2026-01-29 + */ +@Service +public class MoveMsgServiceImpl implements IMoveMsgService +{ + @Autowired + private MoveMsgMapper moveMsgMapper; + + /** + * 查询移库信息回传 + * + * @param id 移库信息回传主键 + * @return 移库信息回传 + */ + @Override + public MoveMsg selectMoveMsgById(String id) + { + return moveMsgMapper.selectMoveMsgById(id); + } + + /** + * 查询移库信息回传列表 + * + * @param moveMsg 移库信息回传 + * @return 移库信息回传 + */ + @Override + public List selectMoveMsgList(MoveMsg moveMsg) + { + return moveMsgMapper.selectMoveMsgList(moveMsg); + } + + /** + * 新增移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + @Override + public int insertMoveMsg(MoveMsg moveMsg) + { + return moveMsgMapper.insertMoveMsg(moveMsg); + } + + /** + * 修改移库信息回传 + * + * @param moveMsg 移库信息回传 + * @return 结果 + */ + @Override + public int updateMoveMsg(MoveMsg moveMsg) + { + return moveMsgMapper.updateMoveMsg(moveMsg); + } + + /** + * 批量删除移库信息回传 + * + * @param ids 需要删除的移库信息回传主键 + * @return 结果 + */ + @Override + public int deleteMoveMsgByIds(String[] ids) + { + return moveMsgMapper.deleteMoveMsgByIds(ids); + } + + /** + * 删除移库信息回传信息 + * + * @param id 移库信息回传主键 + * @return 结果 + */ + @Override + public int deleteMoveMsgById(String id) + { + return moveMsgMapper.deleteMoveMsgById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java b/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java index f140fc6..95cc06e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java @@ -1,6 +1,7 @@ package com.ruoyi.api.service; import com.ruoyi.api.domain.DeliveryNoticeVo; +import com.ruoyi.api.moveMsg.domain.MoveMsg; import com.ruoyi.bas.BasProduct.domain.BasProduct; import com.ruoyi.common.core.domain.AjaxResult; @@ -16,5 +17,7 @@ public interface IToErpService { void callbackoutDeliveryNotice(); + void moveCargoSpace(); + AjaxResult createWorkshopInboundOrder(BasProduct basProduct); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java index 0841b34..6787e6e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java @@ -3,6 +3,8 @@ package com.ruoyi.api.service.impl; import cn.hutool.core.date.DateUtil; import cn.hutool.json.JSONUtil; import com.ruoyi.api.domain.*; +import com.ruoyi.api.moveMsg.domain.MoveMsg; +import com.ruoyi.api.moveMsg.service.IMoveMsgService; import com.ruoyi.api.service.IToErpService; import com.ruoyi.bas.BasProduct.domain.BasProduct; import com.ruoyi.bas.basJobId.service.IBasJobIdService; @@ -27,10 +29,17 @@ import com.ruoyi.log.domain.RequestLog; import com.ruoyi.log.service.IRequestLogService; import com.ruoyi.out.outStockout.domain.OutStockout; import com.ruoyi.out.outStockout.service.IOutStockoutService; +import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack; +import com.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper; +import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService; import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail; import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService; import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper; import com.ruoyi.out.outStockout.mapper.OutStockoutMapper; +import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack; +import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService; +import com.ruoyi.stock.stock.domain.BasStock; +import com.ruoyi.stock.stock.service.IBasStockService; import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences; import org.springframework.beans.BeanUtils; @@ -38,10 +47,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.math.BigDecimal; +import java.util.Map; +import java.util.stream.Collectors; /** * 作业统计 Service 实现 @@ -57,7 +69,7 @@ public class ToErpServiceImpl implements IToErpService { private IMydoJobDetailService mydoJobDetailService; @Autowired - private IBasJobIdService basJobIdService; + private IBasJobIdService basJobIdService; @Autowired private IRequestLogService requestLogService; @@ -79,13 +91,24 @@ public class ToErpServiceImpl implements IToErpService { private IInStockinBackService inStockinBackService; @Autowired private IInStockinDetailBackService inStockinDetailBackService; + @Autowired + private IMoveMsgService moveMsgService; + + @Autowired + private IBasStockService basStockService; + @Autowired + private IOutStockoutBackService outStockoutBackService; + + @Autowired + private IOutStockoutDetailBackService outStockoutDetailBackService; private static final String TO_ERP_URL = "http://192.168.1.100:8080/api/"; //todo 需要调试 - private static final String WORKSHOP_INBOUND_ORDER_URL = TO_ERP_URL+"TRANSACTION_DOC"; + private static final String WORKSHOP_INBOUND_ORDER_URL = TO_ERP_URL + "TRANSACTION_DOC"; //todo 需要调试 - private static final String OTHER_IN_OUTBOUND_ORDER_URL = TO_ERP_URL+"WIP_TRANSFER_DOC"; + private static final String OTHER_IN_OUTBOUND_ORDER_URL = TO_ERP_URL + "WIP_TRANSFER_DOC"; + /** * 处理送货通知单的业务逻辑 * 根据单据类型和操作类型进行入库单或出库单的增删改操作 @@ -97,14 +120,17 @@ public class ToErpServiceImpl implements IToErpService { @Transactional(rollbackFor = Exception.class) public AjaxResult receiveDeliveryNotice(DeliveryNoticeVo deliveryNoticeVo) { - if (deliveryNoticeVo == null || deliveryNoticeVo.getDetailList() == null || deliveryNoticeVo.getDetailList().isEmpty()){ + if (deliveryNoticeVo == null || deliveryNoticeVo.getDetailList() == null || deliveryNoticeVo.getDetailList().isEmpty()) { return AjaxResult.error("单据或明细不能为空"); } String billType = deliveryNoticeVo.getBillType(); String opType = deliveryNoticeVo.getOpType(); // String status = deliveryNoticeVo.getStatus(); int type = 0; - try { type = Integer.parseInt(billType); } catch (Exception ignored) {} + try { + type = Integer.parseInt(billType); + } catch (Exception ignored) { + } // 处理入库单相关操作(单据类型1-4) if (type >= 1 && type <= 4) { @@ -134,7 +160,7 @@ public class ToErpServiceImpl implements IToErpService { if ("2".equals(opType) && exist == null) { return AjaxResult.error("单据不存在,无法修改"); } - if("1".equals(opType) && exist != null){ + if ("1".equals(opType) && exist != null) { return AjaxResult.error("单据已存在,请勿重复添加"); } if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) { @@ -172,7 +198,7 @@ public class ToErpServiceImpl implements IToErpService { for (DeliveryNoticeItemVo item : items) { InStockinDetail detail = new InStockinDetail(); detail.setStockinGuid(inStockin.getStockinGuid()); - detail.setStockinDetailId(inStockin.getStockinId()+"-"+item.getLineNo()); + detail.setStockinDetailId(item.getLineNo()); detail.setStockinId(inStockin.getStockinId()); detail.setProductId(item.getInventoryCode()); detail.setProductName(item.getInventoryName()); @@ -225,10 +251,10 @@ public class ToErpServiceImpl implements IToErpService { if ("2".equals(opType) && exist == null) { return AjaxResult.error("单据不存在,无法修改"); } - if ("1".equals(opType) && exist != null){ + if ("1".equals(opType) && exist != null) { return AjaxResult.error("单据已存在,请勿重复添加"); } - if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType) ) { + if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) { return AjaxResult.error("单据已执行,禁止修改"); } OutStockout out = exist != null ? exist : new OutStockout(); @@ -243,6 +269,8 @@ public class ToErpServiceImpl implements IToErpService { out.setStatus("1"); out.setWarehouseId(deliveryNoticeVo.getWarehouseId()); out.setStockoutSource("1"); + out.setSpare6(deliveryNoticeVo.getOutType()); + out.setCarNumber(deliveryNoticeVo.getIsProjectOut()); out.setDepartmentNo(deliveryNoticeVo.getProjectNo()); out.setCustomerNo(deliveryNoticeVo.getCustomerId()); out.setClassNowId(deliveryNoticeVo.getCustomerName()); @@ -268,20 +296,22 @@ public class ToErpServiceImpl implements IToErpService { for (DeliveryNoticeItemVo item : deliveryNoticeVo.getDetailList()) { OutStockoutDetail d = new OutStockoutDetail(); - d.setStockoutDetailId(out.getStockoutId()+"-"+item.getLineNo()); + d.setStockoutDetailId(item.getLineNo()); d.setStockoutGuid(out.getStockoutGuid()); d.setStockoutId(out.getStockoutId()); d.setProductId(item.getInventoryCode()); - d.setProductId(item.getInventoryCode()); + d.setProductName(item.getInventoryName()); d.setLotNo(item.getLotNo()); d.setSpec(item.getSpecModel()); d.setUnit(item.getUnit()); d.setSpare1(item.getLevelRelation()); d.setSpare2(item.getUpperMaterial()); d.setSpare3(item.getTopMaterial()); - d.setSpare6(item.getLineNo()); + d.setSpare4(deliveryNoticeVo.getProjectNo()); +// d.setSpare6(item.getLineNo()); d.setRemark(item.getRemark()); + try { d.setQuantity(new BigDecimal(item.getQuantity())); d.setAllotQuantity(BigDecimal.ZERO); @@ -304,30 +334,35 @@ public class ToErpServiceImpl implements IToErpService { public void callbackInDeliveryNotice() { InStockinBack inStockin = inStockinBackService.selectTopInStockin(); + if (inStockin == null) { + return; + } DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo(); deliveryNoticeVo.setBillNo(inStockin.getStockinId()); deliveryNoticeVo.setNoteBillNo(inStockin.getStockinId()); deliveryNoticeVo.setBillType(inStockin.getInType()); + deliveryNoticeVo.setOpType("1"); deliveryNoticeVo.setBillDate(inStockin.getCreateDate()); - deliveryNoticeVo.setCreateMan(inStockin.getCreateManId()); +// deliveryNoticeVo.setCreateMan(inStockin.getCreateManId()); deliveryNoticeVo.setWarehouseId(inStockin.getWarehouseId()); deliveryNoticeVo.setProjectNo(inStockin.getDepartmentNo()); deliveryNoticeVo.setCustomerId(inStockin.getSupplierNo()); deliveryNoticeVo.setCustomerName(inStockin.getClassNo()); // 对应receiveDeliveryNotice中的映射 deliveryNoticeVo.setContractNo(inStockin.getSpare1()); - deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2()); - deliveryNoticeVo.setApproveDate(inStockin.getSpare3()); - deliveryNoticeVo.setApproveMan(inStockin.getSpare4()); - deliveryNoticeVo.setRemark(inStockin.getSpare5()); +// deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2()); +// deliveryNoticeVo.setApproveDate(inStockin.getSpare3()); +// deliveryNoticeVo.setApproveMan(inStockin.getSpare4()); +// deliveryNoticeVo.setRemark(inStockin.getSpare5()); InStockinDetailBack inStockinDetailParam = new InStockinDetailBack(); inStockinDetailParam.setStockinId(inStockin.getStockinId()); List inStockinDetails = inStockinDetailBackService.selectInStockinDetailBackList(inStockinDetailParam); - + List detailList = new ArrayList<>(); if (inStockinDetails != null && !inStockinDetails.isEmpty()) { for (InStockinDetailBack detail : inStockinDetails) { DeliveryNoticeItemVo item = new DeliveryNoticeItemVo(); + item.setLineNo(detail.getStockinDetailId()); item.setNotelineNo(detail.getStockinDetailId()); item.setBillNo(detail.getStockinId()); @@ -341,24 +376,229 @@ public class ToErpServiceImpl implements IToErpService { item.setUpperMaterial(detail.getSpare2()); item.setTopMaterial(detail.getSpare3()); item.setRemark(detail.getRemark()); - item.setArea(detail.getSpare9()); - item.setLocation(detail.getSpare8()); + String[] splitArea = detail.getSpare9().split(","); + String[] splitLocation = detail.getSpare8().split(","); + String[] splitQuantity = detail.getQuantityX().split(","); + ArrayList locationDetails = new ArrayList<>(); + for(int i=0;i outStockoutDetailBacks = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack); + List detailList = new ArrayList<>(); + if(outStockoutDetailBacks != null && !outStockoutDetailBacks.isEmpty()) { + for (OutStockoutDetailBack detail : outStockoutDetailBacks) { + DeliveryNoticeItemVo item = new DeliveryNoticeItemVo(); + item.setLineNo(detail.getStockoutDetailId()); + item.setNotelineNo(detail.getStockoutDetailId()); + item.setInventoryCode(detail.getProductId()); + item.setInventoryName(detail.getProductName()); + item.setSpecModel(detail.getSpec()); + item.setUnit(detail.getUnit()); + item.setQuantity(detail.getQuantity().toString()); + item.setLevelRelation(detail.getSpare1()); + item.setUpperMaterial(detail.getSpare2()); + item.setTopMaterial(detail.getSpare3()); + item.setLotNo(detail.getLotNo()); + item.setRemark(detail.getRemark()); +// item.setArea(detail.getSpare9()); +// item.setLocation(detail.getSpare8()); + String[] splitArea = detail.getSpare9().split(","); + String[] splitLocation = detail.getSpare8().split(","); + String[] splitQuantity = detail.getQuantityX().split(","); + ArrayList locationDetails = new ArrayList<>(); + for(int i=0;i moveMsgs = moveMsgService.selectMoveMsgList(moveMsg1); + MoveMsg moveMsg = new MoveMsg(); + if (moveMsgs.size() > 0) { + moveMsg = moveMsgs.get(0); + } else { + return; + } + + try { + BasStock basStock = new BasStock(); + basStock.setTrayCode(moveMsg.getTrayCode()); + List basStocks = basStockService.selectBasStockList(basStock); + //将basStocks按照stockinId分组 + Map> basStocksMap = basStocks.stream().collect(Collectors.groupingBy(BasStock::getStockinId)); + for (Map.Entry> entry : basStocksMap.entrySet()) { + // 获取 stockinId(键) + String stockinId = entry.getKey(); + + // 获取对应的 basStock 列表(值) + List basStockList = entry.getValue(); + DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo(); + deliveryNoticeVo.setBillNo(basStockList.get(0).getStockinId()); + deliveryNoticeVo.setNoteBillNo(basStockList.get(0).getStockinId()); + deliveryNoticeVo.setBillDate(basStockList.get(0).getSpare8()); + deliveryNoticeVo.setWarehouseId(basStockList.get(0).getWarehouseId()); + deliveryNoticeVo.setProjectNo(basStockList.get(0).getSpare4()); + deliveryNoticeVo.setBillType("9"); + ArrayList deliveryNoticeItemVos = new ArrayList<>(); + for (BasStock basStock1 : basStockList) { + DeliveryNoticeItemVo item = new DeliveryNoticeItemVo(); + item.setLineNo(basStock1.getStockinDetailId()); + item.setNotelineNo(basStock1.getStockinDetailId()); + item.setInventoryCode(basStock1.getProductId()); + item.setInventoryName(basStock1.getProductName()); + item.setSpecModel(basStock1.getPower()); + item.setUnit(basStock1.getPhase()); + item.setQuantity(basStock1.getQuantity()); + item.setLevelRelation(basStock1.getSpare1()); + item.setUpperMaterial(basStock1.getSpare2()); + item.setTopMaterial(basStock1.getSpare3()); + item.setLotNo(basStock1.getLotNo()); + item.setAreaBefore(moveMsg.getOldSpace()); + item.setLocationBefore(moveMsg.getTrayCode()); + item.setArea(moveMsg.getNewSpace()); + item.setLocation(moveMsg.getTrayCode()); + deliveryNoticeItemVos.add(item); + } + deliveryNoticeVo.setDetailList(deliveryNoticeItemVos); + + + //code success msg + RequestLog requestLog = requestLogService.getRequestLog("http://192.168.188.235/app1/api?type=1&key=2", JSONUtil.toJsonStr(deliveryNoticeVo), "移库回传", "wms", "erp"); + moveMsg.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + if ("1".equals(requestLog.getIsSuccessful())) { + moveMsg.setStatus("1"); + moveMsg.setMsg("成功"); + } else { + moveMsg.setStatus("2"); + moveMsg.setMsg(requestLog.getErrorDetails()); + } + + moveMsgService.updateMoveMsg(moveMsg); + } + } catch (Exception e) { + moveMsg.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + moveMsg.setStatus("2"); + moveMsg.setMsg(e.getMessage()); + moveMsgService.updateMoveMsg(moveMsg); + } } + @Override public AjaxResult createWorkshopInboundOrder(BasProduct basProduct) { ErpInterfaceParam param = new ErpInterfaceParam<>(); @@ -382,15 +622,15 @@ public class ToErpServiceImpl implements IToErpService { objectErpParameter.setDatas(List.of(wipTransferDoc)); erpStdData.setParameter(objectErpParameter); param.setStd_data(erpStdData); - RequestLog requestLog = requestLogService.getRequestLog(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp"); + RequestLog requestLog = requestLogService.getRequestLog(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单", "wms", "erp"); // String post = requestLog.getResponseBody(); // ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class); // if ("0".equals(bean.getStd_data().getExecution().getCode())) { // return AjaxResult.success(); // } - if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){ + if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) { return AjaxResult.success(); - }else{ + } else { return AjaxResult.error(); } } @@ -404,10 +644,10 @@ public class ToErpServiceImpl implements IToErpService { ErpInOutBoundOrder erpInOutBoundOrder = new ErpInOutBoundOrder(); String docNo = ""; String docIdDocCode = ""; - if ("1".equals(transferBillCallback.getType())){ + if ("1".equals(transferBillCallback.getType())) { docNo = basJobIdService.getJobId("11T1"); docIdDocCode = "11T1"; - }else { + } else { docNo = basJobIdService.getJobId("11T2"); docIdDocCode = "11T2"; } @@ -428,7 +668,7 @@ public class ToErpServiceImpl implements IToErpService { for (int i = 0; i < mydoJobDetails.size(); i++) { MydoJobDetail mydoJobDetail = mydoJobDetails.get(i); ErpTransactionDocD erpTransactionDocD = new ErpTransactionDocD(); - erpTransactionDocD.setSequenceNumber(i+1); + erpTransactionDocD.setSequenceNumber(i + 1); erpTransactionDocD.setITEM_ID_ITEM_CODE(mydoJobDetail.getProductId()); erpTransactionDocD.setITEM_DESCRIPTION(mydoJobDetail.getProductName()); erpTransactionDocD.setITEM_SPECIFICATION(mydoJobDetail.getSpec()); @@ -444,11 +684,11 @@ public class ToErpServiceImpl implements IToErpService { objectErpParameter.setDatas(list); erpStdData.setParameter(objectErpParameter); param.setStd_data(erpStdData); - RequestLog requestLog = requestLogService.getRequestLog( OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单","wms","erp"); + RequestLog requestLog = requestLogService.getRequestLog(OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单", "wms", "erp"); - if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){ + if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) { return AjaxResult.success(); - }else{ + } else { return AjaxResult.error(); } // String post = requestLog.getResponseBody(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/controller/BasTraycodeController.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/controller/BasTraycodeController.java index 2860e5f..78f9860 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/controller/BasTraycodeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/controller/BasTraycodeController.java @@ -71,6 +71,7 @@ public class BasTraycodeController extends BaseController @PostMapping public AjaxResult add(@RequestBody BasTraycode basTraycode) { + return toAjax(basTraycodeService.insertBasTraycode(basTraycode)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/domain/BasTraycode.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/domain/BasTraycode.java index de122ce..7844fbd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/domain/BasTraycode.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/domain/BasTraycode.java @@ -16,16 +16,16 @@ public class BasTraycode extends BaseEntity private static final long serialVersionUID = 1L; /** id */ - @Excel(name = "${bas.Traycode.id}") +// @Excel(name = "${bas.Traycode.id}") private Long id; /** 条码类型id */ - @Excel(name = "${bas.Traycode.formatId}") +// @Excel(name = "${bas.Traycode.formatId}") private Long formatId; private String formatName; /** 条码 */ - @Excel(name = "${bas.Traycode.trayCode}") + @Excel(name = "条码") private String trayCode; /** 备用字段1 */ @@ -33,7 +33,7 @@ public class BasTraycode extends BaseEntity private String spare1; /** 备用字段2 */ -// @Excel(name = "${bas.Traycode.spare2}") + @Excel(name = "是否可用",dictType = "sys_yes_no") private String spare2; /** 备用字段3 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/mapper/BasTraycodeMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/mapper/BasTraycodeMapper.java index cb76145..68e80a6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/mapper/BasTraycodeMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/mapper/BasTraycodeMapper.java @@ -61,4 +61,6 @@ public interface BasTraycodeMapper public int deleteBasTraycodeByIds(Long[] ids); void insertBasTraycodeList(List list); + + Integer selectBasTrayCodeMax(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/IBasTraycodeService.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/IBasTraycodeService.java index 28793c1..eeae6eb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/IBasTraycodeService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/IBasTraycodeService.java @@ -61,4 +61,6 @@ public interface IBasTraycodeService public int deleteBasTraycodeById(Long id); void insertBasTraycodeList(List traycodeList); + + Integer selectBasTrayCodeMax(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/impl/BasTraycodeServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/impl/BasTraycodeServiceImpl.java index f737b01..69ad881 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/impl/BasTraycodeServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycode/service/impl/BasTraycodeServiceImpl.java @@ -1,9 +1,12 @@ package com.ruoyi.bas.traycode.service.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.convert.Convert; import com.ruoyi.bas.traycode.domain.BasTraycode; import com.ruoyi.bas.traycode.mapper.BasTraycodeMapper; import com.ruoyi.bas.traycode.service.IBasTraycodeService; +import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat; +import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,6 +24,8 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService { @Autowired private BasTraycodeMapper basTraycodeMapper; + @Autowired + private IBasTraycodeFormatService basTraycodeFormatService; /** * 查询条码信息 @@ -55,8 +60,33 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService @Override public int insertBasTraycode(BasTraycode basTraycode) { - basTraycode.setCreateTime(DateUtils.getNowDate()); - return basTraycodeMapper.insertBasTraycode(basTraycode); + try { + BasTraycodeFormat basTraycodeFormat = basTraycodeFormatService.selectBasTraycodeFormatById(basTraycode.getFormatId()); + + + int i1 = Integer.parseInt(basTraycode.getSpare1()); + //如果i<4位数,前面补0 + String code = ""; + for (int j = 0; j < i1; j++) { + code = String.format("%07d",Convert.toInt( basTraycodeFormat.getSerialRule()) + 1 + j); + if(basTraycodeFormat.getMaxNum() < Convert.toLong( code)){ + throw new RuntimeException("已生成最大值"); + } + String finalCode = basTraycodeFormat.getBarcodeFormat()+code; + basTraycode.setTrayCode(finalCode); + basTraycode.setSpare1(null); + basTraycode.setCreateTime(DateUtils.getNowDate()); + basTraycode.setSpare2("Y"); + basTraycodeMapper.insertBasTraycode(basTraycode); + + + } + basTraycodeFormat.setSerialRule(Convert.toLong( code).toString()); + basTraycodeFormatService.updateBasTraycodeFormat(basTraycodeFormat); + } catch (Exception e) { + throw new RuntimeException(e); + } + return 1; } /** @@ -103,4 +133,9 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService basTraycodeMapper.insertBasTraycodeList(list); } } + + @Override + public Integer selectBasTrayCodeMax() { + return basTraycodeMapper.selectBasTrayCodeMax(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycodeformat/service/impl/BasTraycodeFormatServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycodeformat/service/impl/BasTraycodeFormatServiceImpl.java index f9d9031..7b4f3a0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/bas/traycodeformat/service/impl/BasTraycodeFormatServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/traycodeformat/service/impl/BasTraycodeFormatServiceImpl.java @@ -1,17 +1,13 @@ package com.ruoyi.bas.traycodeformat.service.impl; -import cn.hutool.core.util.StrUtil; -import com.ruoyi.bas.traycode.domain.BasTraycode; import com.ruoyi.bas.traycode.service.IBasTraycodeService; import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat; import com.ruoyi.bas.traycodeformat.mapper.BasTraycodeFormatMapper; import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService; -import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; import java.util.List; /** @@ -79,20 +75,7 @@ public class BasTraycodeFormatServiceImpl implements IBasTraycodeFormatService public int updateBasTraycodeFormat(BasTraycodeFormat basTraycodeFormat) { BasTraycodeFormat old = selectBasTraycodeFormatById(basTraycodeFormat.getId()); - int oldSerialRule = Convert.toInt(old.getSerialRule()); - int newSerialRule = Convert.toInt(basTraycodeFormat.getSerialRule()); - - List traycodeList = new ArrayList<>(); - for (int i = oldSerialRule; i < newSerialRule; i++) { - BasTraycode basTraycode = new BasTraycode(); - basTraycode.setFormatId(basTraycodeFormat.getId()); - String traycode = old.getBarcodeFormat()+ StrUtil.padPre(Convert.toStr(i),5,'0'); - basTraycode.setTrayCode(traycode); - traycodeList.add(basTraycode); - } basTraycodeFormat.setUpdateTime(DateUtils.getNowDate()); - //插入条码信息 - basTraycodeService.insertBasTraycodeList(traycodeList); return basTraycodeFormatMapper.updateBasTraycodeFormat(basTraycodeFormat); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java index ad28711..7277d7f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java @@ -102,7 +102,7 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService } @Override - @DataScope(warehouseAlias = "is2") +// @DataScope(warehouseAlias = "is2") public List selectInStockinFinishListByInStockin(InStockin inStockin) { return inStockinFinishMapper.selectInStockinFinishListByInStockin(inStockin); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/job/mydojob/service/impl/MydoJobServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/job/mydojob/service/impl/MydoJobServiceImpl.java index f801eb1..db0c852 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/job/mydojob/service/impl/MydoJobServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/job/mydojob/service/impl/MydoJobServiceImpl.java @@ -192,7 +192,7 @@ public class MydoJobServiceImpl implements IMydoJobService { List mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param); for (MydoJobDetail mydoJobDetail : mydoJobDetails) { - String inOrOutDId = mydoJobDetail.getInOrOutDId(); + String inOrOutDId = mydoJobDetail.getStockinDetailId(); InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId); BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum()); BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java index 8403648..0666ad6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java @@ -91,6 +91,9 @@ public class OutStockout extends BaseEntity private String spare4; private String spare5; + private String spare6; + private String spare7; + private String spare8; private String customerName; @@ -102,6 +105,30 @@ public class OutStockout extends BaseEntity private List typeData; + public String getSpare6() { + return spare6; + } + + public void setSpare6(String spare6) { + this.spare6 = spare6; + } + + public String getSpare7() { + return spare7; + } + + public void setSpare7(String spare7) { + this.spare7 = spare7; + } + + public String getSpare8() { + return spare8; + } + + public void setSpare8(String spare8) { + this.spare8 = spare8; + } + public List getTypeData() { return typeData; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/controller/OutStockoutBackController.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/controller/OutStockoutBackController.java new file mode 100644 index 0000000..365d554 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/controller/OutStockoutBackController.java @@ -0,0 +1,104 @@ +package com.ruoyi.out.outStockoutBack.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.out.outStockoutBack.domain.OutStockoutBack; +import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 出库单据主信息Controller + * + * @author ruoyi + * @date 2026-02-02 + */ +@RestController +@RequestMapping("/out/outStockoutBack") +public class OutStockoutBackController extends BaseController +{ + @Autowired + private IOutStockoutBackService outStockoutBackService; + + /** + * 查询出库单据主信息列表 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:list')") + @GetMapping("/list") + public TableDataInfo list(OutStockoutBack outStockoutBack) + { + startPage(); + List list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack); + return getDataTable(list); + } + + /** + * 导出出库单据主信息列表 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:export')") + @Log(title = "出库单据主信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, OutStockoutBack outStockoutBack) + { + List list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack); + ExcelUtil util = new ExcelUtil(OutStockoutBack.class); + util.exportExcel(response, list, "出库单据主信息数据"); + } + + /** + * 获取出库单据主信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:query')") + @GetMapping(value = "/{stockoutGuid}") + public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid) + { + return success(outStockoutBackService.selectOutStockoutBackByStockoutGuid(stockoutGuid)); + } + + /** + * 新增出库单据主信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:add')") + @Log(title = "出库单据主信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody OutStockoutBack outStockoutBack) + { + return toAjax(outStockoutBackService.insertOutStockoutBack(outStockoutBack)); + } + + /** + * 修改出库单据主信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:edit')") + @Log(title = "出库单据主信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody OutStockoutBack outStockoutBack) + { + return toAjax(outStockoutBackService.updateOutStockoutBack(outStockoutBack)); + } + + /** + * 删除出库单据主信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutBack:remove')") + @Log(title = "出库单据主信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{stockoutGuids}") + public AjaxResult remove(@PathVariable String[] stockoutGuids) + { + return toAjax(outStockoutBackService.deleteOutStockoutBackByStockoutGuids(stockoutGuids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/domain/OutStockoutBack.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/domain/OutStockoutBack.java new file mode 100644 index 0000000..43c7764 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/domain/OutStockoutBack.java @@ -0,0 +1,443 @@ +package com.ruoyi.out.outStockoutBack.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; + +/** + * 出库单据主信息对象 out_stockout_back + * + * @author ruoyi + * @date 2026-02-02 + */ +public class OutStockoutBack extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 546 guid */ + @Excel(name = "546 guid") + private String stockoutGuid; + + /** 546 单据编码 */ + @Excel(name = "546 单据编码") + private String stockoutId; + + /** 546 出库类型 */ + @Excel(name = "546 出库类型") + private String outType; + + /** 546 单据时间 */ + @Excel(name = "546 单据时间") + private String createDate; + + /** 项目号546 */ + @Excel(name = "项目号546") + private String departmentNo; + + /** 客户编码546 */ + @Excel(name = "客户编码546") + private String customerNo; + + /** 制单人546 */ + @Excel(name = "制单人546") + private String createManId; + + /** 546 单据状态 */ + @Excel(name = "546 单据状态") + private String status; + + /** 单据来源0自建单1接口 */ + @Excel(name = "单据来源0自建单1接口") + private String stockoutSource; + + /** 仓库ID546 */ + @Excel(name = "仓库ID546") + private String warehouseId; + + /** 客户名称546 */ + @Excel(name = "客户名称546") + private String classNowId; + + /** 出口 */ + @Excel(name = "出口") + private String exitId; + + /** 出库方式546 */ + @Excel(name = "出库方式546") + private String carNumber; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String FID; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String erpStockoutId; + + /** 546 */ + @Excel(name = "546") + private String startDate; + + /** 546 */ + @Excel(name = "546") + private String finishDate; + + /** 合同号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; + + /** 备注546 */ + @Excel(name = "备注546") + private String spare5; + + /** 配送方式546 1人工2agv */ + @Excel(name = "配送方式546 1人工2agv") + private String spare6; + + /** 出库配送终点546 */ + @Excel(name = "出库配送终点546") + private String spare7; + + /** 1缓存2线边546 */ + @Excel(name = "1缓存2线边546") + private String spare8; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sendStatus; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sendTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String msg; + + public void setStockoutGuid(String stockoutGuid) + { + this.stockoutGuid = stockoutGuid; + } + + public String getStockoutGuid() + { + return stockoutGuid; + } + + public void setStockoutId(String stockoutId) + { + this.stockoutId = stockoutId; + } + + public String getStockoutId() + { + return stockoutId; + } + + public void setOutType(String outType) + { + this.outType = outType; + } + + public String getOutType() + { + return outType; + } + + public void setCreateDate(String createDate) + { + this.createDate = createDate; + } + + public String getCreateDate() + { + return createDate; + } + + 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 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 setStockoutSource(String stockoutSource) + { + this.stockoutSource = stockoutSource; + } + + public String getStockoutSource() + { + return stockoutSource; + } + + public void setWarehouseId(String warehouseId) + { + this.warehouseId = warehouseId; + } + + public String getWarehouseId() + { + return warehouseId; + } + + public void setClassNowId(String classNowId) + { + this.classNowId = classNowId; + } + + public String getClassNowId() + { + return classNowId; + } + + public void setExitId(String exitId) + { + this.exitId = exitId; + } + + public String getExitId() + { + return exitId; + } + + public void setCarNumber(String carNumber) + { + this.carNumber = carNumber; + } + + public String getCarNumber() + { + return carNumber; + } + + public void setFID(String FID) + { + this.FID = FID; + } + + public String getFID() + { + return FID; + } + + public void setErpStockoutId(String erpStockoutId) + { + this.erpStockoutId = erpStockoutId; + } + + public String getErpStockoutId() + { + return erpStockoutId; + } + + public void setStartDate(String startDate) + { + this.startDate = startDate; + } + + public String getStartDate() + { + return startDate; + } + + public void setFinishDate(String finishDate) + { + this.finishDate = finishDate; + } + + public String getFinishDate() + { + return finishDate; + } + + 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 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 setSendStatus(String sendStatus) + { + this.sendStatus = sendStatus; + } + + public String getSendStatus() + { + return sendStatus; + } + + public void setSendTime(String sendTime) + { + this.sendTime = sendTime; + } + + public String getSendTime() + { + return sendTime; + } + + public void setMsg(String msg) + { + this.msg = msg; + } + + public String getMsg() + { + return msg; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("stockoutGuid", getStockoutGuid()) + .append("stockoutId", getStockoutId()) + .append("outType", getOutType()) + .append("createDate", getCreateDate()) + .append("departmentNo", getDepartmentNo()) + .append("customerNo", getCustomerNo()) + .append("createManId", getCreateManId()) + .append("status", getStatus()) + .append("stockoutSource", getStockoutSource()) + .append("warehouseId", getWarehouseId()) + .append("classNowId", getClassNowId()) + .append("exitId", getExitId()) + .append("carNumber", getCarNumber()) + .append("FID", getFID()) + .append("erpStockoutId", getErpStockoutId()) + .append("startDate", getStartDate()) + .append("finishDate", getFinishDate()) + .append("spare1", getSpare1()) + .append("spare2", getSpare2()) + .append("spare3", getSpare3()) + .append("spare4", getSpare4()) + .append("spare5", getSpare5()) + .append("spare6", getSpare6()) + .append("spare7", getSpare7()) + .append("spare8", getSpare8()) + .append("sendStatus", getSendStatus()) + .append("sendTime", getSendTime()) + .append("msg", getMsg()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/mapper/OutStockoutBackMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/mapper/OutStockoutBackMapper.java new file mode 100644 index 0000000..23e6665 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/mapper/OutStockoutBackMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.out.outStockoutBack.mapper; + +import java.util.List; +import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack; + +/** + * 出库单据主信息Mapper接口 + * + * @author ruoyi + * @date 2026-02-02 + */ +public interface OutStockoutBackMapper +{ + /** + * 查询出库单据主信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 出库单据主信息 + */ + public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid); + + + public OutStockoutBack selelctTopOutStockout(); + + /** + * 查询出库单据主信息列表 + * + * @param outStockoutBack 出库单据主信息 + * @return 出库单据主信息集合 + */ + public List selectOutStockoutBackList(OutStockoutBack outStockoutBack); + + /** + * 新增出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + public int insertOutStockoutBack(OutStockoutBack outStockoutBack); + + /** + * 修改出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + public int updateOutStockoutBack(OutStockoutBack outStockoutBack); + + /** + * 删除出库单据主信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 结果 + */ + public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid); + + /** + * 批量删除出库单据主信息 + * + * @param stockoutGuids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/IOutStockoutBackService.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/IOutStockoutBackService.java new file mode 100644 index 0000000..b45d9f5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/IOutStockoutBackService.java @@ -0,0 +1,70 @@ +package com.ruoyi.out.outStockoutBack.service; + +import java.util.List; +import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack; + +/** + * 出库单据主信息Service接口 + * + * @author ruoyi + * @date 2026-02-02 + */ +public interface IOutStockoutBackService +{ + /** + * 查询出库单据主信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 出库单据主信息 + */ + public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid); + + + + + public OutStockoutBack selelctTopOutStockout(); + + + + /** + * 查询出库单据主信息列表 + * + * @param outStockoutBack 出库单据主信息 + * @return 出库单据主信息集合 + */ + public List selectOutStockoutBackList(OutStockoutBack outStockoutBack); + + /** + * 新增出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + public int insertOutStockoutBack(OutStockoutBack outStockoutBack); + + /** + * 修改出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + public int updateOutStockoutBack(OutStockoutBack outStockoutBack); + + /** + * 批量删除出库单据主信息 + * + * @param stockoutGuids 需要删除的出库单据主信息主键集合 + * @return 结果 + */ + public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids); + + /** + * 删除出库单据主信息信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 结果 + */ + public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid); + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/impl/OutStockoutBackServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/impl/OutStockoutBackServiceImpl.java new file mode 100644 index 0000000..270369b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutBack/service/impl/OutStockoutBackServiceImpl.java @@ -0,0 +1,98 @@ +package com.ruoyi.out.outStockoutBack.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper; +import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack; +import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService; + +/** + * 出库单据主信息Service业务层处理 + * + * @author ruoyi + * @date 2026-02-02 + */ +@Service +public class OutStockoutBackServiceImpl implements IOutStockoutBackService +{ + @Autowired + private OutStockoutBackMapper outStockoutBackMapper; + + /** + * 查询出库单据主信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 出库单据主信息 + */ + @Override + public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid) + { + return outStockoutBackMapper.selectOutStockoutBackByStockoutGuid(stockoutGuid); + } + + @Override + public OutStockoutBack selelctTopOutStockout() { + return outStockoutBackMapper.selelctTopOutStockout(); + } + + /** + * 查询出库单据主信息列表 + * + * @param outStockoutBack 出库单据主信息 + * @return 出库单据主信息 + */ + @Override + public List selectOutStockoutBackList(OutStockoutBack outStockoutBack) + { + return outStockoutBackMapper.selectOutStockoutBackList(outStockoutBack); + } + + /** + * 新增出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + @Override + public int insertOutStockoutBack(OutStockoutBack outStockoutBack) + { + return outStockoutBackMapper.insertOutStockoutBack(outStockoutBack); + } + + /** + * 修改出库单据主信息 + * + * @param outStockoutBack 出库单据主信息 + * @return 结果 + */ + @Override + public int updateOutStockoutBack(OutStockoutBack outStockoutBack) + { + return outStockoutBackMapper.updateOutStockoutBack(outStockoutBack); + } + + /** + * 批量删除出库单据主信息 + * + * @param stockoutGuids 需要删除的出库单据主信息主键 + * @return 结果 + */ + @Override + public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids) + { + return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuids(stockoutGuids); + } + + /** + * 删除出库单据主信息信息 + * + * @param stockoutGuid 出库单据主信息主键 + * @return 结果 + */ + @Override + public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid) + { + return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuid(stockoutGuid); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/controller/OutStockoutDetailBackController.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/controller/OutStockoutDetailBackController.java new file mode 100644 index 0000000..93b9bc9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/controller/OutStockoutDetailBackController.java @@ -0,0 +1,104 @@ +package com.ruoyi.out.outStockoutDetailBack.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.out.outStockoutDetailBack.domain.OutStockoutDetailBack; +import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 历史出库单据子信息Controller + * + * @author ruoyi + * @date 2026-02-02 + */ +@RestController +@RequestMapping("/out/outStockoutDetailBack") +public class OutStockoutDetailBackController extends BaseController +{ + @Autowired + private IOutStockoutDetailBackService outStockoutDetailBackService; + + /** + * 查询历史出库单据子信息列表 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:list')") + @GetMapping("/list") + public TableDataInfo list(OutStockoutDetailBack outStockoutDetailBack) + { + startPage(); + List list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack); + return getDataTable(list); + } + + /** + * 导出历史出库单据子信息列表 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:export')") + @Log(title = "历史出库单据子信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, OutStockoutDetailBack outStockoutDetailBack) + { + List list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack); + ExcelUtil util = new ExcelUtil(OutStockoutDetailBack.class); + util.exportExcel(response, list, "历史出库单据子信息数据"); + } + + /** + * 获取历史出库单据子信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:query')") + @GetMapping(value = "/{stockoutDetailId}") + public AjaxResult getInfo(@PathVariable("stockoutDetailId") String stockoutDetailId) + { + return success(outStockoutDetailBackService.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId)); + } + + /** + * 新增历史出库单据子信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:add')") + @Log(title = "历史出库单据子信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody OutStockoutDetailBack outStockoutDetailBack) + { + return toAjax(outStockoutDetailBackService.insertOutStockoutDetailBack(outStockoutDetailBack)); + } + + /** + * 修改历史出库单据子信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:edit')") + @Log(title = "历史出库单据子信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody OutStockoutDetailBack outStockoutDetailBack) + { + return toAjax(outStockoutDetailBackService.updateOutStockoutDetailBack(outStockoutDetailBack)); + } + + /** + * 删除历史出库单据子信息 + */ + @PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:remove')") + @Log(title = "历史出库单据子信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{stockoutDetailIds}") + public AjaxResult remove(@PathVariable String[] stockoutDetailIds) + { + return toAjax(outStockoutDetailBackService.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/domain/OutStockoutDetailBack.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/domain/OutStockoutDetailBack.java new file mode 100644 index 0000000..5a4d0cd --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/domain/OutStockoutDetailBack.java @@ -0,0 +1,608 @@ +package com.ruoyi.out.outStockoutDetailBack.domain; + +import java.math.BigDecimal; +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; + +/** + * 历史出库单据子信息对象 out_stockout_detail_back + * + * @author ruoyi + * @date 2026-02-02 + */ +public class OutStockoutDetailBack extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String stockoutDetailId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String stockoutGuid; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String stockoutId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String lotNo; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productGuid; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal quantity; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String quantityX; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal quantityJ; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal assignNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal assignNumX; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal assignNumJ; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal allotQuantity; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal allotQuantityX; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal allotQuantityJ; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String price; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String warehouseId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String outId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String bukechaiQuantity; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String kechaiQuantity; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String entryid; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String flatQuantity; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String fid; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String erpStockoutId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String unit; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spec; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productName; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare1; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare2; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare3; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare4; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare5; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare6; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare7; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare8; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String spare9; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sendStatus; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sendTime; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String msg; + + public void setStockoutDetailId(String stockoutDetailId) + { + this.stockoutDetailId = stockoutDetailId; + } + + public String getStockoutDetailId() + { + return stockoutDetailId; + } + + public void setStockoutGuid(String stockoutGuid) + { + this.stockoutGuid = stockoutGuid; + } + + public String getStockoutGuid() + { + return stockoutGuid; + } + + public void setStockoutId(String stockoutId) + { + this.stockoutId = stockoutId; + } + + public String getStockoutId() + { + return stockoutId; + } + + 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(BigDecimal quantity) + { + this.quantity = quantity; + } + + public BigDecimal getQuantity() + { + return quantity; + } + + public String getQuantityX() { + return quantityX; + } + + public void setQuantityX(String quantityX) { + this.quantityX = quantityX; + } + + public void setQuantityJ(BigDecimal quantityJ) + { + this.quantityJ = quantityJ; + } + + public BigDecimal getQuantityJ() + { + return quantityJ; + } + + public void setAssignNum(BigDecimal assignNum) + { + this.assignNum = assignNum; + } + + public BigDecimal getAssignNum() + { + return assignNum; + } + + public void setAssignNumX(BigDecimal assignNumX) + { + this.assignNumX = assignNumX; + } + + public BigDecimal getAssignNumX() + { + return assignNumX; + } + + public void setAssignNumJ(BigDecimal assignNumJ) + { + this.assignNumJ = assignNumJ; + } + + public BigDecimal getAssignNumJ() + { + return assignNumJ; + } + + public void setAllotQuantity(BigDecimal allotQuantity) + { + this.allotQuantity = allotQuantity; + } + + public BigDecimal getAllotQuantity() + { + return allotQuantity; + } + + public void setAllotQuantityX(BigDecimal allotQuantityX) + { + this.allotQuantityX = allotQuantityX; + } + + public BigDecimal getAllotQuantityX() + { + return allotQuantityX; + } + + public void setAllotQuantityJ(BigDecimal allotQuantityJ) + { + this.allotQuantityJ = allotQuantityJ; + } + + public BigDecimal getAllotQuantityJ() + { + return allotQuantityJ; + } + + public void setPrice(String price) + { + this.price = price; + } + + public String getPrice() + { + return price; + } + + public void setWarehouseId(String warehouseId) + { + this.warehouseId = warehouseId; + } + + public String getWarehouseId() + { + return warehouseId; + } + + public void setOutId(String outId) + { + this.outId = outId; + } + + public String getOutId() + { + return outId; + } + + public void setBukechaiQuantity(String bukechaiQuantity) + { + this.bukechaiQuantity = bukechaiQuantity; + } + + public String getBukechaiQuantity() + { + return bukechaiQuantity; + } + + public void setKechaiQuantity(String kechaiQuantity) + { + this.kechaiQuantity = kechaiQuantity; + } + + public String getKechaiQuantity() + { + return kechaiQuantity; + } + + public void setEntryid(String entryid) + { + this.entryid = entryid; + } + + public String getEntryid() + { + return entryid; + } + + public void setFlatQuantity(String flatQuantity) + { + this.flatQuantity = flatQuantity; + } + + public String getFlatQuantity() + { + return flatQuantity; + } + + public void setFid(String fid) + { + this.fid = fid; + } + + public String getFid() + { + return fid; + } + + public void setErpStockoutId(String erpStockoutId) + { + this.erpStockoutId = erpStockoutId; + } + + public String getErpStockoutId() + { + return erpStockoutId; + } + + 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 setProductName(String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return productName; + } + + 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 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 setSendStatus(String sendStatus) + { + this.sendStatus = sendStatus; + } + + public String getSendStatus() + { + return sendStatus; + } + + public void setSendTime(String sendTime) + { + this.sendTime = sendTime; + } + + public String getSendTime() + { + return sendTime; + } + + public void setMsg(String msg) + { + this.msg = msg; + } + + public String getMsg() + { + return msg; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("stockoutDetailId", getStockoutDetailId()) + .append("stockoutGuid", getStockoutGuid()) + .append("stockoutId", getStockoutId()) + .append("lotNo", getLotNo()) + .append("productGuid", getProductGuid()) + .append("productId", getProductId()) + .append("quantity", getQuantity()) + .append("quantityX", getQuantityX()) + .append("quantityJ", getQuantityJ()) + .append("assignNum", getAssignNum()) + .append("assignNumX", getAssignNumX()) + .append("assignNumJ", getAssignNumJ()) + .append("allotQuantity", getAllotQuantity()) + .append("allotQuantityX", getAllotQuantityX()) + .append("allotQuantityJ", getAllotQuantityJ()) + .append("price", getPrice()) + .append("remark", getRemark()) + .append("warehouseId", getWarehouseId()) + .append("outId", getOutId()) + .append("bukechaiQuantity", getBukechaiQuantity()) + .append("kechaiQuantity", getKechaiQuantity()) + .append("entryid", getEntryid()) + .append("flatQuantity", getFlatQuantity()) + .append("fid", getFid()) + .append("erpStockoutId", getErpStockoutId()) + .append("unit", getUnit()) + .append("spec", getSpec()) + .append("productName", getProductName()) + .append("spare1", getSpare1()) + .append("spare2", getSpare2()) + .append("spare3", getSpare3()) + .append("spare4", getSpare4()) + .append("spare5", getSpare5()) + .append("spare6", getSpare6()) + .append("spare7", getSpare7()) + .append("spare8", getSpare8()) + .append("spare9", getSpare9()) + .append("sendStatus", getSendStatus()) + .append("sendTime", getSendTime()) + .append("msg", getMsg()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/mapper/OutStockoutDetailBackMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/mapper/OutStockoutDetailBackMapper.java new file mode 100644 index 0000000..0337617 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/mapper/OutStockoutDetailBackMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.out.outStockoutDetailBack.mapper; + +import java.util.List; +import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack; + +/** + * 历史出库单据子信息Mapper接口 + * + * @author ruoyi + * @date 2026-02-02 + */ +public interface OutStockoutDetailBackMapper +{ + /** + * 查询历史出库单据子信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 历史出库单据子信息 + */ + public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId); + + /** + * 查询历史出库单据子信息列表 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 历史出库单据子信息集合 + */ + public List selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 新增历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 修改历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 删除历史出库单据子信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 结果 + */ + public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId); + + /** + * 批量删除历史出库单据子信息 + * + * @param stockoutDetailIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/IOutStockoutDetailBackService.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/IOutStockoutDetailBackService.java new file mode 100644 index 0000000..c434254 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/IOutStockoutDetailBackService.java @@ -0,0 +1,61 @@ +package com.ruoyi.out.outStockoutDetailBack.service; + +import java.util.List; +import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack; + +/** + * 历史出库单据子信息Service接口 + * + * @author ruoyi + * @date 2026-02-02 + */ +public interface IOutStockoutDetailBackService +{ + /** + * 查询历史出库单据子信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 历史出库单据子信息 + */ + public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId); + + /** + * 查询历史出库单据子信息列表 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 历史出库单据子信息集合 + */ + public List selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 新增历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 修改历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack); + + /** + * 批量删除历史出库单据子信息 + * + * @param stockoutDetailIds 需要删除的历史出库单据子信息主键集合 + * @return 结果 + */ + public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds); + + /** + * 删除历史出库单据子信息信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 结果 + */ + public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/impl/OutStockoutDetailBackServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/impl/OutStockoutDetailBackServiceImpl.java new file mode 100644 index 0000000..ce2237b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetailBack/service/impl/OutStockoutDetailBackServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.out.outStockoutDetailBack.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper; +import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack; +import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService; + +/** + * 历史出库单据子信息Service业务层处理 + * + * @author ruoyi + * @date 2026-02-02 + */ +@Service +public class OutStockoutDetailBackServiceImpl implements IOutStockoutDetailBackService +{ + @Autowired + private OutStockoutDetailBackMapper outStockoutDetailBackMapper; + + /** + * 查询历史出库单据子信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 历史出库单据子信息 + */ + @Override + public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId) + { + return outStockoutDetailBackMapper.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId); + } + + /** + * 查询历史出库单据子信息列表 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 历史出库单据子信息 + */ + @Override + public List selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack) + { + return outStockoutDetailBackMapper.selectOutStockoutDetailBackList(outStockoutDetailBack); + } + + /** + * 新增历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + @Override + public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack) + { + return outStockoutDetailBackMapper.insertOutStockoutDetailBack(outStockoutDetailBack); + } + + /** + * 修改历史出库单据子信息 + * + * @param outStockoutDetailBack 历史出库单据子信息 + * @return 结果 + */ + @Override + public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack) + { + return outStockoutDetailBackMapper.updateOutStockoutDetailBack(outStockoutDetailBack); + } + + /** + * 批量删除历史出库单据子信息 + * + * @param stockoutDetailIds 需要删除的历史出库单据子信息主键 + * @return 结果 + */ + @Override + public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds) + { + return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds); + } + + /** + * 删除历史出库单据子信息信息 + * + * @param stockoutDetailId 历史出库单据子信息主键 + * @return 结果 + */ + @Override + public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId) + { + return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailId(stockoutDetailId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml b/ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml new file mode 100644 index 0000000..8bb111e --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + select id, tray_code, old_space, new_space, status, send_time, msg, spare1, spare2, spare3, spare4, spare5 from move_msg + + + + + + + + insert into move_msg + + id, + tray_code, + old_space, + new_space, + status, + send_time, + msg, + spare1, + spare2, + spare3, + spare4, + spare5, + + + #{id}, + #{trayCode}, + #{oldSpace}, + #{newSpace}, + #{status}, + #{sendTime}, + #{msg}, + #{spare1}, + #{spare2}, + #{spare3}, + #{spare4}, + #{spare5}, + + + + + update move_msg + + tray_code = #{trayCode}, + old_space = #{oldSpace}, + new_space = #{newSpace}, + status = #{status}, + send_time = #{sendTime}, + msg = #{msg}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare3 = #{spare3}, + spare4 = #{spare4}, + spare5 = #{spare5}, + + where id = #{id} + + + + delete from move_msg where id = #{id} + + + + delete from move_msg where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml b/ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml index 36519fa..bc264fb 100644 --- a/ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/in/InStockinBackMapper.xml @@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" class_no = #{classNo}, supplier_no = #{supplierNo}, send_status = #{sendStatus}, - send_time = #{senTime}, + send_time = #{sendTime}, msg = #{msg}, where stockin_guid = #{stockinGuid} @@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/in/InStockinDetailBackMapper.xml b/ruoyi-admin/src/main/resources/mapper/in/InStockinDetailBackMapper.xml index 3d14518..42cdfbf 100644 --- a/ruoyi-admin/src/main/resources/mapper/in/InStockinDetailBackMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/in/InStockinDetailBackMapper.xml @@ -189,7 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update in_stockin_detail_back stockin_guid = #{stockinGuid}, - stockin_id = #{stockinId}, + lot_no = #{lotNo}, product_guid = #{productGuid}, product_id = #{productId}, @@ -222,10 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" spare9 = #{spare9}, product_name = #{productName}, send_status = #{sendStatus}, - send_time = #{senTime}, + send_time = #{sendTime}, msg = #{msg}, - where stockin_detail_id = #{stockinDetailId} + where stockin_id = #{stockinId} diff --git a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutBackMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutBackMapper.xml new file mode 100644 index 0000000..4f8f487 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutBackMapper.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, send_status, send_time, msg from out_stockout_back + + + + + + + + + + insert into out_stockout_back + + stockout_guid, + stockout_id, + out_type, + create_date, + department_no, + customer_no, + create_man_id, + status, + stockout_source, + warehouse_id, + class_now_id, + exit_id, + car_number, + FID, + erp_stockout_id, + start_date, + finish_date, + spare1, + spare2, + spare3, + spare4, + spare5, + spare6, + spare7, + spare8, + send_status, + send_time, + msg, + + + #{stockoutGuid}, + #{stockoutId}, + #{outType}, + #{createDate}, + #{departmentNo}, + #{customerNo}, + #{createManId}, + #{status}, + #{stockoutSource}, + #{warehouseId}, + #{classNowId}, + #{exitId}, + #{carNumber}, + #{FID}, + #{erpStockoutId}, + #{startDate}, + #{finishDate}, + #{spare1}, + #{spare2}, + #{spare3}, + #{spare4}, + #{spare5}, + #{spare6}, + #{spare7}, + #{spare8}, + #{sendStatus}, + #{sendTime}, + #{msg}, + + + + + update out_stockout_back + + stockout_id = #{stockoutId}, + out_type = #{outType}, + create_date = #{createDate}, + department_no = #{departmentNo}, + customer_no = #{customerNo}, + create_man_id = #{createManId}, + status = #{status}, + stockout_source = #{stockoutSource}, + warehouse_id = #{warehouseId}, + class_now_id = #{classNowId}, + exit_id = #{exitId}, + car_number = #{carNumber}, + FID = #{FID}, + erp_stockout_id = #{erpStockoutId}, + start_date = #{startDate}, + finish_date = #{finishDate}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare3 = #{spare3}, + spare4 = #{spare4}, + spare5 = #{spare5}, + spare6 = #{spare6}, + spare7 = #{spare7}, + spare8 = #{spare8}, + send_status = #{sendStatus}, + send_time = #{sendTime}, + msg = #{msg}, + + where stockout_guid = #{stockoutGuid} + + + + delete from out_stockout_back where stockout_guid = #{stockoutGuid} + + + + delete from out_stockout_back where stockout_guid in + + #{stockoutGuid} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutDetailBackMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutDetailBackMapper.xml new file mode 100644 index 0000000..a3ee8a6 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutDetailBackMapper.xml @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, spare9, send_status, send_time, msg from out_stockout_detail_back + + + + + + + + insert into out_stockout_detail_back + + stockout_detail_id, + stockout_guid, + stockout_id, + lot_no, + product_guid, + product_id, + quantity, + quantity_x, + quantity_j, + assign_num, + assign_num_x, + assign_num_j, + allot_quantity, + allot_quantity_x, + allot_quantity_j, + price, + remark, + warehouse_id, + out_id, + bukechai_quantity, + kechai_quantity, + entryid, + flat_quantity, + fid, + erp_stockout_id, + unit, + spec, + product_name, + spare1, + spare2, + spare3, + spare4, + spare5, + spare6, + spare7, + spare8, + spare9, + send_status, + send_time, + msg, + + + #{stockoutDetailId}, + #{stockoutGuid}, + #{stockoutId}, + #{lotNo}, + #{productGuid}, + #{productId}, + #{quantity}, + #{quantityX}, + #{quantityJ}, + #{assignNum}, + #{assignNumX}, + #{assignNumJ}, + #{allotQuantity}, + #{allotQuantityX}, + #{allotQuantityJ}, + #{price}, + #{remark}, + #{warehouseId}, + #{outId}, + #{bukechaiQuantity}, + #{kechaiQuantity}, + #{entryid}, + #{flatQuantity}, + #{fid}, + #{erpStockoutId}, + #{unit}, + #{spec}, + #{productName}, + #{spare1}, + #{spare2}, + #{spare3}, + #{spare4}, + #{spare5}, + #{spare6}, + #{spare7}, + #{spare8}, + #{spare9}, + #{sendStatus}, + #{sendTime}, + #{msg}, + + + + + update out_stockout_detail_back + + stockout_guid = #{stockoutGuid}, + lot_no = #{lotNo}, + product_guid = #{productGuid}, + product_id = #{productId}, + quantity = #{quantity}, + quantity_x = #{quantityX}, + quantity_j = #{quantityJ}, + assign_num = #{assignNum}, + assign_num_x = #{assignNumX}, + assign_num_j = #{assignNumJ}, + allot_quantity = #{allotQuantity}, + allot_quantity_x = #{allotQuantityX}, + allot_quantity_j = #{allotQuantityJ}, + price = #{price}, + remark = #{remark}, + warehouse_id = #{warehouseId}, + out_id = #{outId}, + bukechai_quantity = #{bukechaiQuantity}, + kechai_quantity = #{kechaiQuantity}, + entryid = #{entryid}, + flat_quantity = #{flatQuantity}, + fid = #{fid}, + erp_stockout_id = #{erpStockoutId}, + unit = #{unit}, + spec = #{spec}, + product_name = #{productName}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare3 = #{spare3}, + spare4 = #{spare4}, + spare5 = #{spare5}, + spare6 = #{spare6}, + spare7 = #{spare7}, + spare8 = #{spare8}, + spare9 = #{spare9}, + send_status = #{sendStatus}, + send_time = #{sendTime}, + msg = #{msg}, + + where stockout_id = #{stockoutId} + + + + delete from out_stockout_detail_back where stockout_detail_id = #{stockoutDetailId} + + + + delete from out_stockout_detail_back where stockout_detail_id in + + #{stockoutDetailId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml index 84ac0fb..d65c78a 100644 --- a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml @@ -29,10 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + - select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5 from out_stockout + select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5,spare6,spare7,spare8 from out_stockout @@ -100,6 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" spare4, spare3, spare5, + spare6, + spare7, + spare8, #{stockoutGuid}, @@ -122,6 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{spare4}, #{spare3}, #{spare5}, + #{spare6}, + #{spare7}, + #{spare8}, diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index c98ae7c..dee870a 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -44,6 +44,7 @@ "sortablejs": "1.10.2", "splitpanes": "2.4.1", "vue": "2.6.12", + "vue-barcode": "^1.3.0", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", "vue-easy-print": "^0.0.8", diff --git a/ruoyi-ui/src/views/bas/traycode/index.vue b/ruoyi-ui/src/views/bas/traycode/index.vue index 1e5973c..b25c25b 100644 --- a/ruoyi-ui/src/views/bas/traycode/index.vue +++ b/ruoyi-ui/src/views/bas/traycode/index.vue @@ -25,6 +25,16 @@ @keyup.enter.native="handleQuery" /> + + + + + 搜索 @@ -91,12 +101,16 @@ - + - - - - + + + + + +