导入时提示修改,删除附件接口

This commit is contained in:
18792927508
2023-10-19 14:05:15 +08:00
parent 29cc4e7af1
commit 3cc72198d9
7 changed files with 46 additions and 4 deletions
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -18,4 +19,5 @@ public interface CaseAttachMapper {
int updateCaseAttachBycaseid(CaseAttach caseAttach);
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
}
@@ -33,4 +33,6 @@ public interface ICaseEvidenceService {
AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList);
int deleteFile( List<Integer> fileIds);
}
@@ -419,15 +419,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
SmsUtils.sendSms(request);
}
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
return "该申请代理人已存在,与申请机构不匹配";
// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
if(null!=agentUser.getDept()&&StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
return "该申请代理人已在【" + agentUser.getDept().getDeptName()+"】申请机构下存在,请检查填写信息是否正确";
}else {
return "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确";
}
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
// 同步用户表和案件关联人表的手机号和名称
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
caseAffiliate.setNameAgent(agentUser.getNickName());
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
// 新增角色为申请人
if(agentUser.getRoleIds()!=null) {
List<Long> longList = Arrays.asList(agentUser.getRoleIds());
if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
List<Long> longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
if(!longList.contains(roleId)) {
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
SysUserRole sysUserRole = new SysUserRole();
@@ -265,6 +265,12 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
return null;
}
@Override
public int deleteFile( List<Integer> fileIds) {
return caseAttachMapper.deleteByFileIds(fileIds);
}
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
@@ -178,7 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
select u.* from sys_user u
select u.*,d.dept_name,ur.role_id
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
@@ -17,6 +17,13 @@
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
</insert>
<delete id="deleteByFileIds">
delete from case_attach
where annex_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account