[修改] 报告上传部分接口调试

This commit is contained in:
bupengxiang
2023-05-06 09:30:46 +08:00
parent 0de7012353
commit 91c14e0489
8 changed files with 32 additions and 13 deletions
@@ -122,7 +122,7 @@ public class PowerApplyController {
} }
/** /**
* @param deleteParamRequestVO * @param powerApplyActPageVO
* @return com.adc.da.util.http.ResponseMessage * @return com.adc.da.util.http.ResponseMessage
* @author bu * @author bu
* @date 2023-04-23 * @date 2023-04-23
@@ -47,6 +47,8 @@ public interface PowerApplyActDao extends BaseMapper<PowerApplyAct> {
List<PowerApplyActPageVO> selectListBydataId(@Param("dataId")String dataId); List<PowerApplyActPageVO> selectListBydataId(@Param("dataId")String dataId);
List<PowerApplyActPageVO> selectListByPrcId(@Param("prcId")String prcId);
List<PowerApplyActPageVO> selectListBydataIdNodel(@Param("dataId")String dataId); List<PowerApplyActPageVO> selectListBydataIdNodel(@Param("dataId")String dataId);
List<PowerApplyAct> selectActListBydataId(@Param("dataId")String dataId); List<PowerApplyAct> selectActListBydataId(@Param("dataId")String dataId);
@@ -1,6 +1,8 @@
package com.adc.da.report.eo; package com.adc.da.report.eo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@@ -18,7 +20,7 @@ import java.util.List;
public class TtReportManageAct { public class TtReportManageAct {
@TableField(exist = false) @TableId(value = "id",type = IdType.UUID)
private String id; private String id;
/** /**
* 任务id * 任务id
@@ -90,16 +92,19 @@ public class TtReportManageAct {
/** /**
* *
*/ */
@TableField("createUserId")
private String createUserId; private String createUserId;
/** /**
* *
*/ */
@TableField("createDate")
private Date createDate; private Date createDate;
/** /**
* *
*/ */
@TableField("updateDate")
private Date updateDate = new Date(); private Date updateDate = new Date();
/** /**
@@ -109,14 +114,10 @@ public class TtReportManageAct {
private Integer delFlag; private Integer delFlag;
/**
* 创建人id
*/
@TableField("update_user_id")
private String updateUserId;
/** /**
* 权限设置 * 权限设置
*/ */
@TableField(exist = false)
private List<PowerApplyAct> powerList; private List<PowerApplyAct> powerList;
} }
@@ -118,4 +118,9 @@
from <include refid="TableName"/> a from <include refid="TableName"/> a
where a.data_id = #{dataId} and a.del_flag = 0 where a.data_id = #{dataId} and a.del_flag = 0
</select> </select>
<select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO">
select a.*
from <include refid="TableName"/> a
where a.prc_id = #{prcId} and a.del_flag = 0
</select>
</mapper> </mapper>
@@ -61,17 +61,20 @@ public class ActivitDefineService {
List<PowerApplyAct> powerApplyActs = new ArrayList<>(); List<PowerApplyAct> powerApplyActs = new ArrayList<>();
List<PowerApplyAct> powerList = ttReportManageAct.getPowerList(); List<PowerApplyAct> powerList = ttReportManageAct.getPowerList();
for (PowerApplyAct powerApplyAct : powerList) { for (PowerApplyAct powerApplyAct : powerList) {
if (StringUtils.isNotEmpty(powerApplyAct.getId())){ if (StringUtils.isEmpty(powerApplyAct.getId())){
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-","")); powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
powerApplyAct.setReportId(ttReportManageAct.getId());
powerApplyAct.setDataId(dataId); powerApplyAct.setDataId(dataId);
powerApplyAct.setTaskId(taskId); // powerApplyAct.setTaskId(taskId);
powerApplyAct.setPrcId(prcId); powerApplyAct.setPrcId(prcId);
powerApplyAct.setDelFlag(0); powerApplyAct.setDelFlag(0);
powerApplyAct.setCreateDate(new Date()); powerApplyAct.setCreateDate(new Date());
powerApplyActs.add(powerApplyAct); powerApplyActs.add(powerApplyAct);
} }
} }
powerApplyActDao.batchInsert(powerApplyActs); if (powerApplyActs.size()>0){
powerApplyActDao.batchInsert(powerApplyActs);
}
} }
return dataId; return dataId;
} }
@@ -446,7 +446,7 @@ public class TodoTaskController {
busProcessNewVO.setDataJson(string); busProcessNewVO.setDataJson(string);
}else if ("2".equals(prcType)){ }else if ("2".equals(prcType)){
TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId); TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId);
List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListBydataId(dataId); List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListByPrcId(ttReportManageActPageVO.getPrcId());
ttReportManageActPageVO.setPowerList(powerApplyActs); ttReportManageActPageVO.setPowerList(powerApplyActs);
String string = JSONArray.toJSONString(ttReportManageActPageVO); String string = JSONArray.toJSONString(ttReportManageActPageVO);
//去对应的 数据表查数据 //去对应的 数据表查数据
@@ -472,7 +472,7 @@ public class TodoTaskController {
busProcessNewVO.setDataJson(string); busProcessNewVO.setDataJson(string);
}else if("2".equals(prcType)){ }else if("2".equals(prcType)){
TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId); TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId);
List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListBydataId(dataId); List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListByPrcId(ttReportManageActPageVO.getPrcId());
ttReportManageActPageVO.setPowerList(powerApplyActs); ttReportManageActPageVO.setPowerList(powerApplyActs);
String string = JSONArray.toJSONString(ttReportManageActPageVO); String string = JSONArray.toJSONString(ttReportManageActPageVO);
//去对应的 数据表查数据 //去对应的 数据表查数据
@@ -46,7 +46,11 @@ public class BusProcessNameServiceImpl extends ServiceImpl<BusProcessNameMapper,
if(StringUtils.equals(FlowTypeEnum.BGQXSQLC.getValue(), prcType)){ if(StringUtils.equals(FlowTypeEnum.BGQXSQLC.getValue(), prcType)){
prcName = FlowTypeEnum.BGQXSQLC.getPrcName(); prcName = FlowTypeEnum.BGQXSQLC.getPrcName();
prcNum = FlowTypeEnum.BGQXSQLC.getPrcNum(); prcNum = FlowTypeEnum.BGQXSQLC.getPrcNum();
}else { }else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
prcName = FlowTypeEnum.SCBGLC.getPrcName();
prcNum = FlowTypeEnum.SCBGLC.getPrcNum();
}
else {
throw new ActivitiException("非法的流程类型: " + prcType); throw new ActivitiException("非法的流程类型: " + prcType);
} }
result.put("id",prcNum); result.put("id",prcNum);
@@ -92,6 +92,10 @@ public class ImpulseSenderUtils {
number = bgqxsqNumber.incrementAndGet(); number = bgqxsqNumber.incrementAndGet();
checkNumberLegitimate(number,"报告权限申请流程"); checkNumberLegitimate(number,"报告权限申请流程");
break; break;
case SCBGLC:
number = bgqxsqNumber.incrementAndGet();
checkNumberLegitimate(number,"上传报告流程");
break;
default: default:
throw new ActivitiException("流程类型 " + flowType + " 非法!"); throw new ActivitiException("流程类型 " + flowType + " 非法!");
} }