送货计划调整,添加送货计划明细
This commit is contained in:
parent
3591f6907f
commit
d09d242854
@ -7,7 +7,7 @@ server:
|
|||||||
include-stacktrace: ALWAYS
|
include-stacktrace: ALWAYS
|
||||||
include-message: ALWAYS
|
include-message: ALWAYS
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /jeecg-boot
|
context-path: /tms
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: true
|
||||||
min-response-size: 1024
|
min-response-size: 1024
|
||||||
@ -134,10 +134,15 @@ spring:
|
|||||||
# username: root
|
# username: root
|
||||||
# password: 123456
|
# password: 123456
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:oracle:thin:@123.57.206.181:1521/ORCLPDB1
|
url: jdbc:oracle:thin:@123.57.206.181:1521/ORCLPDB1
|
||||||
username: SDKTMS
|
username: SDKTMS
|
||||||
password: SDKTMS
|
password: SDKTMS
|
||||||
driver-class-name: oracle.jdbc.OracleDriver
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
wms:
|
||||||
|
url: jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||||
|
username: ZIWMS_SAP
|
||||||
|
password: adm2024
|
||||||
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
# 多数据源配置
|
# 多数据源配置
|
||||||
#multi-datasource1:
|
#multi-datasource1:
|
||||||
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
@ -7,7 +7,7 @@ server:
|
|||||||
include-stacktrace: ALWAYS
|
include-stacktrace: ALWAYS
|
||||||
include-message: ALWAYS
|
include-message: ALWAYS
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /jeecg-boot
|
context-path: /tms
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: true
|
||||||
min-response-size: 1024
|
min-response-size: 1024
|
||||||
@ -138,6 +138,11 @@ spring:
|
|||||||
username: SDKTMS
|
username: SDKTMS
|
||||||
password: SDKTMS
|
password: SDKTMS
|
||||||
driver-class-name: oracle.jdbc.OracleDriver
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
wms:
|
||||||
|
url: jdbc:oracle:thin:@172.22.10.236:1521/mesdb
|
||||||
|
username: ZIWMS_SAP
|
||||||
|
password: adm2024
|
||||||
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
# 多数据源配置
|
# 多数据源配置
|
||||||
#multi-datasource1:
|
#multi-datasource1:
|
||||||
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration debug="false">
|
<configuration debug="false">
|
||||||
<!--定义日志文件的存储地址 -->
|
<!--定义日志文件的存储地址 -->
|
||||||
<property name="LOG_HOME" value="../logs" />
|
<property name="LOG_HOME" value="./logs" />
|
||||||
|
|
||||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台输出 -->
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--日志文件输出的文件名 -->
|
<!--日志文件输出的文件名 -->
|
||||||
<FileNamePattern>${LOG_HOME}/jeecgboot-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/tms-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
<!--日志文件保留天数 -->
|
<!--日志文件保留天数 -->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<maxFileSize>10MB</maxFileSize>
|
<maxFileSize>10MB</maxFileSize>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!--日志文件输出的文件名 -->
|
<!--日志文件输出的文件名 -->
|
||||||
<FileNamePattern>${LOG_HOME}/jeecgboot-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/tms-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||||
<!--日志文件保留天数 -->
|
<!--日志文件保留天数 -->
|
||||||
<MaxHistory>30</MaxHistory>
|
<MaxHistory>30</MaxHistory>
|
||||||
<MaxFileSize>10MB</MaxFileSize>
|
<MaxFileSize>10MB</MaxFileSize>
|
||||||
|
@ -83,7 +83,7 @@ public class LogisticsRouteController extends JeecgController<LogisticsRoute, IL
|
|||||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_route:add")
|
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_route:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody LogisticsRoute logisticsRoute) {
|
public Result<String> add(@RequestBody LogisticsRoute logisticsRoute) {
|
||||||
logisticsRoute.setRoute(logisticsRoute.getStartCity() + "--->" +
|
logisticsRoute.setRoute(logisticsRoute.getStartCity() + "-" +
|
||||||
logisticsRoute.getTargetCity());
|
logisticsRoute.getTargetCity());
|
||||||
logisticsRouteService.save(logisticsRoute);
|
logisticsRouteService.save(logisticsRoute);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
@ -100,7 +100,7 @@ public class LogisticsRouteController extends JeecgController<LogisticsRoute, IL
|
|||||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_route:edit")
|
//@RequiresPermissions("org.jeecg.modules.tms:tms_logistics_route:edit")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody LogisticsRoute logisticsRoute) {
|
public Result<String> edit(@RequestBody LogisticsRoute logisticsRoute) {
|
||||||
logisticsRoute.setRoute(logisticsRoute.getStartCity() + "--->" +
|
logisticsRoute.setRoute(logisticsRoute.getStartCity() + "-" +
|
||||||
logisticsRoute.getTargetCity());
|
logisticsRoute.getTargetCity());
|
||||||
logisticsRouteService.updateById(logisticsRoute);
|
logisticsRouteService.updateById(logisticsRoute);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
|
@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
@ -22,6 +24,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.service.IDeliveryPlanDetailService;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
@ -29,6 +33,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
|||||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
@ -53,6 +58,8 @@ public class DeliveryPlanController extends JeecgController<DeliveryPlan, IDeliv
|
|||||||
private IDeliveryPlanService deliveryPlanService;
|
private IDeliveryPlanService deliveryPlanService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IGeneralSequenceService generalSequenceService;
|
private IGeneralSequenceService generalSequenceService;
|
||||||
|
@Autowired
|
||||||
|
private IDeliveryPlanDetailService deliveryPlanDetailService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@ -86,10 +93,26 @@ public class DeliveryPlanController extends JeecgController<DeliveryPlan, IDeliv
|
|||||||
@ApiOperation(value="送货计划-添加", notes="送货计划-添加")
|
@ApiOperation(value="送货计划-添加", notes="送货计划-添加")
|
||||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_delivery_plan:add")
|
//@RequiresPermissions("org.jeecg.modules.tms:tms_delivery_plan:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result<String> add(@RequestBody DeliveryPlan deliveryPlan) {
|
public Result<String> add(@RequestBody DeliveryPlan deliveryPlan) {
|
||||||
|
List<DeliveryPlanDetail> deliveryPlanDetailList = deliveryPlan.getDeliveryPlanDetailList();
|
||||||
|
String pn = StringUtils.join(deliveryPlanDetailList.stream()
|
||||||
|
.map(DeliveryPlanDetail::getPn)
|
||||||
|
.filter(po -> po != null && !po.isEmpty())
|
||||||
|
.toArray(), ",");
|
||||||
|
String unit = StringUtils.join(deliveryPlanDetailList.stream()
|
||||||
|
.map(DeliveryPlanDetail::getUnit)
|
||||||
|
.filter(po -> po != null && !po.isEmpty())
|
||||||
|
.toArray(), ",");
|
||||||
|
deliveryPlan.setPn(pn)
|
||||||
|
.setUnit(unit);
|
||||||
String sequence = generalSequenceService.getSequence(GeneralSequenceConstant.IN_DEMAND_NO);
|
String sequence = generalSequenceService.getSequence(GeneralSequenceConstant.IN_DEMAND_NO);
|
||||||
deliveryPlan.setSgNo(sequence);
|
deliveryPlan.setSgNo(sequence);
|
||||||
deliveryPlanService.save(deliveryPlan);
|
deliveryPlanService.save(deliveryPlan);
|
||||||
|
deliveryPlanDetailList.forEach(item ->{
|
||||||
|
item.setDeliveryPlanId(deliveryPlan.getId());
|
||||||
|
});
|
||||||
|
deliveryPlanDetailService.saveOrUpdateBatch(deliveryPlanDetailList);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,12 +122,28 @@ public class DeliveryPlanController extends JeecgController<DeliveryPlan, IDeliv
|
|||||||
* @param deliveryPlan
|
* @param deliveryPlan
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@AutoLog(value = "送货计划-编辑")
|
@AutoLog(value = "送货计划-编辑")
|
||||||
@ApiOperation(value="送货计划-编辑", notes="送货计划-编辑")
|
@ApiOperation(value="送货计划-编辑", notes="送货计划-编辑")
|
||||||
//@RequiresPermissions("org.jeecg.modules.tms:tms_delivery_plan:edit")
|
//@RequiresPermissions("org.jeecg.modules.tms:tms_delivery_plan:edit")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody DeliveryPlan deliveryPlan) {
|
public Result<String> edit(@RequestBody DeliveryPlan deliveryPlan) {
|
||||||
|
List<DeliveryPlanDetail> deliveryPlanDetailList = deliveryPlan.getDeliveryPlanDetailList();
|
||||||
|
String pn = StringUtils.join(deliveryPlanDetailList.stream()
|
||||||
|
.map(DeliveryPlanDetail::getPn)
|
||||||
|
.filter(po -> po != null && !po.isEmpty())
|
||||||
|
.toArray(), ",");
|
||||||
|
String unit = StringUtils.join(deliveryPlanDetailList.stream()
|
||||||
|
.map(DeliveryPlanDetail::getUnit)
|
||||||
|
.filter(po -> po != null && !po.isEmpty())
|
||||||
|
.toArray(), ",");
|
||||||
|
deliveryPlan.setPn(pn)
|
||||||
|
.setUnit(unit);
|
||||||
deliveryPlanService.updateById(deliveryPlan);
|
deliveryPlanService.updateById(deliveryPlan);
|
||||||
|
deliveryPlanDetailList.forEach(item ->{
|
||||||
|
item.setDeliveryPlanId(deliveryPlan.getId());
|
||||||
|
});
|
||||||
|
deliveryPlanDetailService.saveOrUpdateBatch(deliveryPlanDetailList);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,4 +219,13 @@ public class DeliveryPlanController extends JeecgController<DeliveryPlan, IDeliv
|
|||||||
return super.importExcel(request, response, DeliveryPlan.class);
|
return super.importExcel(request, response, DeliveryPlan.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取入库单信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getByPo")
|
||||||
|
public Result<?> getByPo(String po) {
|
||||||
|
List<DeliveryPlanDetail> strings = deliveryPlanService.getByPo(po);
|
||||||
|
return Result.OK(strings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@ import java.io.Serializable;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
@ -113,4 +113,6 @@ public class DeliveryPlan implements Serializable {
|
|||||||
@Dict(dicCode = "unit")
|
@Dict(dicCode = "unit")
|
||||||
@ApiModelProperty(value = "单位")
|
@ApiModelProperty(value = "单位")
|
||||||
private java.lang.String unit;
|
private java.lang.String unit;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<DeliveryPlanDetail> deliveryPlanDetailList;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 送货计划
|
* @Description: 送货计划
|
||||||
@ -14,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface DeliveryPlanMapper extends BaseMapper<DeliveryPlan> {
|
public interface DeliveryPlanMapper extends BaseMapper<DeliveryPlan> {
|
||||||
|
|
||||||
|
List<DeliveryPlanDetail> getByPo(@Param("po") String po);
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,12 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.jeecg.modules.tms.carinout.deliveryplan.mapper.DeliveryPlanMapper">
|
<mapper namespace="org.jeecg.modules.tms.carinout.deliveryplan.mapper.DeliveryPlanMapper">
|
||||||
|
|
||||||
|
<select id="getByPo" resultType="org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail"
|
||||||
|
parameterType="java.lang.String">
|
||||||
|
select a.SUPPLIERNO supplier,b.MATERIALSPECNAME pn,b.MATERIALUNIT unit,b.REQUESTQUANTITY planQty
|
||||||
|
from MATERIALRECEIVEREQUEST a
|
||||||
|
left join MATERIALRECEIVEREQUESTDETAIL b
|
||||||
|
on a.RECEIVEREQUESTNAME = b.RECEIVEREQUESTNAME
|
||||||
|
where a.RECEIVEREQUESTNAME = #{po}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -2,6 +2,9 @@ package org.jeecg.modules.tms.carinout.deliveryplan.service;
|
|||||||
|
|
||||||
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 送货计划
|
* @Description: 送货计划
|
||||||
@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IDeliveryPlanService extends IService<DeliveryPlan> {
|
public interface IDeliveryPlanService extends IService<DeliveryPlan> {
|
||||||
|
|
||||||
|
List<DeliveryPlanDetail> getByPo(String po);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
package org.jeecg.modules.tms.carinout.deliveryplan.service.impl;
|
package org.jeecg.modules.tms.carinout.deliveryplan.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
import org.jeecg.modules.tms.carinout.deliveryplan.entity.DeliveryPlan;
|
||||||
import org.jeecg.modules.tms.carinout.deliveryplan.mapper.DeliveryPlanMapper;
|
import org.jeecg.modules.tms.carinout.deliveryplan.mapper.DeliveryPlanMapper;
|
||||||
import org.jeecg.modules.tms.carinout.deliveryplan.service.IDeliveryPlanService;
|
import org.jeecg.modules.tms.carinout.deliveryplan.service.IDeliveryPlanService;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 送货计划
|
* @Description: 送货计划
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
@ -14,6 +19,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class DeliveryPlanServiceImpl extends ServiceImpl<DeliveryPlanMapper, DeliveryPlan> implements IDeliveryPlanService {
|
public class DeliveryPlanServiceImpl extends ServiceImpl<DeliveryPlanMapper, DeliveryPlan> implements IDeliveryPlanService {
|
||||||
|
|
||||||
|
private final DeliveryPlanMapper deliveryPlanMapper;
|
||||||
|
|
||||||
|
@DS("wms")
|
||||||
|
@Override
|
||||||
|
public List<DeliveryPlanDetail> getByPo(String po) {
|
||||||
|
return deliveryPlanMapper.getByPo(po);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,177 @@
|
|||||||
|
package org.jeecg.modules.tms.carinout.deliveryplandetail.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.service.IDeliveryPlanDetailService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 送货明细
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="送货明细")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/deliveryplandetail/deliveryPlanDetail")
|
||||||
|
@Slf4j
|
||||||
|
public class DeliveryPlanDetailController extends JeecgController<DeliveryPlanDetail, IDeliveryPlanDetailService> {
|
||||||
|
@Autowired
|
||||||
|
private IDeliveryPlanDetailService deliveryPlanDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param deliveryPlanDetail
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "送货明细-分页列表查询")
|
||||||
|
@ApiOperation(value="送货明细-分页列表查询", notes="送货明细-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<DeliveryPlanDetail>> queryPageList(DeliveryPlanDetail deliveryPlanDetail,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<DeliveryPlanDetail> queryWrapper = QueryGenerator.initQueryWrapper(deliveryPlanDetail, req.getParameterMap());
|
||||||
|
Page<DeliveryPlanDetail> page = new Page<DeliveryPlanDetail>(pageNo, pageSize);
|
||||||
|
IPage<DeliveryPlanDetail> pageList = deliveryPlanDetailService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param deliveryPlanDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "送货明细-添加")
|
||||||
|
@ApiOperation(value="送货明细-添加", notes="送货明细-添加")
|
||||||
|
//@RequiresPermissions("org.jeecg.modules.tms:delivery_plan_detail:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody DeliveryPlanDetail deliveryPlanDetail) {
|
||||||
|
deliveryPlanDetailService.save(deliveryPlanDetail);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param deliveryPlanDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "送货明细-编辑")
|
||||||
|
@ApiOperation(value="送货明细-编辑", notes="送货明细-编辑")
|
||||||
|
//@RequiresPermissions("org.jeecg.modules.tms:delivery_plan_detail:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody DeliveryPlanDetail deliveryPlanDetail) {
|
||||||
|
deliveryPlanDetailService.updateById(deliveryPlanDetail);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "送货明细-通过id删除")
|
||||||
|
@ApiOperation(value="送货明细-通过id删除", notes="送货明细-通过id删除")
|
||||||
|
//@RequiresPermissions("org.jeecg.modules.tms:delivery_plan_detail:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
deliveryPlanDetailService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "送货明细-批量删除")
|
||||||
|
@ApiOperation(value="送货明细-批量删除", notes="送货明细-批量删除")
|
||||||
|
//@RequiresPermissions("org.jeecg.modules.tms:delivery_plan_detail:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.deliveryPlanDetailService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "送货明细-通过id查询")
|
||||||
|
@ApiOperation(value="送货明细-通过id查询", notes="送货明细-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<DeliveryPlanDetail> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
DeliveryPlanDetail deliveryPlanDetail = deliveryPlanDetailService.getById(id);
|
||||||
|
if(deliveryPlanDetail==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(deliveryPlanDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param deliveryPlanDetail
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("org.jeecg.modules.tms:delivery_plan_detail:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, DeliveryPlanDetail deliveryPlanDetail) {
|
||||||
|
return super.exportXls(request, deliveryPlanDetail, DeliveryPlanDetail.class, "送货明细");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("delivery_plan_detail:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, DeliveryPlanDetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package org.jeecg.modules.tms.carinout.deliveryplandetail.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 送货明细
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("delivery_plan_detail")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="delivery_plan_detail对象", description="送货明细")
|
||||||
|
public class DeliveryPlanDetail implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
/**PO*/
|
||||||
|
@Excel(name = "PO", width = 15)
|
||||||
|
@ApiModelProperty(value = "PO")
|
||||||
|
private String po;
|
||||||
|
/**料号*/
|
||||||
|
@Excel(name = "料号", width = 15)
|
||||||
|
@ApiModelProperty(value = "料号")
|
||||||
|
private String pn;
|
||||||
|
/**数量*/
|
||||||
|
@Excel(name = "数量", width = 15)
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private Double planQty;
|
||||||
|
/**单位*/
|
||||||
|
@Excel(name = "单位", width = 15)
|
||||||
|
@ApiModelProperty(value = "单位")
|
||||||
|
private String unit;
|
||||||
|
/**供应商*/
|
||||||
|
@Excel(name = "供应商", width = 15)
|
||||||
|
@ApiModelProperty(value = "供应商")
|
||||||
|
private String supplier;
|
||||||
|
/**送货计划 id*/
|
||||||
|
private String deliveryPlanId;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.tms.carinout.deliveryplandetail.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 送货明细
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface DeliveryPlanDetailMapper extends BaseMapper<DeliveryPlanDetail> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.tms.carinout.deliveryplandetail.mapper.DeliveryPlanDetailMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.tms.carinout.deliveryplandetail.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 送货明细
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IDeliveryPlanDetailService extends IService<DeliveryPlanDetail> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.tms.carinout.deliveryplandetail.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.entity.DeliveryPlanDetail;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.mapper.DeliveryPlanDetailMapper;
|
||||||
|
import org.jeecg.modules.tms.carinout.deliveryplandetail.service.IDeliveryPlanDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 送货明细
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DeliveryPlanDetailServiceImpl extends ServiceImpl<DeliveryPlanDetailMapper, DeliveryPlanDetail> implements IDeliveryPlanDetailService {
|
||||||
|
|
||||||
|
}
|
@ -205,12 +205,17 @@ public class VehicleInOutController extends JeecgController<VehicleInOut, IVehic
|
|||||||
lambdaQueryWrapper.eq(VehicleInOut::getVehicleDemandCountId, vehicleInOut.getId());
|
lambdaQueryWrapper.eq(VehicleInOut::getVehicleDemandCountId, vehicleInOut.getId());
|
||||||
List<VehicleInOut> list = vehicleInOutService.list(lambdaQueryWrapper);
|
List<VehicleInOut> list = vehicleInOutService.list(lambdaQueryWrapper);
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
return Result.error("已经进行过提货了!");
|
if ("1".equals(vehicleInOut.getEfType())) {
|
||||||
|
return Result.error("已经进行过提货了!");
|
||||||
|
} else {
|
||||||
|
return Result.error("已经进行过送货了!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vehicleInOut.setVehicleDemandCountId(vehicleInOut.getId());
|
vehicleInOut.setVehicleDemandCountId(vehicleInOut.getId());
|
||||||
vehicleInOut.setId(null)
|
vehicleInOut.setId(null)
|
||||||
.setCreateTime(null)
|
.setCreateTime(null)
|
||||||
.setCreateBy(null);
|
.setCreateBy(null)
|
||||||
|
.setCurrentStatus("1");
|
||||||
vehicleInOutService.save(vehicleInOut);
|
vehicleInOutService.save(vehicleInOut);
|
||||||
return Result.OK("提货成功!");
|
return Result.OK("提货成功!");
|
||||||
}
|
}
|
||||||
|
@ -239,4 +239,14 @@ public class DeliveryDemandController extends JeecgController<DeliveryDemand, ID
|
|||||||
page.setRecords(list).setTotal(list.size());
|
page.setRecords(list).setTotal(list.size());
|
||||||
return Result.OK(page);
|
return Result.OK(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发货单
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getShip")
|
||||||
|
public Result<?> getShip() {
|
||||||
|
List<String> strings = deliveryDemandService.getShip();
|
||||||
|
return Result.OK(strings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package org.jeecg.modules.tms.outbound.deliverydemand.mapper;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.tms.outbound.deliverydemand.entity.DeliveryDemand;
|
import org.jeecg.modules.tms.outbound.deliverydemand.entity.DeliveryDemand;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@ -26,4 +27,6 @@ public interface DeliveryDemandMapper extends BaseMapper<DeliveryDemand> {
|
|||||||
* @param currentStatus 当前状态
|
* @param currentStatus 当前状态
|
||||||
*/
|
*/
|
||||||
void updateByVdNo(String vdNo, String currentStatus);
|
void updateByVdNo(String vdNo, String currentStatus);
|
||||||
|
|
||||||
|
List<String> getShip();
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,9 @@
|
|||||||
update tms_delivery_demand set current_status = #{currentStatus}
|
update tms_delivery_demand set current_status = #{currentStatus}
|
||||||
where vd_no = #{vdNo}
|
where vd_no = #{vdNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getShip" resultType="java.lang.String">
|
||||||
|
select DISTINCT SHIPREQUESTNAME from MATERIALSHIPREQUEST
|
||||||
|
where SHIPREQUESTSTATE = 'Created'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -34,4 +34,6 @@ public interface IDeliveryDemandService extends IService<DeliveryDemand> {
|
|||||||
* @param currentStatus 当前状态
|
* @param currentStatus 当前状态
|
||||||
*/
|
*/
|
||||||
void updateByVdNo(String vdNo, String currentStatus);
|
void updateByVdNo(String vdNo, String currentStatus);
|
||||||
|
|
||||||
|
List<String> getShip();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.jeecg.modules.tms.outbound.deliverydemand.service.impl;
|
package org.jeecg.modules.tms.outbound.deliverydemand.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -126,4 +127,10 @@ public class DeliveryDemandServiceImpl extends ServiceImpl<DeliveryDemandMapper,
|
|||||||
.set(DeliveryDemand::getCurrentStatus, currentStatus);
|
.set(DeliveryDemand::getCurrentStatus, currentStatus);
|
||||||
deliveryDemandMapper.update(new DeliveryDemand(), lambdaUpdateWrapper);
|
deliveryDemandMapper.update(new DeliveryDemand(), lambdaUpdateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DS("wms")
|
||||||
|
@Override
|
||||||
|
public List<String> getShip() {
|
||||||
|
return deliveryDemandMapper.getShip();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public class VehicleDemandServiceImpl extends ServiceImpl<VehicleDemandMapper, V
|
|||||||
}
|
}
|
||||||
// 3.查找费用最低的方案
|
// 3.查找费用最低的方案
|
||||||
// Map<String, Integer> vehicleCounts;
|
// Map<String, Integer> vehicleCounts;
|
||||||
// String: 由车型与车长组成,以逗号分隔
|
// String: 由车型、车长、供应商编码组成,以逗号分隔
|
||||||
// Integer: 该种车型与车长选择的数量
|
// Integer: 该种车型与车长选择的数量
|
||||||
Solution solution = findCheapestSolution(iogisticsPriceList, vehicleDemand.getTotalPallets());
|
Solution solution = findCheapestSolution(iogisticsPriceList, vehicleDemand.getTotalPallets());
|
||||||
// 打印,方便查看,开发时可以打开
|
// 打印,方便查看,开发时可以打开
|
||||||
|
Loading…
x
Reference in New Issue
Block a user