|
@@ -26,8 +26,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import static com.ruoyi.common.constant.CommonConstants.LEADER;
|
|
|
-import static com.ruoyi.common.constant.CommonConstants.MANAGE;
|
|
|
+import static com.ruoyi.common.constant.CommonConstants.*;
|
|
|
|
|
|
/**
|
|
|
* 招商引资_情况月统计Service业务层处理
|
|
@@ -67,9 +66,9 @@ public class ZsyzQktjServiceImpl implements IZsyzQktjService {
|
|
|
zsyzQktj.setZsyzFjList(new ArrayList<>());
|
|
|
}else{
|
|
|
List<ZsyzFj> zsyzFjList = new ArrayList<>();
|
|
|
- //只拿type为6的附件
|
|
|
+ //只拿type为9的附件
|
|
|
for (ZsyzFj zsyzFj : zsyzQktj.getZsyzFjList()) {
|
|
|
- if(zsyzFj.getType().equals("6")){
|
|
|
+ if(zsyzFj.getType().equals(NIN)){
|
|
|
zsyzFjList.add(zsyzFj);
|
|
|
}
|
|
|
}
|
|
@@ -119,21 +118,16 @@ public class ZsyzQktjServiceImpl implements IZsyzQktjService {
|
|
|
zsyzQktj.setDeptId(user.getDeptId());
|
|
|
zsyzQktj.setDeptName(user.getDept().getDeptName());
|
|
|
zsyzQktj.setCreateTime(DateUtils.getNowDate());
|
|
|
- int count = zsyzQktjMapper.insertZsyzQktj(zsyzQktj);
|
|
|
+ zsyzQktjMapper.insertZsyzQktj(zsyzQktj);
|
|
|
//修改附件
|
|
|
if (zsyzQktj.getZsyzFjList() != null && zsyzQktj.getZsyzFjList().size() > 0) {
|
|
|
- ZsyzFj zsyzFjDelete = new ZsyzFj();
|
|
|
- zsyzFjDelete.setSourceId(zsyzQktj.getId());
|
|
|
- zsyzFjDelete.setType(CommonConstants.SIX);
|
|
|
- //先删除相关附件
|
|
|
- zsyzFjMapper.deleteZsyzFjBySourceId(zsyzFjDelete);
|
|
|
//再将文件新增进数据库
|
|
|
List<ZsyzFj> zsyzFjList = zsyzQktj.getZsyzFjList();
|
|
|
if (zsyzFjList != null) {
|
|
|
for (ZsyzFj zsyzFj : zsyzFjList) {
|
|
|
zsyzFj.setSourceId(zsyzQktj.getId());
|
|
|
- zsyzFj.setType(CommonConstants.SIX);
|
|
|
- zsyzFj.setXmId(0L);
|
|
|
+ zsyzFj.setType(NIN);
|
|
|
+ zsyzFj.setXmId(zsyzQktj.getId());
|
|
|
//zsyzFj.setXmbh(zsyzSbbzb.getXmbh());
|
|
|
zsyzFjMapper.insertZsyzFj(zsyzFj);
|
|
|
}
|
|
@@ -154,7 +148,8 @@ public class ZsyzQktjServiceImpl implements IZsyzQktjService {
|
|
|
//修改附件
|
|
|
ZsyzFj zsyzFjDelete = new ZsyzFj();
|
|
|
zsyzFjDelete.setSourceId(zsyzQktj.getId());
|
|
|
- zsyzFjDelete.setType(CommonConstants.SIX);
|
|
|
+ zsyzFjDelete.setType(NIN);
|
|
|
+ zsyzFjDelete.setXmId(zsyzQktj.getId());
|
|
|
//先删除相关附件
|
|
|
zsyzFjMapper.deleteZsyzFjBySourceId(zsyzFjDelete);
|
|
|
//再将文件新增进数据库
|
|
@@ -162,8 +157,8 @@ public class ZsyzQktjServiceImpl implements IZsyzQktjService {
|
|
|
if (zsyzFjList != null) {
|
|
|
for (ZsyzFj zsyzFj : zsyzFjList) {
|
|
|
zsyzFj.setSourceId(zsyzQktj.getId());
|
|
|
- zsyzFj.setType(CommonConstants.SIX);
|
|
|
- zsyzFj.setXmId(0L);
|
|
|
+ zsyzFj.setType(NIN);
|
|
|
+ zsyzFj.setXmId(zsyzQktj.getId());
|
|
|
zsyzFjMapper.insertZsyzFj(zsyzFj);
|
|
|
}
|
|
|
}
|