Browse Source

修改自提提交

training
caoyizhong 1 year ago
parent
commit
f33410716b
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java
  2. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  4. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -21,6 +21,7 @@ import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.List;
/**
@ -49,6 +50,7 @@ public class DistrilbutionBillLadingVO extends DistrilbutionBillLadingEntity {
private String typeServiceName;
private String transport; //搬运
private String forklift; //叉车
private BigDecimal totalCost; //费用
private String stockupStatusName;
private String assignStatusName;

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -32,6 +32,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
@ -42,6 +43,7 @@ import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.web.bind.annotation.*;
@ -111,11 +113,12 @@ public class DistrilbutionBillLadingController extends BladeController {
List<DistrilbutionBillLadingVO> records = pages.getRecords();
records.forEach( i ->{
String typeService = i.getTypeService();
R<List<DictBiz>> distribution_type = dictBizClient.getList("distribution_type");
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, i.getTypeService());
i.setTypeServiceName(value);
// dictBizClient.getList("distribution_type");
if(!Objects.isNull(i.getTypeService())){
if(Func.isNotEmpty(typeService)){
DictBiz dictBiz = distribution_type.getData().get(Integer.parseInt(typeService) -1);
i.setTypeServiceName(dictBiz.getDictValue());
switch (Integer.parseInt(i.getConditions())){
case 1:
i.setConditionName("未通知");

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

@ -29,7 +29,7 @@
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee,dsa.total_number totalNumber,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time,dbl.consignee,dbl.delivery_document,dbl.conditions
dsa.brand,dsa.type_service typeService,dbl.pick_up_time,dbl.consignee,dbl.delivery_document,dbl.conditions,dbl.total_cost totalCost
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
<where>

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

@ -198,29 +198,29 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
} else {
//新增
distrilbutionBillLading.setAssignStatus(
StockAssignStatusConstant.weizhipai.getValue()
);
distrilbutionBillLading.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
distrilbutionBillLading.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
distrilbutionBillLading.setConsignee("1");
this.save(distrilbutionBillLading);
//修改订单状态
String[] split = distrilbutionBillLading.getStockArticleId().split(",");
for (String s : split) {
DistributionStockArticleEntity distributionStockArticle = new DistributionStockArticleEntity();
distributionStockArticle.setId(Long.parseLong(s));
if(StringUtils.isNotBlank(distrilbutionBillLading.getStockArticleId())){
String[] split = distrilbutionBillLading.getStockArticleId().split(",");
for (String s : split) {
DistributionStockArticleEntity distributionStockArticle = new DistributionStockArticleEntity();
distributionStockArticle.setId(Long.parseLong(s));
// distributionStockArticle.setOrderStatus(ServiceConstant.ORDER_STATE_TWO);
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
distributionStockArticle.setStockupStatus(StockupStatusConstant.daibeihuo.getValue());
distributionStockArticleService.updateById(distributionStockArticle);
//添加订单和提货单关联
DistrilbutionBillStockEntity distrilbutionBillStock = new DistrilbutionBillStockVO();
distrilbutionBillStock.setBillLadingId(distrilbutionBillLading.getId());
distrilbutionBillStock.setStockArticleId(Long.parseLong(s));
distrilbutionBillStock.setConditions("1");
distrilbutionBillStockService.save(distrilbutionBillStock);
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
distributionStockArticle.setStockupStatus(StockupStatusConstant.daibeihuo.getValue());
distributionStockArticleService.updateById(distributionStockArticle);
//添加订单和提货单关联
DistrilbutionBillStockEntity distrilbutionBillStock = new DistrilbutionBillStockVO();
distrilbutionBillStock.setBillLadingId(distrilbutionBillLading.getId());
distrilbutionBillStock.setStockArticleId(Long.parseLong(s));
distrilbutionBillStock.setConditions("1");
distrilbutionBillStockService.save(distrilbutionBillStock);
}
}
//操作图片
if(distrilbutionBillLading.getPrintList().size() > 0){
addPrint(distrilbutionBillLading);

Loading…
Cancel
Save