|
|
@@ -9,6 +9,7 @@ import com.sckw.excel.utils.DateUtil;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
import com.sckw.transport.dao.*;
|
|
|
+import com.sckw.transport.model.KwtLogisticsOrderGoodsUnit;
|
|
|
import com.sckw.transport.model.KwtWaybillOrder;
|
|
|
import com.sckw.transport.model.KwtWaybillOrderTicket;
|
|
|
import com.sckw.transport.model.dto.WaybillOrderTicketLoadingDto;
|
|
|
@@ -124,11 +125,12 @@ public class KwtWaybillOrderTicketService {
|
|
|
/**
|
|
|
* 运单详情单证信息
|
|
|
* @param wOrderId 运单ID
|
|
|
+ * @param unit 运单委派单位
|
|
|
* @param deficitAmount 亏吨
|
|
|
* @param deficitRealAmount 扣亏量
|
|
|
* @return 单证信息
|
|
|
*/
|
|
|
- public WaybillTicketVO agreement(Long wOrderId, String deficitAmount, String deficitRealAmount) {
|
|
|
+ public WaybillTicketVO agreement(Long wOrderId, String unit, String deficitAmount, String deficitRealAmount) {
|
|
|
WaybillTicketVO waybillTicket = new WaybillTicketVO();
|
|
|
waybillTicket.setDeficitAmount(deficitAmount);
|
|
|
waybillTicket.setDeficitRealAmount(deficitRealAmount);
|
|
|
@@ -144,7 +146,9 @@ public class KwtWaybillOrderTicketService {
|
|
|
SysDictResDto sysDict = unitType != null ? unitType.get(e.getUnit()) : null;
|
|
|
waybillTicket.setLoadUrl(FileUtils.splice(e.getUrls()));
|
|
|
waybillTicket.setLoadTime(e.getOperateTime() == null ? null : DateUtil.getDateTime(e.getOperateTime()));
|
|
|
- loadLoading.add(new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount()));
|
|
|
+ WaybillOrderLoadingVO loadingVo = new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount());
|
|
|
+ loadingVo.setMain(unit.equals(e.getUnit()) ? true : false);
|
|
|
+ loadLoading.add(loadingVo);
|
|
|
});
|
|
|
waybillTicket.setLoadLoading(loadLoading);
|
|
|
}
|
|
|
@@ -154,7 +158,9 @@ public class KwtWaybillOrderTicketService {
|
|
|
SysDictResDto sysDict = unitType != null ? unitType.get(e.getUnit()) : null;
|
|
|
waybillTicket.setUnloadUrl(FileUtils.splice(e.getUrls()));
|
|
|
waybillTicket.setUnloadTime(e.getOperateTime() == null ? null : DateUtil.getDateTime(e.getOperateTime()));
|
|
|
- unloadLoading.add(new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount()));
|
|
|
+ WaybillOrderLoadingVO loadingVo = new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount());
|
|
|
+ loadingVo.setMain(unit.equals(e.getUnit()) ? true : false);
|
|
|
+ unloadLoading.add(loadingVo);
|
|
|
});
|
|
|
waybillTicket.setUnloadLoading(unloadLoading);
|
|
|
}
|
|
|
@@ -163,20 +169,23 @@ public class KwtWaybillOrderTicketService {
|
|
|
|
|
|
/**
|
|
|
* 单证信息
|
|
|
- * @param wOrderId 运单ID
|
|
|
+ * @param waybillOrder 运单
|
|
|
* @param type 单证类型
|
|
|
- * @return
|
|
|
+ * @return 运载信息
|
|
|
*/
|
|
|
- public List<WaybillOrderLoadingVO> agreement(Long wOrderId, int type) {
|
|
|
+ public List<WaybillOrderLoadingVO> agreement(KwtWaybillOrder waybillOrder, int type) {
|
|
|
+ //运载信息
|
|
|
List<WaybillOrderLoadingVO> loadLoading = new ArrayList<>();
|
|
|
//单位数据字典
|
|
|
Map<String, SysDictResDto> unitType = remoteSystemService.queryDictMapByType(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
//装载信息
|
|
|
- List<KwtWaybillOrderTicket> loading = waybillOrderTicketMapper.findWaybillOrderTicket(wOrderId, type);
|
|
|
+ List<KwtWaybillOrderTicket> loading = waybillOrderTicketMapper.findWaybillOrderTicket(waybillOrder.getId(), type);
|
|
|
if (CollectionUtils.isNotEmpty(loading)) {
|
|
|
loading.forEach(e -> {
|
|
|
SysDictResDto sysDict = unitType != null ? unitType.get(e.getUnit()) : null;
|
|
|
- loadLoading.add(new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount()));
|
|
|
+ WaybillOrderLoadingVO loadingVo = new WaybillOrderLoadingVO(e.getUnit(), sysDict != null ? sysDict.getLabel() : null, e.getAmount());
|
|
|
+ loadingVo.setMain(waybillOrder.getUnit().equals(e.getUnit()) ? true : false);
|
|
|
+ loadLoading.add(loadingVo);
|
|
|
});
|
|
|
}
|
|
|
return loadLoading;
|