|
@@ -14,11 +14,8 @@ import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.TranTaskInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.TranTaskInfoMapper;
|
|
-import com.yh.saas.plugin.yiliangyiyun.service.ITranCarInfoService;
|
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.service.ITranProcessInfoService;
|
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.service.ITranTaskInfoService;
|
|
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.service.*;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
-import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -47,6 +44,10 @@ public class TranTaskInfoServiceImpl extends ServiceImpl<TranTaskInfoMapper, Tra
|
|
private ICommonBillOperateHisService billOperateHisService;
|
|
private ICommonBillOperateHisService billOperateHisService;
|
|
@Autowired
|
|
@Autowired
|
|
private IWarehouseBaseInfoService warehouseBaseInfoService;
|
|
private IWarehouseBaseInfoService warehouseBaseInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IContractManagementInfoService contractManagementInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IInOutWarehouseTaskService iInOutWarehouseTaskService;
|
|
/**
|
|
/**
|
|
* 创建运输任务
|
|
* 创建运输任务
|
|
* @param tranTaskInfo
|
|
* @param tranTaskInfo
|
|
@@ -271,21 +272,85 @@ public class TranTaskInfoServiceImpl extends ServiceImpl<TranTaskInfoMapper, Tra
|
|
return warehouseBaseInfoList;
|
|
return warehouseBaseInfoList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查合同号下拉列表
|
|
|
|
+ * flag(1船运 2火运)
|
|
|
|
+ * @param flag
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<String> selectTranTask(String flag) {
|
|
|
|
+ List<String> stringList=new ArrayList<>();
|
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList=contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
|
+ .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
|
+ .orderBy("update_date",false));
|
|
|
|
+ if (!CollectionUtils.isEmpty(contractManagementInfoList)) {
|
|
|
|
+ for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
|
|
+ Wrapper wrapper=new EntityWrapper();
|
|
|
|
+ wrapper.eq("contract_no", contractManagementInfo.getContractNo());
|
|
|
|
+ if ("1".equals(flag)){
|
|
|
|
+ wrapper.eq("tran_type","船运");
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ wrapper.eq("tran_type","火运");
|
|
|
|
+ }
|
|
|
|
+ List<TranProcessInfo> tranProcessInfos = tranProcessInfoService.selectList(wrapper);
|
|
|
|
+ if (!CollectionUtils.isEmpty(tranProcessInfos)){
|
|
|
|
+ for (TranProcessInfo tranProcessInfo:tranProcessInfos){
|
|
|
|
+ stringList.add(tranProcessInfo.getContractNo());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<InOutWarehouseTask> inOutWarehouseTaskList=iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
|
|
|
|
+ .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
|
+ .orderBy("update_date",false));
|
|
|
|
+ if (!CollectionUtils.isEmpty(inOutWarehouseTaskList)) {
|
|
|
|
+ for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
|
|
|
|
+ Wrapper wrapper=new EntityWrapper();
|
|
|
|
+ wrapper.eq("contract_no", inOutWarehouseTask.getMoveTaskNo());
|
|
|
|
+ if ("1".equals(flag)){
|
|
|
|
+ wrapper.eq("tran_type","船运");
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ wrapper.eq("tran_type","火运");
|
|
|
|
+ }
|
|
|
|
+ List<TranProcessInfo> tranProcessInfos = tranProcessInfoService.selectList(wrapper);
|
|
|
|
+ if (!CollectionUtils.isEmpty(tranProcessInfos)){
|
|
|
|
+ for (TranProcessInfo tranProcessInfo:tranProcessInfos){
|
|
|
|
+ stringList.add(tranProcessInfo.getContractNo());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ LinkedHashSet<String> hashSet = new LinkedHashSet<>(stringList);
|
|
|
|
+ ArrayList<String> listWithoutDuplicates = new ArrayList<>(hashSet);
|
|
|
|
+ return listWithoutDuplicates;
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 根据合同号查运输任务
|
|
* 根据合同号查运输任务
|
|
* @param contractNo
|
|
* @param contractNo
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<TranTaskInfo> selectTranTask(String contractNo) {
|
|
|
|
|
|
+ public List<TranTaskInfo> selectTask(String contractNo,String flag) {
|
|
List<TranTaskInfo> tranTaskInfoList=this.selectList(new EntityWrapper<TranTaskInfo>()
|
|
List<TranTaskInfo> tranTaskInfoList=this.selectList(new EntityWrapper<TranTaskInfo>()
|
|
- .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
|
- .eq("contract_no",contractNo)
|
|
|
|
- .orderBy("update_date",false));
|
|
|
|
|
|
+ .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
|
+ .eq("contract_no",contractNo)
|
|
|
|
+ .orderBy("update_date",false));
|
|
if (!CollectionUtils.isEmpty(tranTaskInfoList)){
|
|
if (!CollectionUtils.isEmpty(tranTaskInfoList)){
|
|
- for (TranTaskInfo tranTaskInfo:tranTaskInfoList){
|
|
|
|
- List<TranProcessInfo> tranProcessInfos = tranProcessInfoService.selectList(new EntityWrapper<TranProcessInfo>()
|
|
|
|
- .eq(TranProcessInfo.QueryFiles.INFO_ID, tranTaskInfo.getId()));
|
|
|
|
|
|
+ for (TranTaskInfo tranTaskInfo : tranTaskInfoList) {
|
|
|
|
+ Wrapper wrapper=new EntityWrapper();
|
|
|
|
+ if ("1".equals(flag)){
|
|
|
|
+ wrapper.eq("tran_type","船运");
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ wrapper.eq("tran_type","火运");
|
|
|
|
+ }
|
|
|
|
+ //查看运输阶段信息
|
|
|
|
+ wrapper.eq(TranProcessInfo.QueryFiles.INFO_ID,tranTaskInfo.getId())
|
|
|
|
+ .eq(TranProcessInfo.QueryFiles.DELETE_FLAG,NumberConstant.CONSTANT0)
|
|
|
|
+ .orderBy(TranProcessInfo.QueryFiles.SORT);
|
|
|
|
+ List<TranProcessInfo> tranProcessInfos = tranProcessInfoService.selectList(wrapper);
|
|
if (!CollectionUtils.isEmpty(tranProcessInfos)){
|
|
if (!CollectionUtils.isEmpty(tranProcessInfos)){
|
|
tranTaskInfo.setTranProcessInfoList(tranProcessInfos);
|
|
tranTaskInfo.setTranProcessInfoList(tranProcessInfos);
|
|
}
|
|
}
|