|
|
@ -193,6 +193,7 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
for (SubDetailDictResultDTO entity:subDictList) { |
|
|
for (SubDetailDictResultDTO entity:subDictList) { |
|
|
String bigId = entity.getId(); //大项id
|
|
|
String bigId = entity.getId(); //大项id
|
|
|
List<SubDetailDictChildResultDTO> childList = entity.getChildDiction(); |
|
|
List<SubDetailDictChildResultDTO> childList = entity.getChildDiction(); |
|
|
|
|
|
if (childList.size()>0){ |
|
|
for (SubDetailDictChildResultDTO a: childList) { |
|
|
for (SubDetailDictChildResultDTO a: childList) { |
|
|
String childId = a.getId(); |
|
|
String childId = a.getId(); |
|
|
KpiSubCheckDetailResultDTO detailInfo = baseDao.selectCheckDetailFiles(infoId,bigId,childId); |
|
|
KpiSubCheckDetailResultDTO detailInfo = baseDao.selectCheckDetailFiles(infoId,bigId,childId); |
|
|
@ -200,11 +201,26 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
a.setImages(detailInfo.getImages()); |
|
|
a.setImages(detailInfo.getImages()); |
|
|
a.setFiles(detailInfo.getFiles()); |
|
|
a.setFiles(detailInfo.getFiles()); |
|
|
} |
|
|
} |
|
|
|
|
|
}else if (childList.size() == 0){ |
|
|
|
|
|
KpiSubCheckDetailResultDTO detailInfo = baseDao.selectCheckDetailFiles(infoId,bigId,""); |
|
|
|
|
|
entity.setDescribe(detailInfo.getCheckDescribe()); |
|
|
|
|
|
entity.setImages(detailInfo.getImages()); |
|
|
|
|
|
entity.setFiles(detailInfo.getFiles()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
return new Result<List<SubDetailDictResultDTO>>().ok(subDictList); |
|
|
return new Result<List<SubDetailDictResultDTO>>().ok(subDictList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Result<String[]> getInfogrid(String infoId) { |
|
|
|
|
|
String gridIds = baseDao.getSubInfoById(infoId); |
|
|
|
|
|
String [] ids = gridIds.split(","); |
|
|
|
|
|
System.out.println(ids); |
|
|
|
|
|
return new Result<String[]>().ok(ids); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* |
|
|
* |
|
|
* 存info表中数据 |
|
|
* 存info表中数据 |
|
|
@ -244,6 +260,7 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
checkInfoEntity.setParentDeptNames(deptLevelAndLeaderDto.getParentDeptNames()); |
|
|
checkInfoEntity.setParentDeptNames(deptLevelAndLeaderDto.getParentDeptNames()); |
|
|
checkInfoEntity.setAllDeptIds(deptLevelAndLeaderDto.getAllDeptIds()); |
|
|
checkInfoEntity.setAllDeptIds(deptLevelAndLeaderDto.getAllDeptIds()); |
|
|
checkInfoEntity.setAllDeptNames(deptLevelAndLeaderDto.getAllDeptNames()); |
|
|
checkInfoEntity.setAllDeptNames(deptLevelAndLeaderDto.getAllDeptNames()); |
|
|
|
|
|
checkInfoEntity.setCreatedTime(date); |
|
|
infoDao.insert(checkInfoEntity); |
|
|
infoDao.insert(checkInfoEntity); |
|
|
return checkInfoEntity.getId(); |
|
|
return checkInfoEntity.getId(); |
|
|
} |
|
|
} |
|
|
@ -261,10 +278,12 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
//一个infoid对应多个详情
|
|
|
//一个infoid对应多个详情
|
|
|
for (KpiSubCheckDetailChildFormDTO dto:detailList) { |
|
|
for (KpiSubCheckDetailChildFormDTO dto:detailList) { |
|
|
SubPositionCheckDetailEntity entity = new SubPositionCheckDetailEntity(); |
|
|
SubPositionCheckDetailEntity entity = new SubPositionCheckDetailEntity(); |
|
|
entity.setInfoId(infoId); |
|
|
entity.setInfoId(infoId); |
|
|
entity.setCheckDescribe(dto.getDesribe()); |
|
|
String d =dto.getDesribe(); |
|
|
|
|
|
System.out.println(d); |
|
|
|
|
|
entity.setCheckDescribe(d); |
|
|
entity.setPCheckItemName(dto.getPCheckItemName()); |
|
|
entity.setPCheckItemName(dto.getPCheckItemName()); |
|
|
entity.setCheckDescribe(dto.getCheckItemName()); |
|
|
entity.setCheckItemName(dto.getCheckItemName()); |
|
|
insert(entity); |
|
|
insert(entity); |
|
|
String detailId = entity.getId(); |
|
|
String detailId = entity.getId(); |
|
|
//进行图片和文件存储
|
|
|
//进行图片和文件存储
|
|
|
@ -339,6 +358,7 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
entity.setCheckTime(sdf1.format(date)); |
|
|
entity.setCheckTime(sdf1.format(date)); |
|
|
entity.setProcessCode("1"); |
|
|
entity.setProcessCode("1"); |
|
|
entity.setProcessName("提交"); |
|
|
entity.setProcessName("提交"); |
|
|
|
|
|
entity.setInfoId(infoId); |
|
|
logDao.insert(entity); |
|
|
logDao.insert(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -359,7 +379,7 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
//根据详情id查询所有文件信息
|
|
|
//根据详情id查询所有文件信息
|
|
|
fileImgDao.deleteByDetailId(detailId); |
|
|
fileImgDao.deleteByDetailId(detailId); |
|
|
//删除详情表所有相关数据
|
|
|
//删除详情表所有相关数据
|
|
|
baseDao.selectCheckDetailByInfoId(infoId); |
|
|
baseDao.deleteByInfoIdAfter(infoId); |
|
|
} |
|
|
} |
|
|
//添加相关数据
|
|
|
//添加相关数据
|
|
|
addDetailDate(infoId,dto.getInfoDetail()); |
|
|
addDetailDate(infoId,dto.getInfoDetail()); |
|
|
@ -378,9 +398,10 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
for (int i = 0; i < ids.length; i++) { |
|
|
for (int i = 0; i < ids.length; i++) { |
|
|
if (i == 0){ |
|
|
if (i == 0){ |
|
|
gridIds = ids[i]; |
|
|
gridIds = ids[i]; |
|
|
} |
|
|
}else { |
|
|
gridIds = gridIds +","+ ids[i]; |
|
|
gridIds = gridIds +","+ ids[i]; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
return gridIds; |
|
|
return gridIds; |
|
|
} |
|
|
} |
|
|
/* |
|
|
/* |
|
|
@ -398,9 +419,10 @@ public class SubPositionCheckDetailServiceImpl extends BaseServiceImpl<SubPositi |
|
|
String name = res.getData().getName(); |
|
|
String name = res.getData().getName(); |
|
|
if (i == 0){ |
|
|
if (i == 0){ |
|
|
gridNames = name; |
|
|
gridNames = name; |
|
|
} |
|
|
}else{ |
|
|
gridNames = gridNames +","+ name; |
|
|
gridNames = gridNames +","+ name; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
return gridNames; |
|
|
return gridNames; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|