问题修改,功能开发

This commit is contained in:
hayu 2025-07-15 20:38:48 +08:00
parent e2a645b3df
commit 3712da98c8
8 changed files with 106 additions and 3 deletions

View File

@ -499,4 +499,27 @@ public class SupDispatchCarController {
return service.deleteFile(dto.getData()); return service.deleteFile(dto.getData());
} }
/**
* 审核附件
* @param dto
* @return
*/
@PostMapping("examine")
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
public ServerResponse examine(EncryptedReq<CarPlanOutVo> dto) {
return service.examine(dto.getData());
}
/**
* 提交审核
* @param dto
* @return
*/
@PostMapping("toCheck")
@DecryptAndVerify(decryptedClass = CarPlanOutVo.class)
public ServerResponse toCheck(EncryptedReq<CarPlanOutVo> dto) {
return service.toCheck(dto.getData());
}
} }

View File

@ -191,4 +191,6 @@ public class CarNeedPlanVo extends ParentVo {
*/ */
private String licensePlate; private String licensePlate;
private String fileStatus;
} }

View File

@ -205,4 +205,18 @@ public interface SupDispatchCarMapper {
* @return * @return
*/ */
int deleteFile(CarPlanOutVo data); int deleteFile(CarPlanOutVo data);
/**
* 审核
* @param data
* @return
*/
int examine(CarPlanOutVo data);
/**
* 提交审核
* @param data
* @return
*/
int toCheck(CarPlanOutVo data);
} }

View File

@ -100,4 +100,18 @@ public interface SupDispatchCarService {
* @return * @return
*/ */
ServerResponse deleteFile(CarPlanOutVo data); ServerResponse deleteFile(CarPlanOutVo data);
/**
* 审核
* @param data
* @return
*/
ServerResponse examine(CarPlanOutVo data);
/**
* 派车审核
* @param data
* @return
*/
ServerResponse toCheck(CarPlanOutVo data);
} }

View File

@ -642,5 +642,37 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService {
} }
} }
@Override
public ServerResponse examine(CarPlanOutVo data) {
try {
data.setId(data.getId()+"-dh");
int res = mapper.examine(data);
if (res > 0){
return ServerResponse.createSuccess("审核成功", "审核成功");
} else {
return ServerResponse.createErroe("审核失败");
}
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("审核失败");
}
}
@Override
public ServerResponse toCheck(CarPlanOutVo data) {
try {
data.setId(data.getId()+"-dh");
int res = mapper.toCheck(data);
if (res > 0){
return ServerResponse.createSuccess("提交成功", "提交成功");
} else {
return ServerResponse.createErroe("提交失败");
}
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("提交失败");
}
}
} }

View File

@ -54,5 +54,7 @@ public class FileUploadVo {
*/ */
private String type; private String type;
private String status;
} }

View File

@ -95,6 +95,15 @@
WHERE id= #{planId} WHERE id= #{planId}
</update> </update>
<update id="examine">
update bm_file_upload set status=#{status}
WHERE own_id= #{id} and model_table='car_plan_out' and type='到货确认单'
</update>
<update id="toCheck">
update bm_file_upload set status=0
WHERE own_id= #{id} and model_table='car_plan_out' and type='到货确认单'
</update>
<delete id="delCarPlanOutData"> <delete id="delCarPlanOutData">
delete delete
from car_plan_out from car_plan_out
@ -307,12 +316,19 @@
<select id="getOutPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo"> <select id="getOutPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
select cpo.id,cpo.type,cpo.apply_id planId,cpa.code ,cpa.user_name userName , select cpo.id,cpo.type,cpo.apply_id planId,cpa.code ,cpa.user_name userName ,
cpa.create_time applyTime ,cpa.remark,cpo.out_time outTime ,cpo.dispatch_num dispatchNum,cpo.status, cpa.create_time applyTime ,cpa.remark,cpo.out_time outTime ,cpo.dispatch_num dispatchNum,cpo.status,
IFNULL(file.num ,0) fileNum,pro.name proName IFNULL(file.num ,0) fileNum,pro.name proName,
CASE
WHEN file.status IS NULL THEN '待上传'
WHEN file.status = 0 THEN '待审核'
WHEN file.status = 1 THEN '审核通过'
WHEN file.status = 2 THEN '审核驳回'
ELSE ''
END AS fileStatus
FROM car_plan_out cpo FROM car_plan_out cpo
left join car_plan_apply cpa on cpo.apply_id=cpa.id left join car_plan_apply cpa on cpo.apply_id=cpa.id
left join bm_project pro on pro.bid_id=cpa.pro_id left join bm_project pro on pro.bid_id=cpa.pro_id
left join( left join(
SELECT count(1) num ,own_id id,type from bm_file_upload SELECT count(1) num ,`status`,own_id id,type from bm_file_upload
where model_table='car_plan_out' AND type='到货确认单' where model_table='car_plan_out' AND type='到货确认单'
GROUP BY own_id GROUP BY own_id
)file on file.id=concat(cpo.id,'-dh') )file on file.id=concat(cpo.id,'-dh')

View File

@ -31,7 +31,7 @@
model_table, model_table,
own_id ownId , own_id ownId ,
suffix,type, suffix,type,
file_type fileType,create_name createName file_type fileType,create_name createName,`status`
from bm_file_upload from bm_file_upload
where own_id=#{ownId} and model_table=#{modelTable} where own_id=#{ownId} and model_table=#{modelTable}
<if test="type!=null and type!=''"> <if test="type!=null and type!=''">