审核状态修改

This commit is contained in:
haozq 2025-01-21 18:43:26 +08:00
parent 36d7377cdc
commit e8b1bb6ea7
4 changed files with 13 additions and 15 deletions

View File

@ -99,7 +99,7 @@ public interface DispatchCarMapper {
*/
void updateCarPlanInfo(CarNeedPlanVo carNeedPlanVo);
void updatePlanInfo(CarPlanOutVo data);
void updatePlanInfo(CarNeedPlanVo data);
/**
* 查询批次修改记录数据

View File

@ -236,12 +236,12 @@ public class DispatchCarServiceImpl implements DispatchCarService{
if(num>0){
List<CarPlanOutVo> list=mapper.getAuditList(data);
if(ListHelpUtil.isEmpty(list)){
carNeedPlanVo.setStatus(3);
carNeedPlanVo.setStatus(2);
}else{
carNeedPlanVo.setStatus(1);
carNeedPlanVo.setStatus(0);
}
//更新计划状态
mapper.updatePlanInfo(data);
mapper.updatePlanInfo(carNeedPlanVo);
}
}else{
int num= mapper.updateDispatchData(data);
@ -251,9 +251,9 @@ public class DispatchCarServiceImpl implements DispatchCarService{
carNeedPlanVo.setDispatchDay(DateTimeHelper.getNowDay());
carNeedPlanVo.setDispatchNum(dispatchNum+vo.getDispatchNum());
if(ListHelpUtil.isEmpty(list)){
carNeedPlanVo.setStatus(2);
}else{
carNeedPlanVo.setStatus(1);
}else{
carNeedPlanVo.setStatus(2);
}
//更新计划信息
mapper.updateCarPlanInfo(carNeedPlanVo);

View File

@ -104,12 +104,6 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService{
fileMaps.put(key,fileList);
}
}
outVo.setCreator(userId);
outVo.setUpdater(userId);
int planType=outVo.getPlanType();
@ -233,6 +227,10 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService{
}
outVo.setDispatchNum(detailsVoList.size());
int num=mapper.updateDispatchCarData(outVo);
if(StringHelper.isNotEmpty(outVo.getStatus())){
mapper.updatePlanInfo(outVo);
}
if(num>0){
if(StringHelper.isNotEmpty(outVo.getDelFileId())){
uploadService.deleteFile(outVo.getDelFileId());

View File

@ -47,7 +47,7 @@
</insert>
<update id="updatePlanInfo">
update car_plan_apply set dispatch_status=0
WHERE id=#{planId}
WHERE id=#{planId}
</update>
<!--修改发车数据-->
<update id="updateDispatchCarData">
@ -98,7 +98,7 @@
need_num needNum, dispatch_num dispatchNum,need_num-dispatch_num-IFNULL(outData.num,0) noDispatchNum,
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName,
if(cpa.dispatch_num>0,'已派车',if(cpa.dispatch_status=0,'待审核','待派车')) statusName,
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=2,'已通过','已驳回') ) ) auditStatus
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已驳回','已驳回') ) ) auditStatus
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
@ -120,7 +120,7 @@
cpa.remark like concat('%',#{keyWord},'%') or
if(cpa.type=1,'车辆','吊车') like concat('%',#{keyWord},'%') or
if(cpa.dispatch_num>0,'已派车',if(cpa.dispatch_status=0,'待审核','待派车')) like concat('%',#{keyWord},'%') or
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=2,'已通过','已驳回') ) ) like concat('%',#{keyWord},'%')
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已通过','已驳回') ) ) like concat('%',#{keyWord},'%')
)
</if>