Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-warehouse
0.0 2 years ago
parent
commit
ac0d5b4827
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  3. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  4. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingAppVO.java
  5. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingDetailVO.java
  6. 2
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java
  7. 27
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  8. 6
      blade-service/logpm-distribution/pom.xml
  9. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java
  10. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  11. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java
  12. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/BillLadingAppDTO.java
  13. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  14. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  15. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  16. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  17. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  18. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  19. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  20. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  21. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  22. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  23. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  24. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  25. 13
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/controller/PanFactoryDataController.java
  26. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  27. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

1
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -12,6 +12,7 @@ public class DictBizConstant {
public static final String DEFAULT_DEPT_ID = "default_dept_id";//默认部门ID
public static final String DELIVERY_ORDER_STATUS = "delivery_order_status";//配送订单状态
public static final String PDA_AUDIO = "pda_audio";//PDA扫码语音
}

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="-zhy";
public static final String DEVAUTH ="";
/**
* 工厂对接服务名称

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -118,7 +118,8 @@ public class DistributionParcelListEntity extends TenantEntity {
* 物料Id
*/
@ApiModelProperty(value = "物料ID")
private Long material;
private Long materialId;
/**
* 物料名称
*/

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingAppVO.java

@ -36,6 +36,8 @@ import java.util.List;
public class DistrilbutionBillLadingAppVO extends DistrilbutionBillLadingEntity {
private static final long serialVersionUID = 1L;
private Long billLadingId;
private String stockArticleId;
private Integer carType;

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingDetailVO.java

@ -36,6 +36,8 @@ public class DistrilbutionAppBillLadingDetailVO implements Serializable {
private String packetBarCode;
private Integer scanStatus;//扫码状态
private String scanStatusStr;//扫码状态
private Integer errorStatus;//异常状态
private String errorStatusStr;//异常状态
}

2
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java

@ -54,7 +54,7 @@ public class DistributionParcelListEntityVO {
* 物料
*/
@ApiModelProperty(value = "物料")
private String material;
private String materialName;
/**
* 数量
*/

27
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -46,8 +46,9 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
// break;
// case CodeNumConstant.TRAYS:
// break;
// case CodeNumConstant.PACKAGE:
// break;
case CodeNumConstant.PACKAGE:
code = generatePackageCode(type,warehouseCode);
break;
// case CodeNumConstant.SHELF:
// break;
case CodeNumConstant.PSKH:
@ -59,6 +60,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
return code;
}
private String generateDeliveryCustomOrder(Integer type, String warehouseCode) {
//查询租户编码
String des = CodeDesEnum.getMes(type);//摘要
@ -102,4 +104,25 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
return warehouseCode + des + dateShort + CommonUtil.geFourNumber(incr);
}
private String generatePackageCode(Integer type,String warehouseCode) {
String des = CodeDesEnum.getMes(type);//摘要
String tenantId = AuthUtil.getTenantId();//租户号
// String tenantId = "627683";//租户号
//获得年月日短字符串
String dateShort = CommonUtil.dateToStringShort(new Date());
//redis的key
String key = tenantId + ":" + warehouseCode + ":" + des+":"+dateShort;
//获得序号
Long incr = bladeRedis.incr(key);
if(1 == incr){
//如果为1就是刚刚才建立,给他一个过期时间
bladeRedis.expireAt(key,CommonUtil.getDayEnd());
}
return warehouseCode + des + dateShort + CommonUtil.geFourNumber(incr);
}
}

6
blade-service/logpm-distribution/pom.xml

@ -67,6 +67,12 @@
<artifactId>blade-core-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java

@ -69,7 +69,8 @@ public class DistributionBillLadingAppController extends BladeController {
public R<DistrilbutionAppBillLadingOrderMainVO> orderList(@RequestBody BillLadingAppDTO billLadingAppDTO) {
Integer orderStatus = billLadingAppDTO.getOrderStatus();//订单状态
Long billLadingId = billLadingAppDTO.getBillLadingId();//自提单id
DistrilbutionAppBillLadingOrderMainVO vo = distrilbutionBillLadingService.selectOrderList(billLadingId,orderStatus);
String orderSelfNumbering = billLadingAppDTO.getOrderSelfNumbering();//自提单id
DistrilbutionAppBillLadingOrderMainVO vo = distrilbutionBillLadingService.selectOrderList(billLadingId,orderStatus,orderSelfNumbering);
return R.data(vo);
}

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -18,6 +18,7 @@ package com.logpm.distribution.appcontroller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockEntity;
@ -29,11 +30,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.web.bind.annotation.*;
@ -177,6 +180,34 @@ public class DistributionStockupAppController extends BladeController {
}
}
@ResponseBody
@PostMapping("/stockupStockListPackageCode")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "备货库存品生成包件码", notes = "传入stockupDTO")
public R stockupStockListPackageCode(@RequestBody StockupDTO stockupDTO) {
Long reservationId = stockupDTO.getReservationId();//预约单id
Long stockListId = stockupDTO.getStockListId();//库存品id
Integer packageNum = stockupDTO.getPackageNum();//包条数量
//查询客户订单详情
if(Objects.isNull(reservationId)){
log.warn("##############stockupStockListPackageCode: 预约单id为空 reservationId={}",reservationId);
return R.fail("预约单id不能为空");
}
if(Objects.isNull(stockListId)){
log.warn("##############stockupStockListPackageCode: 库存品id为空 stockListId={}",stockListId);
return R.fail("库存品id不能为空");
}
if(Objects.isNull(packageNum)){
log.warn("##############stockupStockListPackageCode: 包条数量为空 packageNum={}",packageNum);
return R.fail("包条数量不能为空");
}
List<String> list = distributionStockupService.createPackageCode(reservationId,stockListId,packageNum);
return R.data(list);
}
@ResponseBody
@PostMapping("/stockupScan")
@ApiOperationSupport(order = 1)
@ -225,7 +256,9 @@ public class DistributionStockupAppController extends BladeController {
//将消息携带绑定键值
rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_SCAN_EXCHANGE, RabbitConstant.STOCKUP_SCAN_ROUTING, map);
return R.success("扫码成功");
String audioValue = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "1");
return Resp.scanSuccess("success",audioValue);
}else if(scanType == 2){
//库存品扫描
Long reservationId = stockupDTO.getReservationId();

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java

@ -0,0 +1,19 @@
package com.logpm.distribution.bean;
import lombok.Data;
import org.springblade.core.tool.api.R;
@Data
public class Resp extends R {
private String audio;
public static Resp scanSuccess(String msg,String audio){
Resp resp = new Resp();
resp.setCode(200);
resp.setMsg(msg);
resp.setAudio(audio);
return resp;
}
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/BillLadingAppDTO.java

@ -10,7 +10,8 @@ public class BillLadingAppDTO implements Serializable {
private Integer current;
private Integer size;
private String pickUpTime;//提货时间
private String pickUpTimeStart;//提货时间开始
private String pickUpTimeEnd;//提货时间结束
private Integer orderStatus;//订单状态

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -8,7 +8,8 @@ import java.io.Serializable;
@Data
public class StockupDTO implements Serializable {
private String stockupDate;//备货日期
private String stockupDateStart;//备货日期
private String stockupDateEnd;//备货日期
private Integer status;//0未完成 1已完成
@ -43,4 +44,6 @@ public class StockupDTO implements Serializable {
private String packetBarCode;//包件码
private String stockupArea;//备货区
private Long stockListId;//库存品id
private Integer packageNum;//包条数量
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -77,4 +77,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @return
*/
DistributionReservationVO getReservationInfo(String id);
Integer getReservationNumByReservationIdAndStockListId(@Param("reservationId") Long reservationId, @Param("stockListId")Long stockListId);
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -179,6 +179,7 @@
left join logpm_distribution_stock s on s.parcel_list_id = ldpl.id and s.is_deleted = 0
where ldr.is_deleted = 0
and ldr.id = #{reservationId}
and ldrs.stock_article_id is not null
group by ldpl.cargo_title,
ldpl.shelf_title,
ldpl.goods_allocation,
@ -272,4 +273,13 @@
</where>
</select>
<select id="getReservationNumByReservationIdAndStockListId" resultType="Integer" >
select ldrs.reservation_num
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
where ldr.id = #{reservationId}
and ldr.is_deleted = 0
and ldrs.stocklist_id = #{stockListId}
</select>
</mapper>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -75,7 +75,8 @@
left join logpm_distribution_stockup_info ldsi on ldsi.reservation_id = ldr.id
left join logpm_distribution_stockup lds on ldsi.stockup_id = lds.id
<where>
<if test="param.stockupDate != null and param.stockupDate != '' "> and DATE_FORMAT(lds.stockup_date,'%Y-%m-%d') = #{param.stockupDate}</if>
<if test="param.stockupDateStart != null and param.stockupDateStart != '' "> and lds.stockup_date &lt;= #{param.stockupDateStart}</if>
<if test="param.stockupDateEnd != null and param.stockupDateEnd != '' "> and lds.stockup_date &gt;= #{param.stockupDateEnd}</if>
<if test="param.status != null and param.status == 0 "> and lds.stockup_status in (1,2,3) </if>
<if test="param.status != null and param.status == 1 "> and lds.stockup_status = 4 </if>
and lds.is_deleted = 0

73
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -64,59 +64,58 @@
</select>
<select id="pageListApp" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select 3 carType,
bl.`condition` `condition`,
bl.Pick_up_plate pickUpPlate,
bl.consignee consignee,
bl.create_time,
bl.pick_up_time,
bl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading bl
where bl.is_deleted = 0
and DATE_FORMAT(bl.pick_up_time,'%Y-%m-%d') = #{param.pickUpTime}
select ldbl.id billLadingId,
3 carType,
ldbl.`condition` `condition`,
ldbl.Pick_up_plate pickUpPlate,
ldbl.consignee consignee,
ldbl.create_time,
ldbl.pick_up_time,
ldbl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading ldbl
where ldbl.is_deleted = 0
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">ldbl.pick_up_time &lt;= #{param.pickUpTimeStart} </if>
<if test="param.pickUpTimeEnd != null and param.pickUpTimeEnd!='' ">ldbl.pick_up_time &gt;= #{param.pickUpTimeEnd} </if>
</select>
<select id="selectDataByBillLadingId" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select 3 carType,
bl.`condition` `condition`,
bl.Pick_up_plate pickUpPlate,
bl.consignee consignee,
bl.create_time,
bl.pick_up_time,
bl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading bl
where bl.is_deleted = 0
and bl.id = #{billLadingId}
select ldbl.id billLadingId,
3 carType,
ldbl.`condition` `condition`,
ldbl.Pick_up_plate pickUpPlate,
ldbl.consignee consignee,
ldbl.create_time,
ldbl.pick_up_time,
ldbl.stock_article_id stockArticleId
from logpm_distrilbution_bill_lading ldbl
where ldbl.is_deleted = 0
and ldbl.id = #{billLadingId}
</select>
<select id="selectDetailList" resultType="com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO">
select pl.stock_article_id stockArticleId,
pl.order_self_numbering orderSelfNumbering,
pl.packet_bar_code packetBarCode,
select ldpl.stock_article_id stockArticleId,
ldpl.order_self_numbering orderSelfNumbering,
ldpl.packet_bar_code packetBarCode,
case
when bls.id is null then 1
when ldbls.id is null then 1
else 2
end scanStatus,
0 errorStatus
from logpm_distribution_parcel_list pl
left join logpm_distribution_bill_lading_scan bls on bls.parcel_list_id = pl.id and sa.is_deleted = 0
from logpm_distribution_parcel_list ldpl
left join logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldpl.id and ldbls.is_deleted = 0
<where>
and pl.is_deleted = 0
and pl.stock_article_id = #{stockArticleId}
and ldpl.is_deleted = 0
and ldpl.stock_article_id = #{stockArticleId}
<if test="orderSelfNumbering != null and orderSelfNumbering !=''">
and pl.order_self_numbering like ${orderSelfNumbering}
and ldpl.order_self_numbering = ${orderSelfNumbering}
</if>
<if test="scanStatus != null and scanStatus=1">
and bls.id is null
<if test="scanStatus != null and scanStatus==1">
and ldbls.id is null
</if>
<if test="scanStatus != null and scanStatus=2">
and bls.id is not null
<if test="scanStatus != null and scanStatus==2">
and ldbls.id is not null
</if>
</where>
where pl.is_deleted = 0
and pl.stock_article_id =
and bls.id is null
</select>
<select id="getOneOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select ldbl.id,ldbl.stockup_code stockupCode,ldbl.pick_up_time pickUpTime,ldbl.stockup_area stockupArea,ldbl.consignee,

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java

@ -154,4 +154,7 @@ public interface IDistributionReservationService extends BaseService<Distributio
Integer selectPlanNum(Long reservationId);
Integer getReservationNumByReservationIdAndStockListId(Long reservationId, Long stockListId);
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -97,4 +97,7 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @return
*/
IPage<DistributionStockupVO> getInventoryOwn(IPage<Object> page, Long id);
List<String> createPackageCode(Long reservationId, Long stockListId, Integer packageNum);
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java

@ -17,7 +17,6 @@
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO;
@ -65,7 +64,7 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
IPage<DistrilbutionBillLadingAppVO> pageListApp(IPage<Object> page, BillLadingAppDTO billLadingAppDTO);
DistrilbutionAppBillLadingOrderMainVO selectOrderList(Long billLadingId, Integer orderStatus);
DistrilbutionAppBillLadingOrderMainVO selectOrderList(Long billLadingId, Integer orderStatus,String orderSelfNumbering);
DistrilbutionBillLadingAppVO selectDetailList(Long billLadingId, Integer scanStatus,String orderSelfNumbering);

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1078,4 +1078,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
public Integer selectPlanNum(Long reservationId) {
return baseMapper.selectPlanNum(reservationId);
}
@Override
public Integer getReservationNumByReservationIdAndStockListId(Long reservationId, Long stockListId) {
return baseMapper.getReservationNumByReservationIdAndStockListId(reservationId,stockListId);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -273,7 +273,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
distributionStockListEntity.setStoreName(Optional.ofNullable(distributionStockArticleEntity.getStoreName()).orElse(null));//门店名称
distributionStockListEntity.setFactory(Optional.ofNullable(distributionStockArticleEntity.getFactoryTrain()).orElse(null));//工厂车次
distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()).orElse(null));//品分类
distributionStockListEntity.setMaterialId(Optional.ofNullable(distributionParcelList.getMaterial()).orElse(null));//货物ID
distributionStockListEntity.setMaterialId(Optional.ofNullable(distributionParcelList.getMaterialId()).orElse(null));//货物ID
distributionStockListEntity.setParcelListId(distributionParcelList.getId());//包件id
distributionStockListEntity.setQuantityOccupied(0);//冻结数量
distributionStockListEntity.setServiceType(distributionStockArticleEntity.getTypeService());//冻结数量

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
@ -28,7 +29,9 @@ import com.logpm.distribution.excel.DistributionStockupExcel;
import com.logpm.distribution.mapper.DistributionStockupMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
@ -67,6 +70,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Autowired
private IDistributionStockupScanService distributionStockupScanService;
@Autowired
private IBasicdataCodeClient basicDataCodeClient;
@Override
public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) {
@ -404,4 +410,24 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public List<String> createPackageCode(Long reservationId, Long stockListId, Integer packageNum) {
//通过预约单id和订单
Integer num = distributionReservationService.getReservationNumByReservationIdAndStockListId(reservationId,stockListId);
if(packageNum.compareTo(num) > 0){
log.warn("###################createPackageCode: 包条数量与预约数量不正确");
throw new CustomerException(405,"包条数量与预约数量不正确");
}
List<String> ls = new ArrayList<>();
for (int i = 0 ; i < packageNum ; i++){
String packageCode = basicDataCodeClient.getCodeByType(CodeDesEnum.PACKAGE.getCodeNum(), "TESTCode");
ls.add(packageCode);
}
return ls;
}
}

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -32,8 +32,6 @@ import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DistrilbutionBillLadingAppVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingVO;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO;
@ -324,7 +322,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
@Override
public DistrilbutionAppBillLadingOrderMainVO selectOrderList(Long billLadingId, Integer orderStatus) {
public DistrilbutionAppBillLadingOrderMainVO selectOrderList(Long billLadingId, Integer orderStatus,String orderSelfNumbering) {
DistrilbutionBillLadingAppVO main = baseMapper.selectDataByBillLadingId(billLadingId);
if(Objects.isNull(main)){
return null;
@ -352,6 +350,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stock_article_id",Long.parseLong(s))
.eq("is_deleted",0);
if(!StringUtil.isBlank(orderSelfNumbering)){
queryWrapper.ne("order_self_numbering",orderSelfNumbering);
}
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
vo.setOrderSelfNumbering(list.get(0).getOrderSelfNumbering());
int pn = list.size();
@ -426,7 +427,21 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
//查询所有的包件列表并且附带状态
List<DistrilbutionAppBillLadingDetailVO> details = baseMapper.selectDetailList(Long.parseLong(s),scanStatus,"%"+orderSelfNumbering+"%");
List<DistrilbutionAppBillLadingDetailVO> details = baseMapper.selectDetailList(Long.parseLong(s),scanStatus,orderSelfNumbering);
for (DistrilbutionAppBillLadingDetailVO detailVO:details){
Integer ss = detailVO.getScanStatus();
Integer errorStatus = detailVO.getErrorStatus();
if(ss == 1){
detailVO.setScanStatusStr("未扫描");
}else{
detailVO.setScanStatusStr("已扫描");
}
if(errorStatus == 0){
detailVO.setErrorStatusStr("无异常");
}else{
detailVO.setErrorStatusStr("有异常");
}
}
dls.addAll(details);
orderNum++;

13
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/controller/PanFactoryDataController.java

@ -37,6 +37,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
import java.util.Objects;
/**
@ -132,7 +133,19 @@ public class PanFactoryDataController extends BladeController {
}
@ResponseBody
@PostMapping("/test")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "通常数据推送", notes = "传入factoryOrderDTO")
public Resp test(@RequestBody Map<String,Object> map) {
String unitNo = (String) map.get("unitNo");
//真正的处理需要的数据
panFactoryDataService.handleDataToPlatform("CS0011061260002",null);
return null;
}
}

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -441,7 +441,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
entity.setWarehouseId(distributionStockArticleEntity.getId());
entity.setStockArticleId(id);
// 绑定部门--仓库
entity.setCreateDept(Long.parseLong(basicdataWarehouseEntity.getDepartment()));
if(!Objects.isNull(basicdataWarehouseEntity)){
entity.setCreateDept(Long.parseLong(basicdataWarehouseEntity.getDepartment()));
}
entity.setCreateUser(1123598821738675201L);
entity.setTenantId(TenantNum.HUITONGCODE);
boolean b = distributionParcelListClient.add(entity);

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

@ -97,7 +97,7 @@
ad.firstPackName firsts,
ad.secondPackName `second`,
ad.thirdPackName thirdProduct,
ad.productCode material,
ad.productCode materialName,
ad.mscsNum quantity,
ad.mctsTruck trainNumber
from ht_order_detail od

Loading…
Cancel
Save