[修改] 封板!
This commit is contained in:
@@ -5,6 +5,7 @@ import com.adc.da.report.eo.PowerApply;
|
||||
import com.adc.da.report.service.IPowerApplyActService;
|
||||
import com.adc.da.report.service.IPowerApplyService;
|
||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||
import com.adc.da.report.vo.PowerApplyActPageVO;
|
||||
import com.adc.da.report.vo.PowerApplyPageVO;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
@@ -129,10 +130,10 @@ public class PowerApplyController {
|
||||
*/
|
||||
@PostMapping("/deleteAct")
|
||||
@ApiOperation(value = "单条/批量删除数据")
|
||||
public ResponseMessage deleteAct(@RequestBody DeleteParamRequestVO deleteParamRequestVO){
|
||||
public ResponseMessage deleteAct(@RequestBody PowerApplyActPageVO powerApplyActPageVO){
|
||||
|
||||
//单条/批量删除数据
|
||||
iPowerApplyActService.deleteById(deleteParamRequestVO);
|
||||
iPowerApplyActService.deleteByListPower(powerApplyActPageVO);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,5 +47,7 @@ public interface PowerApplyActDao extends BaseMapper<PowerApplyAct> {
|
||||
|
||||
List<PowerApplyActPageVO> selectListBydataId(@Param("dataId")String dataId);
|
||||
|
||||
List<PowerApplyActPageVO> selectListBydataIdNodel(@Param("dataId")String dataId);
|
||||
|
||||
int batchDel(@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.adc.da.report.service;
|
||||
|
||||
import com.adc.da.report.eo.PowerApplyAct;
|
||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||
import com.adc.da.report.vo.PowerApplyActPageVO;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
@@ -48,11 +47,11 @@ public interface IPowerApplyActService {
|
||||
|
||||
|
||||
/**
|
||||
* @param deleteParamVO
|
||||
* @param powerApplyActPageVO
|
||||
* @return void
|
||||
* @author bu
|
||||
* @date 2023-04-23
|
||||
* @description 根据id或id数组进行删除
|
||||
*/
|
||||
public void deleteById(DeleteParamRequestVO deleteParamVO);
|
||||
public void deleteByListPower(PowerApplyActPageVO powerApplyActPageVO);
|
||||
}
|
||||
|
||||
+10
-24
@@ -4,7 +4,6 @@ package com.adc.da.report.service.impl;
|
||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||
import com.adc.da.report.eo.PowerApplyAct;
|
||||
import com.adc.da.report.service.IPowerApplyActService;
|
||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||
import com.adc.da.report.vo.PowerApplyActPageVO;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -12,9 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -81,32 +78,21 @@ public class IpowerApplyActServiceImpl extends ServiceImpl<PowerApplyActDao, Pow
|
||||
}
|
||||
|
||||
/**
|
||||
* @param deleteParamVO
|
||||
* @param powerApplyActPageVO
|
||||
* @return void
|
||||
* @author bu
|
||||
* @date 2023-04-23
|
||||
* @description 根据id或id数组进行删除
|
||||
*/
|
||||
public void deleteById(DeleteParamRequestVO deleteParamVO) {
|
||||
if (ObjectUtils.isEmpty(deleteParamVO)) {
|
||||
return;
|
||||
}
|
||||
List<String> ids = new ArrayList<>();
|
||||
|
||||
if (!ObjectUtils.isEmpty(deleteParamVO.getId())) {
|
||||
ids.add(deleteParamVO.getId());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(deleteParamVO.getIds())) {
|
||||
ids.addAll(deleteParamVO.getIds());
|
||||
}
|
||||
if (ObjectUtils.isEmpty(deleteParamVO)) {
|
||||
return;
|
||||
}
|
||||
LambdaQueryWrapper<PowerApplyAct> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(PowerApplyAct::getId,ids);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
powerApplyAct.setDelFlag(1);
|
||||
baseMapper.update(powerApplyAct,wrapper);
|
||||
public void deleteByListPower(PowerApplyActPageVO powerApplyActPageVO) {
|
||||
List<PowerApplyAct> powerApplyList = powerApplyActPageVO.getPowerApplyList();
|
||||
for (PowerApplyAct powerApplyAct : powerApplyList) {
|
||||
LambdaQueryWrapper<PowerApplyAct> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PowerApplyAct::getPrcId,powerApplyAct.getPrcId());
|
||||
wrapper.eq(PowerApplyAct::getReportId,powerApplyAct.getReportId());
|
||||
powerApplyAct.setDelFlag(1);
|
||||
baseMapper.update(powerApplyAct,wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.report.vo;
|
||||
|
||||
import com.adc.da.report.eo.PowerApplyAct;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -16,6 +17,7 @@ import java.util.List;
|
||||
public class PowerApplyActPageVO extends BasePageVO {
|
||||
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 流程id
|
||||
*/
|
||||
@@ -137,4 +139,6 @@ public class PowerApplyActPageVO extends BasePageVO {
|
||||
private String fileSize;
|
||||
|
||||
private String name;
|
||||
|
||||
private List<PowerApplyAct> powerApplyList;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,13 @@
|
||||
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel
|
||||
from <include refid="TableName"/> a
|
||||
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
|
||||
where a.data_id = #{dataId} and a.del_flag = 0
|
||||
</select>
|
||||
<select id="selectListBydataIdNodel" resultType="com.adc.da.report.vo.PowerApplyActPageVO">
|
||||
select a.*,
|
||||
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel
|
||||
from <include refid="TableName"/> a
|
||||
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
|
||||
where a.data_id = #{dataId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+11
-4
@@ -391,14 +391,15 @@ public class TodoTaskController {
|
||||
*/
|
||||
@ApiOperation(value = "详情")
|
||||
@GetMapping("/queryDetail")
|
||||
public ResponseMessage queryDetail(@RequestParam("prcId") String prcId,@RequestParam("prcType")String prcType) {
|
||||
public ResponseMessage queryDetail(@RequestParam("prcId") String prcId, @RequestParam("prcType")String prcType,
|
||||
@RequestParam("tag") Integer tag) {
|
||||
List<BusProcessNew> busProcessNews = iBusProcessNewService.selectEOByTaskId(prcId);
|
||||
if (busProcessNews.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
BusProcessNew busProcessNew = busProcessNews.get(0);
|
||||
// 查找详细业务数据
|
||||
BusProcessNewVO busProcessNewVO = this.queryDetailDate(busProcessNew, prcType);
|
||||
BusProcessNewVO busProcessNewVO = this.queryDetailDate(busProcessNew, prcType,tag);
|
||||
//审批数据
|
||||
List<BusProcessApprove> busProcessApproves =
|
||||
busProcessApproveMapper.selectEoByPrcIdAndTask(busProcessNewVO.getPId());
|
||||
@@ -442,12 +443,18 @@ public class TodoTaskController {
|
||||
return busProcessNewVO;
|
||||
}
|
||||
|
||||
private BusProcessNewVO queryDetailDate(BusProcessNew busProcessNew, String prcType) {
|
||||
private BusProcessNewVO queryDetailDate(BusProcessNew busProcessNew, String prcType, Integer tag) {
|
||||
BusProcessNewVO busProcessNewVO = new BusProcessNewVO();
|
||||
BeanUtils.copyProperties(busProcessNew,busProcessNewVO);
|
||||
String dataId = busProcessNew.getDataId();
|
||||
if ("1".equals(prcType)){
|
||||
List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListBydataId(dataId);
|
||||
List<PowerApplyActPageVO> powerApplyActs = new ArrayList<>();
|
||||
if (tag == 1){
|
||||
//代办查看详情
|
||||
powerApplyActs = powerApplyActDao.selectListBydataIdNodel(dataId);
|
||||
}else {
|
||||
powerApplyActs = powerApplyActDao.selectListBydataId(dataId);
|
||||
}
|
||||
String string = JSONArray.toJSONString(powerApplyActs);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
|
||||
Reference in New Issue
Block a user