bug 修改
This commit is contained in:
parent
c363ec49f1
commit
a5e07e6b75
|
|
@ -5,6 +5,7 @@ import com.bonus.gzcar.business.backstage.service.CarPlanAuditService;
|
|||
import com.bonus.gzcar.business.utils.ExportExcelUtil;
|
||||
import com.bonus.gzcar.manager.annotation.DecryptAndVerify;
|
||||
import com.bonus.gzcar.manager.core.entity.EncryptedReq;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -33,19 +34,27 @@ public class CarPlanAuditController {
|
|||
|
||||
/**
|
||||
* 查询车辆审核记录集合
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getCarAuditList")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public PageInfo<CarNeedPlanVo> getCarAuditList(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarNeedPlanVo> list = service.getCarAuditList(dto.getData());;
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<CarNeedPlanVo> list = service.getCarAuditList(dto.getData());
|
||||
;
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
@GetMapping("getCarAuditById/{id}")
|
||||
public AjaxResult getCarAuditById(@PathVariable String id) {
|
||||
return service.getCarAuditById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求计划
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
|
|
@ -54,24 +63,26 @@ public class CarPlanAuditController {
|
|||
public void export(HttpServletResponse response, @RequestBody CarNeedPlanVo dto) {
|
||||
try {
|
||||
List<CarNeedPlanVo> list = service.getCarAuditList(dto);
|
||||
List<CarNeedPlanExportVo> exportVos=new ArrayList<CarNeedPlanExportVo>();
|
||||
List<CarNeedPlanExportVo> exportVos = new ArrayList<CarNeedPlanExportVo>();
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
CarNeedPlanExportVo copy=new CarNeedPlanExportVo();
|
||||
BeanUtils.copyProperties(vo,copy);
|
||||
copy.setSubTime(vo.getCreateTime());
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
exportVos.add(copy);
|
||||
});
|
||||
list.forEach(vo -> {
|
||||
CarNeedPlanExportVo copy = new CarNeedPlanExportVo();
|
||||
BeanUtils.copyProperties(vo, copy);
|
||||
copy.setSubTime(vo.getCreateTime());
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
exportVos.add(copy);
|
||||
});
|
||||
|
||||
ExportExcelUtil.export(response,"需求计划审核", CarNeedPlanExportVo.class,exportVos);
|
||||
ExportExcelUtil.export(response, "需求计划审核", CarNeedPlanExportVo.class, exportVos);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆审核详情
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -80,20 +91,25 @@ public class CarPlanAuditController {
|
|||
public ServerResponse getCarAuditDetails(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
return service.getCarAuditDetails(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆 申请 明细 查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getCapPlanDetailList")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public PageInfo<CarNeedPlanDetailVo> getCapPlanDetailList(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarNeedPlanDetailVo> list = service.getCapPlanDetailList(dto.getData());;
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<CarNeedPlanDetailVo> list = service.getCapPlanDetailList(dto.getData());
|
||||
;
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求计划-详情
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
|
|
@ -102,7 +118,7 @@ public class CarPlanAuditController {
|
|||
public void exportDetails(HttpServletResponse response, @RequestBody CarNeedPlanVo dto) {
|
||||
try {
|
||||
List<CarNeedPlanDetailVo> list = service.getCapPlanDetailList(dto);
|
||||
ExportExcelUtil.export(response,"申请明细", CarNeedPlanDetailVo.class,list);
|
||||
ExportExcelUtil.export(response, "申请明细", CarNeedPlanDetailVo.class, list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
|
|
@ -110,6 +126,7 @@ public class CarPlanAuditController {
|
|||
|
||||
/**
|
||||
* 车辆审核
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
package com.bonus.gzcar.business.backstage.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.gzcar.business.backstage.entity.*;
|
||||
import com.bonus.gzcar.business.backstage.service.DispatchCarService;
|
||||
import com.bonus.gzcar.business.utils.ExportExcelUtil;
|
||||
import com.bonus.gzcar.manager.annotation.DecryptAndVerify;
|
||||
import com.bonus.gzcar.manager.core.entity.EncryptedReq;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -34,19 +36,22 @@ public class DispatchCarController {
|
|||
|
||||
/**
|
||||
* 分页查询工程统计信息
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getProStatisticsList")
|
||||
@DecryptAndVerify(decryptedClass = DispatchCarVo.class)
|
||||
public PageInfo<DispatchCarVo> getProStatisticsList(EncryptedReq<DispatchCarVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<DispatchCarVo> list = service.getProStatisticsList(dto.getData());;
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<DispatchCarVo> list = service.getProStatisticsList(dto.getData());
|
||||
;
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param response
|
||||
* @param dto
|
||||
*/
|
||||
|
|
@ -54,7 +59,7 @@ public class DispatchCarController {
|
|||
public void export(HttpServletResponse response, @RequestBody DispatchCarVo dto) {
|
||||
try {
|
||||
List<DispatchCarVo> list = service.getProStatisticsList(dto);
|
||||
ExportExcelUtil.export(response,"派车管理", DispatchCarVo.class,list);
|
||||
ExportExcelUtil.export(response, "派车管理", DispatchCarVo.class, list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
|
|
@ -62,31 +67,41 @@ public class DispatchCarController {
|
|||
|
||||
|
||||
/**
|
||||
* 工程统计查询
|
||||
* 工程统计查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getProStatisticsDetails")
|
||||
@DecryptAndVerify(decryptedClass = DispatchCarVo.class)
|
||||
public ServerResponse getProStatisticsDetails(EncryptedReq<DispatchCarVo> dto) {
|
||||
return service.getProStatisticsDetails(dto.getData());
|
||||
return service.getProStatisticsDetails(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求计划集合-按照工程
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getNeedPlanList")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public PageInfo<CarNeedPlanVo> getNeedPlanList(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarNeedPlanVo> list = service.getNeedPlanList(dto.getData());;
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<CarNeedPlanVo> list = service.getNeedPlanList(dto.getData());
|
||||
;
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("getNeedPlanById/{id}")
|
||||
public AjaxResult getNeedPlanById(@PathVariable String id) {
|
||||
return service.getNeedPlanById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 工程需求计划
|
||||
*
|
||||
* @param response
|
||||
* @param dto
|
||||
*/
|
||||
|
|
@ -94,63 +109,67 @@ public class DispatchCarController {
|
|||
public void export2(HttpServletResponse response, @RequestBody CarNeedPlanVo dto) {
|
||||
try {
|
||||
List<CarNeedPlanVo> list = service.getNeedPlanList(dto);
|
||||
List<CarNeedPlanExport3Vo> export=new ArrayList<>();
|
||||
List<CarNeedPlanExport3Vo> export = new ArrayList<>();
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
CarNeedPlanExport3Vo exp=new CarNeedPlanExport3Vo();
|
||||
BeanUtils.copyProperties(vo,exp);
|
||||
list.forEach(vo -> {
|
||||
CarNeedPlanExport3Vo exp = new CarNeedPlanExport3Vo();
|
||||
BeanUtils.copyProperties(vo, exp);
|
||||
exp.setXh(num[0]);
|
||||
num[0]++;
|
||||
export.add(exp);
|
||||
});
|
||||
|
||||
ExportExcelUtil.export(response,"工程详情", CarNeedPlanExport3Vo.class,export);
|
||||
ExportExcelUtil.export(response, "工程详情", CarNeedPlanExport3Vo.class, export);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商重新分配
|
||||
* 计划下拉选
|
||||
* 供应商重新分配
|
||||
* 计划下拉选
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getPlanList")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public ServerResponse getPlanList(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
return service.getPlanList(dto.getData());
|
||||
return service.getPlanList(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 供应商分配
|
||||
* 前查询-需求计划申请明细
|
||||
* 供应商分配
|
||||
* 前查询-需求计划申请明细
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getPlanDetails")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public ServerResponse getPlanDetails(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
return service.getPlanDetails(dto.getData());
|
||||
return service.getPlanDetails(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加 计划
|
||||
* 添加供应商 分配
|
||||
* (重新分配)
|
||||
* type 1 火车 2 type=2吊车
|
||||
* type 1 火车 2 type=2吊车
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("addPlanSupInfo")
|
||||
@DecryptAndVerify(decryptedClass = CarNeedPlanVo.class)
|
||||
public ServerResponse addPlanSupInfo(EncryptedReq<CarNeedPlanVo> dto) {
|
||||
return service.addPlanSupInfo(dto.getData());
|
||||
return service.addPlanSupInfo(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待审核-批次
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -162,6 +181,7 @@ public class DispatchCarController {
|
|||
|
||||
/**
|
||||
* 车辆配送审核
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -173,44 +193,50 @@ public class DispatchCarController {
|
|||
|
||||
/**
|
||||
* 查询计划修改记录
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getUpdateList")
|
||||
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
|
||||
public ServerResponse getUpdateList(EncryptedReq<CarPlanOutVo> dto) {
|
||||
return service.getUpdateList(dto.getData());
|
||||
return service.getUpdateList(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划修改记录
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getRecordList")
|
||||
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
|
||||
public ServerResponse getRecordList(EncryptedReq<CarPlanOutVo> dto) {
|
||||
return service.getRecordList(dto.getData());
|
||||
return service.getRecordList(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划修改记录
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getRecordDetailsList")
|
||||
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
|
||||
public ServerResponse getRecordDetailsList(EncryptedReq<CarPlanOutVo> dto) {
|
||||
return service.getRecordDetailsList(dto.getData());
|
||||
return service.getRecordDetailsList(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除派车分配数据
|
||||
* 删除派车分配数据
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deleteData")
|
||||
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
|
||||
public ServerResponse deleteData(EncryptedReq<CarPlanOutVo> dto) {
|
||||
return service.deleteData(dto.getData());
|
||||
return service.deleteData(dto.getData());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public interface CarPlanAuditMapper {
|
|||
*/
|
||||
List<CarNeedPlanVo> getCarAuditList(CarNeedPlanVo data);
|
||||
|
||||
CarNeedPlanVo getCarAuditById (String id);
|
||||
/**
|
||||
* 查看审核详情
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 派车管理 接口层
|
||||
*
|
||||
* @author 黑子
|
||||
*/
|
||||
@Repository
|
||||
|
|
@ -15,15 +16,17 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询工程 统计
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<DispatchCarVo> getProStatisticsList(DispatchCarVo data);
|
||||
|
||||
Integer getProTypeNum(@Param("type") int type,@Param("proId")String proId);
|
||||
Integer getProTypeNum(@Param("type") int type, @Param("proId") String proId);
|
||||
|
||||
/**
|
||||
* 查询最后一次发货
|
||||
*
|
||||
* @param proId
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -31,6 +34,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 工程统计查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -38,13 +42,18 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarNeedPlanVo> getNeedPlanList(CarNeedPlanVo data);
|
||||
|
||||
|
||||
CarNeedPlanVo getNeedPlanById(String id);
|
||||
|
||||
/**
|
||||
* 查询 计划结合
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -52,6 +61,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询供应商 分配计划信息
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -61,6 +71,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 验证 供应商 是否存在合同及 车辆型号
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -68,6 +79,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询待审核
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -75,12 +87,14 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 修改审核状态
|
||||
*
|
||||
* @param vo
|
||||
*/
|
||||
int updateDispatchData(CarPlanOutVo vo);
|
||||
int updateDispatchData(CarPlanOutVo vo);
|
||||
|
||||
/**
|
||||
* 查询计划派车信息
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -88,6 +102,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询 本次审核的数据
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -95,6 +110,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 更新计划数据
|
||||
*
|
||||
* @param carNeedPlanVo
|
||||
*/
|
||||
void updateCarPlanInfo(CarNeedPlanVo carNeedPlanVo);
|
||||
|
|
@ -103,6 +119,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询批次修改记录数据
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -110,6 +127,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询修改记录详情
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -117,6 +135,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 修改记录详情查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -124,6 +143,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 计划查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -131,6 +151,7 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 校验
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -138,17 +159,18 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
int getPlanDispayNum(CarNeedPlanVo data);
|
||||
|
||||
|
||||
|
||||
CarNeedPlanVo getSupPlanData(CarNeedPlanVo data);
|
||||
|
||||
/**
|
||||
* 删除历史发货的
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
void deleteOutData(CarNeedPlanVo data);
|
||||
|
|
@ -161,12 +183,14 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 修改计划状态
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
void updatePlanData(CarNeedPlanVo data);
|
||||
|
||||
/**
|
||||
* 查询审核记录
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -174,12 +198,14 @@ public interface DispatchCarMapper {
|
|||
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
List<CarPlanOutVo> getData(CarPlanOutVo data);
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.gzcar.business.backstage.service;
|
|||
import com.bonus.gzcar.business.backstage.entity.AuditInfoDataVo;
|
||||
import com.bonus.gzcar.business.backstage.entity.CarNeedPlanDetailVo;
|
||||
import com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -18,6 +19,8 @@ public interface CarPlanAuditService {
|
|||
*/
|
||||
List<CarNeedPlanVo> getCarAuditList(CarNeedPlanVo data);
|
||||
|
||||
AjaxResult getCarAuditById (String id);
|
||||
|
||||
/**
|
||||
* 查看车辆 审核详情
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.gzcar.business.backstage.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.gzcar.business.backstage.entity.*;
|
||||
import com.bonus.gzcar.business.backstage.mapper.CarPlanAuditMapper;
|
||||
import com.bonus.gzcar.business.system.entity.AuditRecordVo;
|
||||
|
|
@ -7,6 +8,7 @@ import com.bonus.gzcar.business.system.service.AuditRecordService;
|
|||
import com.bonus.gzcar.business.system.service.SysAuditService;
|
||||
import com.bonus.gzcar.business.utils.ListHelpUtil;
|
||||
import com.bonus.gzcar.manager.common.util.UserUtil;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -43,6 +45,17 @@ public class CarPlanAuditServiceImpl implements CarPlanAuditService{
|
|||
return new ArrayList<CarNeedPlanVo>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getCarAuditById(String id) {
|
||||
try {
|
||||
CarNeedPlanVo carAuditById = mapper.getCarAuditById(id);
|
||||
return ObjectUtil.isNotEmpty(carAuditById)?AjaxResult.success(carAuditById):AjaxResult.error();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString());
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核详情查看
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.gzcar.business.backstage.service;
|
|||
import com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo;
|
||||
import com.bonus.gzcar.business.backstage.entity.CarPlanOutVo;
|
||||
import com.bonus.gzcar.business.backstage.entity.DispatchCarVo;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -33,6 +34,7 @@ public interface DispatchCarService {
|
|||
*/
|
||||
List<CarNeedPlanVo> getNeedPlanList(CarNeedPlanVo data);
|
||||
|
||||
AjaxResult getNeedPlanById(String id);
|
||||
/**
|
||||
* 查询计划集合
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.gzcar.business.backstage.service;
|
||||
|
||||
import cn.afterturn.easypoi.cache.manager.IFileLoader;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.gzcar.business.backstage.entity.*;
|
||||
import com.bonus.gzcar.business.backstage.mapper.DispatchCarMapper;
|
||||
import com.bonus.gzcar.business.system.entity.AuditRecordVo;
|
||||
|
|
@ -13,10 +14,13 @@ import com.bonus.gzcar.manager.common.util.RedisService;
|
|||
import com.bonus.gzcar.manager.common.util.StringHelper;
|
||||
import com.bonus.gzcar.manager.common.util.UserUtil;
|
||||
import com.bonus.gzcar.manager.security.entity.SelfUserEntity;
|
||||
import com.bonus.gzcar.manager.webResult.AjaxResult;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
|
@ -34,7 +38,7 @@ import java.util.Map;
|
|||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DispatchCarServiceImpl implements DispatchCarService{
|
||||
public class DispatchCarServiceImpl implements DispatchCarService {
|
||||
|
||||
@Autowired
|
||||
private DispatchCarMapper mapper;
|
||||
|
|
@ -45,67 +49,68 @@ public class DispatchCarServiceImpl implements DispatchCarService{
|
|||
|
||||
@Override
|
||||
public List<DispatchCarVo> getProStatisticsList(DispatchCarVo data) {
|
||||
List<DispatchCarVo> list=new ArrayList<>();
|
||||
try{
|
||||
list=mapper.getProStatisticsList(data);
|
||||
List<DispatchCarVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getProStatisticsList(data);
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
list.forEach(vo -> {
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
Integer ypcNum=mapper.getProTypeNum(1,vo.getProId());
|
||||
Integer dpcNum=mapper.getProTypeNum(2,vo.getProId());
|
||||
if(ypcNum==null){
|
||||
ypcNum=0;
|
||||
Integer ypcNum = mapper.getProTypeNum(1, vo.getProId());
|
||||
Integer dpcNum = mapper.getProTypeNum(2, vo.getProId());
|
||||
if (ypcNum == null) {
|
||||
ypcNum = 0;
|
||||
}
|
||||
if(dpcNum==null){
|
||||
dpcNum=0;
|
||||
if (dpcNum == null) {
|
||||
dpcNum = 0;
|
||||
}
|
||||
String lastDay=mapper.getLastDay(vo.getProId());
|
||||
if(StringHelper.isNotEmpty(lastDay)){
|
||||
String lastDay = mapper.getLastDay(vo.getProId());
|
||||
if (StringHelper.isNotEmpty(lastDay)) {
|
||||
vo.setLastDay(lastDay);
|
||||
}else{
|
||||
} else {
|
||||
vo.setLastDay("-");
|
||||
}
|
||||
|
||||
vo.setYpcNum(ypcNum);
|
||||
vo.setDpcNum(dpcNum);
|
||||
});
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getProStatisticsDetails(DispatchCarVo data) {
|
||||
Map<String,Object> map= Maps.newHashMap();
|
||||
try{
|
||||
DispatchCarVo vo=mapper.getProStatisticsDetails(data);
|
||||
if(vo!=null){
|
||||
String proId="";
|
||||
if(data!=null){
|
||||
proId=data.getProId();
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
try {
|
||||
DispatchCarVo vo = mapper.getProStatisticsDetails(data);
|
||||
if (vo != null) {
|
||||
String proId = "";
|
||||
if (data != null) {
|
||||
proId = data.getProId();
|
||||
}
|
||||
Integer ypcNum=mapper.getProTypeNum(1,proId);
|
||||
Integer dpcNum=mapper.getProTypeNum(2,proId);
|
||||
if(ypcNum==null){
|
||||
ypcNum=0;
|
||||
Integer ypcNum = mapper.getProTypeNum(1, proId);
|
||||
Integer dpcNum = mapper.getProTypeNum(2, proId);
|
||||
if (ypcNum == null) {
|
||||
ypcNum = 0;
|
||||
}
|
||||
if(dpcNum==null){
|
||||
dpcNum=0;
|
||||
if (dpcNum == null) {
|
||||
dpcNum = 0;
|
||||
}
|
||||
|
||||
map.put("dpcNum",dpcNum);
|
||||
map.put("ypcNum",ypcNum);
|
||||
map.put("planNum",vo.getPlanNum());
|
||||
map.put("needNum",vo.getNeedNum());
|
||||
map.put("dispatchNum",vo.getDispatchNum());
|
||||
map.put("noDispatchNum",vo.getNoDispatchNum());
|
||||
map.put("dpcNum", dpcNum);
|
||||
map.put("ypcNum", ypcNum);
|
||||
map.put("planNum", vo.getPlanNum());
|
||||
map.put("needNum", vo.getNeedNum());
|
||||
map.put("dispatchNum", vo.getDispatchNum());
|
||||
map.put("noDispatchNum", vo.getNoDispatchNum());
|
||||
|
||||
BigDecimal bd1 = new BigDecimal(dpcNum);
|
||||
BigDecimal bd0 = new BigDecimal(100);
|
||||
|
|
@ -115,124 +120,137 @@ public class DispatchCarServiceImpl implements DispatchCarService{
|
|||
BigDecimal result = bd1.divide(bd3, 2, RoundingMode.HALF_UP).multiply(bd0);
|
||||
BigDecimal result2 = bd2.divide(bd3, 2, RoundingMode.HALF_UP).multiply(bd0);
|
||||
|
||||
map.put("dpcRatio",result);
|
||||
map.put("ypcRatio",result2);
|
||||
}else{
|
||||
map.put("dpcRatio","0");
|
||||
map.put("ypcRatio","0");
|
||||
map.put("planNum","0");
|
||||
map.put("dpcNum","0");
|
||||
map.put("ypcNum","0");
|
||||
map.put("needNum","0");
|
||||
map.put("dispatchNum","0");
|
||||
map.put("noDispatchNum","0");
|
||||
map.put("dpcRatio", result);
|
||||
map.put("ypcRatio", result2);
|
||||
} else {
|
||||
map.put("dpcRatio", "0");
|
||||
map.put("ypcRatio", "0");
|
||||
map.put("planNum", "0");
|
||||
map.put("dpcNum", "0");
|
||||
map.put("ypcNum", "0");
|
||||
map.put("needNum", "0");
|
||||
map.put("dispatchNum", "0");
|
||||
map.put("noDispatchNum", "0");
|
||||
}
|
||||
}catch (Exception e){
|
||||
map.put("planNum","0");
|
||||
map.put("dpcNum","0");
|
||||
map.put("dpcRatio","0");
|
||||
map.put("ypcRatio","0");
|
||||
map.put("ypcNum","0");
|
||||
map.put("needNum","0");
|
||||
map.put("dispatchNum","0");
|
||||
map.put("noDispatchNum","0");
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
map.put("planNum", "0");
|
||||
map.put("dpcNum", "0");
|
||||
map.put("dpcRatio", "0");
|
||||
map.put("ypcRatio", "0");
|
||||
map.put("ypcNum", "0");
|
||||
map.put("needNum", "0");
|
||||
map.put("dispatchNum", "0");
|
||||
map.put("noDispatchNum", "0");
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return ServerResponse.createSuccess(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CarNeedPlanVo> getNeedPlanList(CarNeedPlanVo data) {
|
||||
try{
|
||||
try {
|
||||
return mapper.getNeedPlanList(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getNeedPlanById(String id) {
|
||||
try {
|
||||
CarNeedPlanVo needPlanById = mapper.getNeedPlanById(id);
|
||||
return ObjectUtil.isNotEmpty(needPlanById) ? AjaxResult.success(needPlanById) : AjaxResult.error();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getPlanList(CarNeedPlanVo data) {
|
||||
List<CarNeedPlanVo> list=new ArrayList<>();
|
||||
try{
|
||||
list= mapper.getPlanList(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
List<CarNeedPlanVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPlanList(data);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 计划 车辆详情
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getPlanDetails(CarNeedPlanVo data) {
|
||||
List<CarNeedPlanDetailVo> list=new ArrayList<>();
|
||||
try{
|
||||
list= mapper.getPlanDetails(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
List<CarNeedPlanDetailVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPlanDetails(data);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商 数据信息
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse addPlanSupInfo(CarNeedPlanVo data) {
|
||||
try{
|
||||
if(data.getType()==0){
|
||||
try {
|
||||
if (data.getType() == 0) {
|
||||
return ServerResponse.createErroe("吊车类型不能为空");
|
||||
}
|
||||
if(StringHelper.isEmpty(data.getContractId())){
|
||||
if (StringHelper.isEmpty(data.getContractId())) {
|
||||
return ServerResponse.createErroe("未上传合同id");
|
||||
}
|
||||
if(StringHelper.isEmpty(data.getSupName())){
|
||||
if (StringHelper.isEmpty(data.getSupName())) {
|
||||
return ServerResponse.createErroe("供应商名称不能为空");
|
||||
}
|
||||
Integer jsNum=mapper.validateSltNum(data.getId());
|
||||
if(jsNum!=null && jsNum>0){
|
||||
return ServerResponse.createErroe("该计划已被结算,不允许修改");
|
||||
Integer jsNum = mapper.validateSltNum(data.getId());
|
||||
if (jsNum != null && jsNum > 0) {
|
||||
return ServerResponse.createErroe("该计划已被结算,不允许修改");
|
||||
}
|
||||
int dispatNum=mapper.getPlanDispayNum(data);
|
||||
if( dispatNum>0){
|
||||
return ServerResponse.createErroe("该计划已派车、不允许重新分配");
|
||||
int dispatNum = mapper.getPlanDispayNum(data);
|
||||
if (dispatNum > 0) {
|
||||
return ServerResponse.createErroe("该计划已派车、不允许重新分配");
|
||||
}
|
||||
//吊车需要验证 供应商合同型号
|
||||
if(2==data.getType()){
|
||||
List<CarNeedPlanDetailVo> detailVos=mapper.getContractSupInfo(data);
|
||||
if(ListHelpUtil.isNotEmpty(detailVos)){
|
||||
CarNeedPlanDetailVo vo=detailVos.get(0);
|
||||
return ServerResponse.createErroe("供应商:"+data.getSupName()+"在合同中无"+vo.getName()+"-"+vo.getModel()+"车辆型号");
|
||||
if (2 == data.getType()) {
|
||||
List<CarNeedPlanDetailVo> detailVos = mapper.getContractSupInfo(data);
|
||||
if (ListHelpUtil.isNotEmpty(detailVos)) {
|
||||
CarNeedPlanDetailVo vo = detailVos.get(0);
|
||||
return ServerResponse.createErroe("供应商:" + data.getSupName() + "在合同中无" + vo.getName() + "-" + vo.getModel() + "车辆型号");
|
||||
}
|
||||
}
|
||||
|
||||
CarNeedPlanVo hisData=mapper.getSupPlanData(data);
|
||||
if(hisData!=null){
|
||||
String supId=hisData.getSupId();
|
||||
String contractId=hisData.getContractId();
|
||||
if(!supId.equals(data.getSupId()) || !contractId.equals(data.getContractId())){
|
||||
CarNeedPlanVo hisData = mapper.getSupPlanData(data);
|
||||
if (hisData != null) {
|
||||
String supId = hisData.getSupId();
|
||||
String contractId = hisData.getContractId();
|
||||
if (!supId.equals(data.getSupId()) || !contractId.equals(data.getContractId())) {
|
||||
deleteData(data);
|
||||
mapper.updatePlanData(data);
|
||||
}
|
||||
|
||||
}
|
||||
int num= mapper.addPlanSupInfo(data);
|
||||
if(num>0){
|
||||
int num = mapper.addPlanSupInfo(data);
|
||||
if (num > 0) {
|
||||
return ServerResponse.createBySuccessMsg("分配成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return ServerResponse.createErroe("分配失败");
|
||||
}
|
||||
|
||||
public void deleteData(CarNeedPlanVo data){
|
||||
public void deleteData(CarNeedPlanVo data) {
|
||||
mapper.deleteOutData(data);
|
||||
mapper.deleteOutDetails(data);
|
||||
mapper.deleteOutDataRecord(data);
|
||||
|
|
@ -319,81 +337,82 @@ public class DispatchCarServiceImpl implements DispatchCarService{
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getAuditList(CarPlanOutVo data) {
|
||||
try{
|
||||
List<CarPlanOutVo> list=mapper.getAuditListNew(data);
|
||||
return ServerResponse.createSuccess(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
try {
|
||||
List<CarPlanOutVo> list = mapper.getAuditListNew(data);
|
||||
return ServerResponse.createSuccess(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批次修改记录
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getUpdateList(CarPlanOutVo data) {
|
||||
try{
|
||||
List<CarPlanOutVo> list=mapper.getUpdateList(data);
|
||||
return ServerResponse.createSuccess(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
try {
|
||||
List<CarPlanOutVo> list = mapper.getUpdateList(data);
|
||||
return ServerResponse.createSuccess(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改记录查询
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getRecordList(CarPlanOutVo data) {
|
||||
List<CarNeedPlanDetailVo> list=new ArrayList<>();
|
||||
List<CarNeedPlanDetailVo> list = new ArrayList<>();
|
||||
try {
|
||||
list=mapper.getDispatchCarListData(data);
|
||||
}catch (Exception e){
|
||||
list = mapper.getDispatchCarListData(data);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString());
|
||||
}
|
||||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getRecordDetailsList(CarPlanOutVo data) {
|
||||
try{
|
||||
CarPlanOutVo vo=mapper.getDispatchCarData(data);
|
||||
if(vo!=null){
|
||||
List<FileUploadVo> fileList=uploadService.getFileList(vo.getOutId(),"car_plan_out","");
|
||||
try {
|
||||
CarPlanOutVo vo = mapper.getDispatchCarData(data);
|
||||
if (vo != null) {
|
||||
List<FileUploadVo> fileList = uploadService.getFileList(vo.getOutId(), "car_plan_out", "");
|
||||
vo.setFileList(fileList);
|
||||
List<CarPlanOutVoDetailsVo> list=mapper.getDispatchCarDetailsList(data);
|
||||
for (CarPlanOutVoDetailsVo detailsVo:list){
|
||||
List<FileUploadVo> fileList2=uploadService.getFileList(detailsVo.getDetailsId(),"car_plan_out_details","");
|
||||
List<CarPlanOutVoDetailsVo> list = mapper.getDispatchCarDetailsList(data);
|
||||
for (CarPlanOutVoDetailsVo detailsVo : list) {
|
||||
List<FileUploadVo> fileList2 = uploadService.getFileList(detailsVo.getDetailsId(), "car_plan_out_details", "");
|
||||
detailsVo.setFileList(fileList2);
|
||||
List<FileUploadVo> carImage=uploadService.getFileList(detailsVo.getCarId(),"car_supplier_info","");
|
||||
List<FileUploadVo> carImage = uploadService.getFileList(detailsVo.getCarId(), "car_supplier_info", "");
|
||||
detailsVo.setCarImage(carImage);
|
||||
List<FileUploadVo> driverUserImage=uploadService.getFileList(detailsVo.getDriverUserId(),"car_driver_info","");
|
||||
List<FileUploadVo> driverUserImage = uploadService.getFileList(detailsVo.getDriverUserId(), "car_driver_info", "");
|
||||
detailsVo.setDriverUserImage(driverUserImage);
|
||||
List<FileUploadVo> operaImage=uploadService.getFileList(detailsVo.getOperaUserId(),"car_driver_info","");
|
||||
List<FileUploadVo> operaImage = uploadService.getFileList(detailsVo.getOperaUserId(), "car_driver_info", "");
|
||||
detailsVo.setOperaImage(operaImage);
|
||||
}
|
||||
List<AuditRecordVo> record= recordService.getRecordList("out-"+data.getOutId());
|
||||
List<AuditRecordVo> record = recordService.getRecordList("out-" + data.getOutId());
|
||||
vo.setRecordList(record);
|
||||
vo.setDetailsVoList(list);
|
||||
}
|
||||
return ServerResponse.createSuccess("查询成功",vo);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return ServerResponse.createSuccess("查询成功", vo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return ServerResponse.createSuccess("查询失败",new CarPlanOutVo());
|
||||
return ServerResponse.createSuccess("查询失败", new CarPlanOutVo());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -47,6 +47,30 @@
|
|||
</if>
|
||||
ORDER BY cpa.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCarAuditById" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
|
||||
select
|
||||
cpa.id, cpa.code, cpa.type , cpa.pro_id proId, cpa.project_part projectPart, cpa.project_content projectContent,
|
||||
cpa.need_time needTime, cpa.creator,DATE_FORMAT(cpa.create_time,'%Y-%m-%d') appLyTime,pro.name proName,
|
||||
CASE WHEN cpa.status_type = '1' then '审核通过'
|
||||
WHEN cpa.status_type = '2' AND cpa.status = '1' then '待分公司审核'
|
||||
WHEN cpa.status_type = '2' AND cpa.status = '2' then '分公司审核通过'
|
||||
WHEN cpa.status_type = '2' AND cpa.status = '3' then '分公司审核驳回'
|
||||
WHEN cpa.status_type = '3' AND cpa.status = '1' then '待项目管理中心审核'
|
||||
WHEN cpa.status_type = '3' AND cpa.status = '2' then '项目管理中心审核通过'
|
||||
WHEN cpa.status_type = '3' AND cpa.status = '3' then '项目管理中心审核驳回'
|
||||
WHEN cpa.status_type = '4' AND cpa.status = '1' then '待机具公司审核'
|
||||
WHEN cpa.status_type = '4' AND cpa.status = '3' then '机具公司审核驳回'
|
||||
WHEN cpa.status_type = '0' AND cpa.status = '0' then '已撤回'
|
||||
END AS auditStatus,cpa.create_time createTime,
|
||||
cpa.remark, cpa.status, cpa.updater, cpa.update_time updateTime,
|
||||
if(cpa.type=1,'车辆','吊车') typeName ,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
where cpa.apply_type=0 and cpa.id = #{id}
|
||||
</select>
|
||||
<select id="getCarAuditDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
|
||||
select
|
||||
cpa.id, cpa.code, cpa.type , cpa.pro_id proId, cpa.project_part projectPart, cpa.project_content projectContent,
|
||||
|
|
|
|||
|
|
@ -137,6 +137,39 @@
|
|||
</if>
|
||||
order by cpa.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getNeedPlanById" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
|
||||
select cpa.id,
|
||||
cpa.code,
|
||||
cpa.type,
|
||||
cpa.pro_id proId,
|
||||
cpa.project_part projectPart,
|
||||
cpa.project_content projectContent,
|
||||
cpa.need_time needTime,
|
||||
cpa.creator,
|
||||
DATE_FORMAT(cpa.create_time, '%Y-%m-%d') appLyTime,
|
||||
pro.name proName,
|
||||
cpa.remark,
|
||||
cpa.updater,
|
||||
cpa.update_time updateTime,
|
||||
cpa.dispatch_day dispatchDay,
|
||||
if(cpa.type = 1, '运输车辆', '吊车') typeName,
|
||||
cpas.sup_id supId,
|
||||
IFNULL(cs.name, '-') supName,
|
||||
need_num needNum,
|
||||
dispatch_num dispatchNum,
|
||||
need_num - dispatch_num noDispatchNum,
|
||||
cpa.apply_type applyType,
|
||||
cpa.status_type statusType,
|
||||
cpa.user_name userName,
|
||||
if(cpa.dispatch_status = 0, '待审核', if(dispatch_num > 0, '已派车', '待派车')) statusName
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id = cpa.pro_id
|
||||
left join car_plan_apply_sup cpas on cpa.id = cpas.apply_id
|
||||
left join car_supplier cs on cs.id = cpas.sup_id
|
||||
where cpa.status_type = 1
|
||||
and cpa.id = #{id}
|
||||
</select>
|
||||
<!--计划-->
|
||||
<select id="getPlanList" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
|
||||
select cpa.id, cpa.code,cpas.sup_id supId,cpas.contract_id contractId,cpa.type
|
||||
|
|
|
|||
Loading…
Reference in New Issue