Browse Source

Merge branch 'dev' into pre-production

dev-pushdata-important
汤建军 1 year ago
parent
commit
2127948b24
  1. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  4. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -31,6 +31,7 @@ import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.excel.DistributionSignforOwnExcel;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.service.impl.DistributionAddvalueServiceImpl;
@ -85,6 +86,8 @@ public class DistributionSignforController extends BladeController {
private final IDistributionAsyncService distributionAsyncService;
private final IDistributionDeliveryListService distributionDeliveryListService;
/**
* 签收管理 详情
*/
@ -306,8 +309,11 @@ public class DistributionSignforController extends BladeController {
@ApiOperation(value = "修改", notes = "传入distributionSignfor")
public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
R r= distributionSignforService.recheck(distributionSignfor.getId());
R r= distributionSignforService.recheck(distributionSignfor);
if (r.isSuccess()){
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
}
// return R.status(distributionSignforService.updateById(distributionSignfor));
return r;
}

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

@ -1158,6 +1158,7 @@
ldsa.order_code,
ldrs.is_have_data,
ldsa.id AS id,
ldsa.waybill_number AS waybillNumber,
ldrs.is_zero
FROM
logpm_distribution_reservation AS lds

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

@ -244,7 +244,7 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* 推送签收信息到工厂
* @param id
*/
R recheck(Long id);
R recheck(DistributionSignforDTO distributionSignforDTO);
/**
* 查询是否可以进行复核签收

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -389,7 +389,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(packageLoadingMap.get(p.getId()))){
DistributionLoadscanEntity distributionLoadscanEntity = packageLoadingMap.get(p.getId());
detailDTO.setLoadingTime(distributionLoadscanEntity.getScanTime());
detailDTO.setLoadingStatusName(OrderPackageLoadingStatusConstant.weizhuancghe.getName());
detailDTO.setLoadingStatusName(OrderPackageLoadingStatusConstant.yizhuangche.getName());
if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
//签收
detailDTO.setSigningTime(distributionLoadscanEntity.getSigningTime());
@ -474,31 +474,32 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
@Transactional
public R recheck(Long id) {
public R recheck(DistributionSignforDTO distributionSignforDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail(403, "未授权!!!");
}
if (Func.isEmpty(id)){
log.error("参数缺失,signforId:{}",id);
if (Func.isEmpty(distributionSignforDTO.getId())){
log.error("参数缺失,signforId:{}",distributionSignforDTO.getId());
return null;
}
DistributionSignforEntity distributionSignfor = this.getById(id);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-dd-mm HH:mm:ss.SSS");
DistributionSignforEntity distributionSignfor = this.getById(distributionSignforDTO.getId());
BladeUser user = AuthUtil.getUser();
distributionSignfor.setExamineUserId(user.getUserId());
distributionSignfor.setSigningStatus(SignforStatusConstant.yiqianshou.getValue());
//复核时间为签收时间
distributionSignfor.setSigningTime(sdf.format(new Date()));
distributionSignfor.setExamineUserName(user.getNickName());
this.updateById(distributionSignfor);
distributionAsyncService.sendReviewFactory(id,myCurrentWarehouse.getName(), myCurrentWarehouse.getId());
this.updatePicture(distributionSignforDTO);
distributionAsyncService.sendReviewFactory(distributionSignforDTO.getId(),myCurrentWarehouse.getName(), myCurrentWarehouse.getId());
//还需要对未装车未签收的包件进行状态的回退
boolean flag = this.judgmentSignIsHavePackage(distributionSignfor.getReservationId());
if (!flag){
distributionAsyncService.releaseSource(distributionSignfor.getReservationId(), myCurrentWarehouse.getId());
}
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
return R.success("操作成功");
}

Loading…
Cancel
Save