问题修改,功能开发

This commit is contained in:
hayu 2025-07-15 22:04:52 +08:00
parent 3712da98c8
commit dae2283de0
7 changed files with 36 additions and 14 deletions

View File

@ -219,4 +219,11 @@ public interface SupDispatchCarMapper {
* @return
*/
int toCheck(CarPlanOutVo data);
/**
* 修改文件状态
* @param params
* @return
*/
int updateOutFileStatus(String params);
}

View File

@ -176,7 +176,7 @@ public class CarPlanAuditServiceImpl implements CarPlanAuditService{
if (statusType == AuditNode.PLAN_DEPT || statusType == AuditNode.MGMT_CENTER) {
return sysAuditService.getUserPermission("car_plan", statusType);
} else if (statusType == AuditNode.EQUIP_DEPT) {
List<String> liftTeamUsers = Arrays.asList("项管中心1", "项管中心2");
List<String> liftTeamUsers = Arrays.asList("项管专责1", "项管专责2");
return liftTeamUsers.contains(userName);
} else if (statusType == AuditNode.LIFT_TEAM) {
return "王炜".contains(userName);

View File

@ -373,6 +373,7 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService {
JSONObject json = JSON.parseObject(params);
params = json.get("id").toString();
uploadService.uploadImage(files, params + "-dh", "car_plan_out", "到货确认单");
mapper.updateOutFileStatus(params);
return ServerResponse.createBySuccessMsg("上传成功");
} catch (Exception e) {
log.error(e.toString());
@ -645,7 +646,7 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService {
@Override
public ServerResponse examine(CarPlanOutVo data) {
try {
data.setId(data.getId()+"-dh");
// data.setId(data.getId()+"-dh");
int res = mapper.examine(data);
if (res > 0){
return ServerResponse.createSuccess("审核成功", "审核成功");
@ -661,7 +662,7 @@ public class SupDispatchCarServiceImpl implements SupDispatchCarService {
@Override
public ServerResponse toCheck(CarPlanOutVo data) {
try {
data.setId(data.getId()+"-dh");
// data.setId(data.getId()+"-dh");
int res = mapper.toCheck(data);
if (res > 0){
return ServerResponse.createSuccess("提交成功", "提交成功");

View File

@ -225,6 +225,9 @@ public class FileUploadService {
vo.setOwnId(outId);
vo.setModelTable(table);
vo.setType(type);
if (vo.getOwnId().contains("-dh")){
vo.setId(vo.getOwnId().replace("-dh",""));
}
list=mapper.getFileList(vo);
}catch (Exception e){
log.error(e.toString(),e);

View File

@ -17,7 +17,7 @@
left join car_plan_apply cpa on cpo.apply_id=cpa.id
LEFT JOIN car_supplier cs on cpo.sup_id=cs.id
left join bm_project pro on pro.bid_id=cpa.pro_id
where 1=1 and cpo.status=1
where 1=1 and cpo.status=2 and cpo.file_status=1
<if test="supName!=null and supName!=''">
and cs.name like concat('%',#{supName},'%')
</if>

View File

@ -96,12 +96,16 @@
</update>
<update id="examine">
update bm_file_upload set status=#{status}
WHERE own_id= #{id} and model_table='car_plan_out' and type='到货确认单'
update car_plan_out set file_status=#{status}
WHERE id= #{id}
</update>
<update id="toCheck">
update bm_file_upload set status=0
WHERE own_id= #{id} and model_table='car_plan_out' and type='到货确认单'
update car_plan_out set file_status=0
WHERE id= #{id}
</update>
<update id="updateOutFileStatus">
update car_plan_out set file_status=0
WHERE id= #{id}
</update>
<delete id="delCarPlanOutData">
@ -318,17 +322,17 @@
cpa.create_time applyTime ,cpa.remark,cpo.out_time outTime ,cpo.dispatch_num dispatchNum,cpo.status,
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 '审核驳回'
WHEN cpo.file_status IS NULL THEN '待上传'
WHEN cpo.file_status = 0 THEN '待审核'
WHEN cpo.file_status = 1 THEN '审核通过'
WHEN cpo.file_status = 2 THEN '审核驳回'
ELSE ''
END AS fileStatus
FROM car_plan_out cpo
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(
SELECT count(1) num ,`status`,own_id id,type from bm_file_upload
SELECT count(1) num ,own_id id,type from bm_file_upload
where model_table='car_plan_out' AND type='到货确认单'
GROUP BY own_id
)file on file.id=concat(cpo.id,'-dh')

View File

@ -31,7 +31,14 @@
model_table,
own_id ownId ,
suffix,type,
file_type fileType,create_name createName,`status`
file_type fileType,create_name createName,
(
SELECT
file_status
FROM
car_plan_out
WHERE id=#{id}
) as `status`
from bm_file_upload
where own_id=#{ownId} and model_table=#{modelTable}
<if test="type!=null and type!=''">