Commit 97283a0d authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6

parents 479354d0 5d5dd0ab
......@@ -79,8 +79,8 @@ public class FileUploadController {
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domain);
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domainId);
}
/**
......
......@@ -17,7 +17,7 @@ public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
}
......@@ -40,7 +40,7 @@ public class FileUploadServiceImpl implements FileUploadService {
private final QrCodeUtil codeUtil;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
......@@ -70,7 +70,7 @@ public class FileUploadServiceImpl implements FileUploadService {
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo.setDomainId(domainId);
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
......
......@@ -846,12 +846,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (attaList != null) {
tAttaInfoService.deleteByDomainId(tPreEmpEducation.getId());
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(tPreEmpEducation.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdateBatch(attaList);
tAttaInfoService.saveBatch(attaList);
}
}
}
......@@ -921,12 +922,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (attaList != null) {
tAttaInfoService.deleteByDomainId(info.getId());
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdateBatch(attaList);
tAttaInfoService.saveBatch(attaList);
}
}
}
......@@ -950,12 +952,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 先删除后增加
tAttaInfoService.deleteByDomainId(mainId);
for (TAttaInfo info : attaInfoList) {
info.setId(null);
info.setDomainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdateBatch(attaInfoList);
tAttaInfoService.saveBatch(attaInfoList);
}
}
return R.ok("成功");
......@@ -1325,7 +1328,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
attaEmp.setCreateTime(LocalDateTime.now());
attaEmpList.add(attaEmp);
}
tAttaInfoService.saveOrUpdateBatch(attaList);
tAttaInfoService.saveBatch(attaEmpList);
}
return R.ok("成功!");
......
......@@ -330,7 +330,7 @@
,if(ed.INJURY_IDENTIFICATION=0,'是','否') field54,if(ed.OCCUPATIONAL_DISEASE_FLAG=0,'是','否') field55 ,ed.OCCUPATIONAL_DISEASE field56
,if(ed.INFECTIOUS_DISEASE_FLAG=0,'是','否') field57 ,ed.INFECTIOUS_NAME field58 ,if(ed.DISABILITY_FLAG=0,'是','否') field59
,ed.DISABILITY_NAME field60,ed.DISABILITY_LEVEL field61,if(ed.OTHER_FLAG=0,'是','否') field62,eb.REMARK field63
,ed.DISABILITY_NAME field60,disability_grade.label field61,if(ed.OTHER_FLAG=0,'是','否') field62,eb.REMARK field63
FROM t_complete_monitor a
left join t_employee_project p on a.DEPT_NO=p.DEPT_NO
left join (
......@@ -362,6 +362,7 @@
left join t_emp_education ee on e.id=ee.EMP_ID and ee.DELETE_FLAG = '0'
left join view_sys_dict_item education on education.value=ee.EDUCATION_NAME and education.type='education'
left join t_emp_disability_info ed on e.id=ed.EMP_ID and ed.DELETE_FLAG = '0'
left join view_sys_dict_item disability_grade on disability_grade.value=ed.DISABILITY_LEVEL and disability_grade.type='disability_grade'
left join t_emp_bad_record eb on e.id=eb.EMP_ID
left join (
select
......
......@@ -204,6 +204,7 @@
</if>
</if>
</where>
order by a.create_time desc
</select>
<select id="getTPreEmpMainCount" resultType="java.lang.Integer">
......@@ -306,7 +307,7 @@
,if(ed.INJURY_IDENTIFICATION=0,'是','否') field54,if(ed.OCCUPATIONAL_DISEASE_FLAG=0,'是','否') field55 ,ed.OCCUPATIONAL_DISEASE field56
,if(ed.INFECTIOUS_DISEASE_FLAG=0,'是','否') field57 ,ed.INFECTIOUS_NAME field58 ,if(ed.DISABILITY_FLAG=0,'是','否') field59
,ed.DISABILITY_NAME field60,ed.DISABILITY_LEVEL field61,if(ed.OTHER_FLAG=0,'是','否') field62,eb.REMARK field63
,ed.DISABILITY_NAME field60,disability_grade.label field61,if(ed.OTHER_FLAG=0,'是','否') field62,eb.REMARK field63
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.emp_Natrue and emp_natrue.type='emp_natrue'
......@@ -358,6 +359,7 @@
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join t_pre_emp_disability_info ed on a.id=ed.PRE_MAIN_ID
left join view_sys_dict_item disability_grade on disability_grade.value=ed.DISABILITY_LEVEL and disability_grade.type='disability_grade'
left join t_pre_emp_bad_record eb on a.id=eb.PRE_MAIN_ID
<where>
a.STATUS != '5'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment