Browse Source

修改在库订单

dev-warehouse
caoyizhong 2 years ago
parent
commit
a50b6312e2
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  2. 14
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java
  3. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionCallDeliveryEntity.java
  4. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java
  5. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java
  6. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionCallDeliveryController.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockupDTO.java
  8. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  9. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  11. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionCallDeliveryServiceImpl.java
  12. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -168,7 +168,7 @@ public class DistributionDeliveryListEntity extends TenantEntity {
* 装卸班组id * 装卸班组id
*/ */
@ApiModelProperty(value = "装卸班组(id)") @ApiModelProperty(value = "装卸班组(id)")
private String loadingTeamId; private Long loadingTeamId;
/** /**
* 装卸班组(名称) * 装卸班组(名称)
*/ */

14
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java

@ -119,12 +119,22 @@ public class DistributionStockupEntity extends TenantEntity {
* 叉车司机 * 叉车司机
*/ */
@ApiModelProperty(value = "叉车司机") @ApiModelProperty(value = "叉车司机")
private Long forklift; private Long forkliftId;
/** /**
* 装卸班组 * 装卸班组
*/ */
@ApiModelProperty(value = "装卸班组") @ApiModelProperty(value = "装卸班组")
private Long loader; private Long loaderId;
/**
* 叉车司机
*/
@ApiModelProperty(value = "叉车司机")
private String forkliftName;
/**
* 装卸班组
*/
@ApiModelProperty(value = "装卸班组")
private String loaderName;
/** /**
* 确认完成备货时间 * 确认完成备货时间
*/ */

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionCallDeliveryEntity.java

@ -86,5 +86,10 @@ public class DistrilbutionCallDeliveryEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "运单号") @ApiModelProperty(value = "运单号")
private String waybillNumber; private String waybillNumber;
/**
* 在库订单id
*/
@ApiModelProperty(value = "在库订单id")
private String stockArticleId;
} }

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java

@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.*;
* @since 2023-06-15 * @since 2023-06-15
*/ */
@FeignClient( @FeignClient(
value = "logpm-distribution" value = "logpm-distribution-cyz"
) )
public interface IDistributionStockListClient { public interface IDistributionStockListClient {

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java

@ -92,6 +92,7 @@ public class DistributionStockupController extends BladeController {
BladeUser u = new BladeUser(); BladeUser u = new BladeUser();
u.setDeptId(user.getDeptId()); u.setDeptId(user.getDeptId());
u.setTenantId(user.getTenantId()); u.setTenantId(user.getTenantId());
u.setUserName(user.getUserName());
return R.data(u); return R.data(u);
} }

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionCallDeliveryController.java

@ -16,6 +16,8 @@
*/ */
package com.logpm.distribution.controller; package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -75,7 +77,13 @@ public class DistrilbutionCallDeliveryController extends BladeController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distrilbutionCallDelivery") @ApiOperation(value = "分页", notes = "传入distrilbutionCallDelivery")
public R<IPage<DistrilbutionCallDeliveryEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distrilbutionCallDelivery, Query query) { public R<IPage<DistrilbutionCallDeliveryEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distrilbutionCallDelivery, Query query) {
IPage<DistrilbutionCallDeliveryEntity> pages = distrilbutionCallDeliveryService.page(Condition.getPage(query), Condition.getQueryWrapper(distrilbutionCallDelivery, DistrilbutionCallDeliveryEntity.class)); Object o = distrilbutionCallDelivery.get("waybillNumber");
if(ObjectUtils.isNotNull(o)){
distrilbutionCallDelivery.put("waybillNumber",null);
}
QueryWrapper<DistrilbutionCallDeliveryEntity> queryWrapper = Condition.getQueryWrapper(distrilbutionCallDelivery, DistrilbutionCallDeliveryEntity.class);
queryWrapper.in(ObjectUtils.isNotEmpty(o),"waybill_number",o);
IPage<DistrilbutionCallDeliveryEntity> pages = distrilbutionCallDeliveryService.page(Condition.getPage(query), queryWrapper);
return R.data(pages); return R.data(pages);
} }

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockupDTO.java

@ -69,7 +69,7 @@ public class DistributionStockupDTO extends DistributionStockupEntity {
* 预约单编号 * 预约单编号
*/ */
@ApiModelProperty(value = "班组编号") @ApiModelProperty(value = "班组编号")
private String loaderId; private Long loaderId;
/** /**
* 班组名称 * 班组名称

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

@ -25,8 +25,8 @@
<result column="reserve4" property="reserve4"/> <result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/> <result column="reserve5" property="reserve5"/>
<result column="goods_area_id" property="goodsAreaId"/> <result column="goods_area_id" property="goodsAreaId"/>
<result column="forklift" property="forklift"/> <result column="forklift" property="forkliftId"/>
<result column="loader" property="loader"/> <result column="loader" property="loaderId"/>
<result column="fix_time" property="fixTime"/> <result column="fix_time" property="fixTime"/>
<result column="assign_time" property="assignTime"/> <result column="assign_time" property="assignTime"/>
</resultMap> </resultMap>
@ -36,11 +36,11 @@
select * from logpm_distribution_stockup where is_deleted = 0 select * from logpm_distribution_stockup where is_deleted = 0
</select> </select>
<select id="pageList" resultType="com.logpm.distribution.vo.DistributionStockupVO"> <select id="pageList" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select lds.id,lds.stockup_date , lds.stockup_user , lds.stockup_status , lds.stockup_area , lds.assign_status , lds.stockip_allocation , lds.goods_area_id , lds.forklift , select lds.id,lds.stockup_date , lds.stockup_user , lds.stockup_status , lds.stockup_area , lds.assign_status , lds.stockip_allocation , lds.goods_area_id , lds.forklift_name ,
lds.loader ,lds.fix_time ,lds.assign_time,lwga.headline,btg.group_name lds.loader_name , lds.forklift_id ,lds.loader_id ,lds.fix_time ,lds.assign_time,lwga.headline,btg.group_name
from logpm_distribution_stockup lds from logpm_distribution_stockup lds
LEFT JOIN logpm_warehouse_goods_area lwga ON lds.stockup_area = lwga.id LEFT JOIN logpm_warehouse_goods_area lwga ON lds.stockup_area = lwga.id
LEFT JOIN logpm_basicdata_team_group btg ON lds.loader = btg.id LEFT JOIN logpm_basicdata_team_group btg ON lds.loader_id = btg.id
<where> <where>
lds.tenant_id = #{param.tenantId} lds.tenant_id = #{param.tenantId}
</where> </where>

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

@ -366,7 +366,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionStockupEntity distributionStockupEntity = Func.copy(stockup, DistributionStockupEntity.class); DistributionStockupEntity distributionStockupEntity = Func.copy(stockup, DistributionStockupEntity.class);
distributionStockupEntity.setAssignStatus(ServiceConstant.STOCkUP_ASSIGNSTATUS_ALREADY); distributionStockupEntity.setAssignStatus(ServiceConstant.STOCkUP_ASSIGNSTATUS_ALREADY);
distributionStockupEntity.setAssignTime(new Date()); distributionStockupEntity.setAssignTime(new Date());
distributionStockupEntity.setForklift(stockup.getForkliftId()); distributionStockupEntity.setForkliftId(stockup.getForkliftId());
distributionStockupEntity.setStockupUser(AuthUtil.getUserId().toString()); distributionStockupEntity.setStockupUser(AuthUtil.getUserId().toString());
distributionStockupEntity.setStockupStatus(ServiceConstant.STOCKUP_STATE_WAIT_EXECUTION); distributionStockupEntity.setStockupStatus(ServiceConstant.STOCKUP_STATE_WAIT_EXECUTION);
distributionStockupEntity.setTypeService(ServiceConstant.DELIVERY_TYPE_CUSTOMER); distributionStockupEntity.setTypeService(ServiceConstant.DELIVERY_TYPE_CUSTOMER);
@ -767,8 +767,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//1、添加配送任务 //1、添加配送任务
DistributionStockupDTO stockup = allocationDTO.getStockup(); DistributionStockupDTO stockup = allocationDTO.getStockup();
DistributionStockupEntity stockupEntity = Func.copy(stockup, DistributionStockupEntity.class); DistributionStockupEntity stockupEntity = Func.copy(stockup, DistributionStockupEntity.class);
stockupEntity.setForklift(stockup.getForkliftId()); stockupEntity.setForkliftId(stockup.getForkliftId());
stockupEntity.setLoader(Long.parseLong(stockup.getLoaderId())); stockupEntity.setLoaderId(stockup.getLoaderId());
stockupEntity.setTeamResponsibility(stockup.getLoadAndUnload()); stockupEntity.setTeamResponsibility(stockup.getLoadAndUnload());
stockupEntity.setStockupDate(stockup.getStockupDate()); stockupEntity.setStockupDate(stockup.getStockupDate());
//设置类型为商配 //设置类型为商配

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

@ -175,7 +175,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
public DistributionStockListVO getQueryData(Long storeId, Long clientId,Long materialId) { public DistributionStockListVO getQueryData(Long storeId, Long clientId,Long materialId) {
DistributionStockListVO distributionStockListVO = new DistributionStockListVO(); DistributionStockListVO distributionStockListVO = new DistributionStockListVO();
List<DistributionStockListEntity> list = new ArrayList<>(); List<DistributionStockListEntity> list = new ArrayList<>();
if(Func.isNotEmpty(storeId)){ if(Func.isNotEmpty(storeId) && storeId != -1){
//门店 //门店
list = baseMapper.selectList(Wrappers.<DistributionStockListEntity>query().lambda() list = baseMapper.selectList(Wrappers.<DistributionStockListEntity>query().lambda()
.eq(DistributionStockListEntity::getStoreId,storeId)//门店 .eq(DistributionStockListEntity::getStoreId,storeId)//门店

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionCallDeliveryServiceImpl.java

@ -17,7 +17,9 @@
package com.logpm.distribution.service.impl; package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistrilbutionCallDeliveryEntity; import com.logpm.distribution.entity.DistrilbutionCallDeliveryEntity;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.DistrilbutionCallDeliveryVO; import com.logpm.distribution.vo.DistrilbutionCallDeliveryVO;
import com.logpm.distribution.excel.DistrilbutionCallDeliveryExcel; import com.logpm.distribution.excel.DistrilbutionCallDeliveryExcel;
import com.logpm.distribution.mapper.DistrilbutionCallDeliveryMapper; import com.logpm.distribution.mapper.DistrilbutionCallDeliveryMapper;
@ -49,6 +51,8 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
// private final SmsTemplate smsTemplate; // private final SmsTemplate smsTemplate;
private final IDistributionStockArticleService distributionStockArticleService;
@Override @Override
public IPage<DistrilbutionCallDeliveryVO> selectDistrilbutionCallDeliveryPage(IPage<DistrilbutionCallDeliveryVO> page, DistrilbutionCallDeliveryVO distrilbutionCallDelivery) { public IPage<DistrilbutionCallDeliveryVO> selectDistrilbutionCallDeliveryPage(IPage<DistrilbutionCallDeliveryVO> page, DistrilbutionCallDeliveryVO distrilbutionCallDelivery) {
return page.setRecords(baseMapper.selectDistrilbutionCallDeliveryPage(page, distrilbutionCallDelivery)); return page.setRecords(baseMapper.selectDistrilbutionCallDeliveryPage(page, distrilbutionCallDelivery));
@ -66,7 +70,7 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
@Override @Override
public Boolean ownSaveOrUpdate(DistrilbutionCallDeliveryEntity distrilbutionCallDelivery) { public Boolean ownSaveOrUpdate(DistrilbutionCallDeliveryEntity distrilbutionCallDelivery) {
if(ObjectUtils.isNotNull(distrilbutionCallDelivery.getWaybillNumber())){ if(ObjectUtils.isNotNull(distrilbutionCallDelivery.getStockArticleId())){
//短信通知 //短信通知
// Map<String, String> param = Kv.newMap(); // Map<String, String> param = Kv.newMap();
// param.put("code", "2333"); // param.put("code", "2333");
@ -82,11 +86,13 @@ public class DistrilbutionCallDeliveryServiceImpl extends BaseServiceImpl<Distri
// } // }
// return true; // return true;
// } // }
String[] split = distrilbutionCallDelivery.getWaybillNumber().split(","); String[] split = distrilbutionCallDelivery.getStockArticleId().split(",");
for (String s : split) { for (String s : split) {
DistributionStockArticleEntity byId = distributionStockArticleService.getById(s);
DistrilbutionCallDeliveryEntity deliveryEntity = new DistrilbutionCallDeliveryEntity(); DistrilbutionCallDeliveryEntity deliveryEntity = new DistrilbutionCallDeliveryEntity();
BeanUtils.copyProperties(distrilbutionCallDelivery,deliveryEntity); BeanUtils.copyProperties(distrilbutionCallDelivery,deliveryEntity);
deliveryEntity.setWaybillNumber(s); deliveryEntity.setWaybillNumber(byId.getWaybillNumber());
deliveryEntity.setStockArticleId(s);
this.save(deliveryEntity); this.save(deliveryEntity);
} }
return true; return true;

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -225,7 +225,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
// distributionStockListEntity.setMarketCode(warehousingEntryDTO.get);//商场编码 // distributionStockListEntity.setMarketCode(warehousingEntryDTO.get);//商场编码
distributionStockListEntity.setMarketName(warehousingEntryDTO.getCustomerName());//商场名称 distributionStockListEntity.setMarketName(warehousingEntryDTO.getCustomerName());//商场名称
// distributionStockListEntity.setStoreCode("门店编码");//门店编码 // distributionStockListEntity.setStoreCode(warehousingEntryDTO.getStore);//门店编码
distributionStockListEntity.setStoreName(warehousingEntryDTO.getStoreName());//门店名称 distributionStockListEntity.setStoreName(warehousingEntryDTO.getStoreName());//门店名称
// distributionStockListEntity.setFactory("工厂车次");//工厂车次 // distributionStockListEntity.setFactory("工厂车次");//工厂车次
distributionStockListEntity.setCategory("品分类");//品分类 distributionStockListEntity.setCategory("品分类");//品分类

Loading…
Cancel
Save