Browse Source

生产订单查询

master
常熟吴彦祖 5 months ago
parent
commit
e234ccae65
  1. 46
      src/main/java/com/gaotao/modules/boxManage/controller/BoxForNotificationController.java
  2. 14
      src/main/java/com/gaotao/modules/boxManage/dao/BoxForNotificationMapper.java
  3. 12
      src/main/java/com/gaotao/modules/boxManage/data/SoReceiveBoxesData.java
  4. 202
      src/main/java/com/gaotao/modules/boxManage/entity/SoReceiveBoxesDto.java
  5. 10
      src/main/java/com/gaotao/modules/boxManage/service/BoxForNotificationService.java
  6. 34
      src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java
  7. 2
      src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java
  8. 51
      src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml
  9. 6
      src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml

46
src/main/java/com/gaotao/modules/boxManage/controller/BoxForNotificationController.java

@ -0,0 +1,46 @@
package com.gaotao.modules.boxManage.controller;
import com.gaotao.common.utils.R;
import com.gaotao.modules.boxManage.data.SoReceiveBoxesData;
import com.gaotao.modules.boxManage.service.BoxForNotificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/boxForNotification")
public class BoxForNotificationController {
@Autowired
private BoxForNotificationService srmSupplierService;
/**
*
* @description 通过订单号查询发货箱信息
* @author 常熟吴彦祖
* @date 2025/9/1 17:09
* @return R
*/
@PostMapping(value="/searchSoReceiveBoxesData")
@ResponseBody
public R searchSoReceiveBoxesData(@RequestBody SoReceiveBoxesData data) {
List<SoReceiveBoxesData> rows = srmSupplierService.searchSoReceiveBoxesData(data);
return R.ok().put("rows", rows);
}
/**
*
* @description 新增发货箱信息
* @author 常熟吴彦祖
* @date 2025/9/1 17:09
* @return R
*/
@PostMapping(value="/newSoReceiveBoxesData")
@ResponseBody
public R newSoReceiveBoxesData(@RequestBody SoReceiveBoxesData data) {
srmSupplierService.newSoReceiveBoxesData(data);
return R.ok();
}
}

14
src/main/java/com/gaotao/modules/boxManage/dao/BoxForNotificationMapper.java

@ -0,0 +1,14 @@
package com.gaotao.modules.boxManage.dao;
import com.gaotao.modules.boxManage.data.SoReceiveBoxesData;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface BoxForNotificationMapper {
List<SoReceiveBoxesData> searchSoReceiveBoxesData(SoReceiveBoxesData data);
void newSoReceiveBoxesData(SoReceiveBoxesData data);
}

12
src/main/java/com/gaotao/modules/boxManage/data/SoReceiveBoxesData.java

@ -0,0 +1,12 @@
package com.gaotao.modules.boxManage.data;
import com.gaotao.modules.boxManage.entity.SoReceiveBoxesDto;
import lombok.Data;
import org.apache.ibatis.type.Alias;
@Data
@Alias("SoReceiveBoxesData")
public class SoReceiveBoxesData extends SoReceiveBoxesDto {
private String wareHouseName;
}

202
src/main/java/com/gaotao/modules/boxManage/entity/SoReceiveBoxesDto.java

@ -0,0 +1,202 @@
package com.gaotao.modules.boxManage.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
public class SoReceiveBoxesDto {
/**
*
*/
private Integer id;
/**
*
*/
private String site;
private String buNo;
/**
*
*/
private String boxNo;
/**
*
*/
private String orderNo;
/**
*
*/
private String status;
/**
*
*/
private Integer rollsQty;
/**
*
*/
private String boxType;
/**
*
*/
private String cInStockFlag;
/**
*
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createdDate;
/**
*
*/
private String createdBy;
/**
*
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date updateDate;
/**
*
*/
private String updateBy;
/**
*
*/
private Integer version;
/**
*
*/
private String wareHouseID;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getBoxNo() {
return boxNo;
}
public void setBoxNo(String boxNo) {
this.boxNo = boxNo;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Integer getRollsQty() {
return rollsQty;
}
public void setRollsQty(Integer rollsQty) {
this.rollsQty = rollsQty;
}
public String getBoxType() {
return boxType;
}
public void setBoxType(String boxType) {
this.boxType = boxType;
}
public String getcInStockFlag() {
return cInStockFlag;
}
public void setcInStockFlag(String cInStockFlag) {
this.cInStockFlag = cInStockFlag;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getWareHouseID() {
return wareHouseID;
}
public void setWareHouseID(String wareHouseID) {
this.wareHouseID = wareHouseID;
}
public String getBuNo() {
return buNo;
}
public void setBuNo(String buNo) {
this.buNo = buNo;
}
}

10
src/main/java/com/gaotao/modules/boxManage/service/BoxForNotificationService.java

@ -0,0 +1,10 @@
package com.gaotao.modules.boxManage.service;
import com.gaotao.modules.boxManage.data.SoReceiveBoxesData;
import java.util.List;
public interface BoxForNotificationService {
List<SoReceiveBoxesData> searchSoReceiveBoxesData(SoReceiveBoxesData data);
void newSoReceiveBoxesData(SoReceiveBoxesData data);
}

34
src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java

@ -0,0 +1,34 @@
package com.gaotao.modules.boxManage.service.impl;
import com.gaotao.modules.boxManage.dao.BoxForNotificationMapper;
import com.gaotao.modules.boxManage.data.SoReceiveBoxesData;
import com.gaotao.modules.boxManage.service.BoxForNotificationService;
import com.gaotao.modules.trans.entity.TransNoControl;
import com.gaotao.modules.trans.service.TransNoControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class BoxForNotificationServiceImpl implements BoxForNotificationService {
@Autowired
private TransNoControlService transNoService;
@Autowired
private BoxForNotificationMapper boxForNotificationMapper;
@Override
public List<SoReceiveBoxesData> searchSoReceiveBoxesData(SoReceiveBoxesData data) {
return boxForNotificationMapper.searchSoReceiveBoxesData(data);
}
@Override
public void newSoReceiveBoxesData(SoReceiveBoxesData inData){
TransNoControl transNo = transNoService.getTransNo(inData.getSite(),"BOX",inData.getBuNo());
if(transNo == null){
throw new RuntimeException("箱号生成失败,请联系管理员!");
}
inData.setBoxNo(transNo.getNewTransNo());
boxForNotificationMapper.newSoReceiveBoxesData(inData);
}
}

2
src/main/java/com/gaotao/modules/wms/controller/WmsPrintController.java

@ -101,4 +101,6 @@ public class WmsPrintController {
PageUtils page = wmsPrintService.getKuCunLabelData( inData);
return R.ok().put("page", page);
}
}

51
src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gaotao.modules.boxManage.dao.BoxForNotificationMapper">
<select id="searchSoReceiveBoxesData" resultType="SoReceiveBoxesData">
SELECT
s.id,
s.site,
s.WareHouseID as wareHouseID,
s.box_no as boxNo,
s.order_no as orderNo,
s.status,
s.rolls_qty as rollsQty,
s.box_type as boxType,
s.c_in_stock_flag as cInStockFlag,
s.created_date as createdDate,
s.created_by as createdBy,
s.update_date as updateDate,
s.update_by as updateBy,
s.version,
w.WareHouseName as wareHouseName,
s.bu_no
from so_receive_boxes s
left join warehouse w on s.WareHouseID = w.WareHouseID and s.site = w.site and s.bu_no = w.bu_no
<where>
<if test="site != null and site != ''">
and s.site = #{site}
</if>
<if test="orderNo != null and orderNo != ''">
and s.order_no = #{orderNo}
</if>
<if test="buNo != null and buNo != ''">
and s.bu_no = #{buNo}
</if>
<if test="boxType != null and boxType != ''">
and s.box_type = #{boxType}
</if>
</where>
</select>
<insert id="newSoReceiveBoxesData" >
insert into so_receive_boxes
(site,box_no,order_no,[status],rolls_qty,box_type,c_in_stock_flag,created_date,created_by,
version,WareHouseID,bu_no) values
(#{site},#{boxNo},#{orderNo},#{status},#{rollsQty},#{boxType},'Y',GetDate(),#{createdBy},
0,#{wareHouseID},#{buNo})
</insert>
</mapper>

6
src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml

@ -64,6 +64,12 @@
<if test="query.endDate != null ">
AND #{query.endDate} >= a.required_outbound_date
</if>
<if test="query.customerId != null and query.customerId != ''">
AND a.customer_id like '%' + #{query.customerId} + '%'
</if>
<if test="query.customerName != null and query.customerName != ''">
AND b.customerName like '%' + #{query.customerName} + '%'
</if>
</where>
</select>

Loading…
Cancel
Save