Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
@@ -263,6 +263,39 @@ public class CaseApplication extends BaseEntity {
|
||||
|
||||
private List<Integer> caseStatusList;
|
||||
|
||||
private List<Integer> annexTypeList;
|
||||
|
||||
private Integer annexType;
|
||||
|
||||
public Integer getAnnexType() {
|
||||
return annexType;
|
||||
}
|
||||
|
||||
public void setAnnexType(Integer annexType) {
|
||||
this.annexType = annexType;
|
||||
}
|
||||
|
||||
public List<Integer> getAnnexTypeList() {
|
||||
return annexTypeList;
|
||||
}
|
||||
|
||||
public void setAnnexTypeList(List<Integer> annexTypeList) {
|
||||
this.annexTypeList = annexTypeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 案件附件列表
|
||||
*/
|
||||
private List<CaseAttach> caseAttachList;
|
||||
|
||||
public List<CaseAttach> getCaseAttachList() {
|
||||
return caseAttachList;
|
||||
}
|
||||
|
||||
public void setCaseAttachList(List<CaseAttach> caseAttachList) {
|
||||
this.caseAttachList = caseAttachList;
|
||||
}
|
||||
|
||||
public List<Integer> getCaseStatusList() {
|
||||
return caseStatusList;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
|
||||
import java.util.List;
|
||||
@@ -8,4 +9,9 @@ public interface CaseAttachMapper {
|
||||
int save(CaseAttach caseAttach);
|
||||
|
||||
List<CaseAttach> queryAnnexPathByCaseId(Long id);
|
||||
|
||||
List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
|
||||
|
||||
|
||||
int updateCaseAttach(CaseAttach caseAttach);
|
||||
}
|
||||
|
||||
+40
-8
@@ -6,14 +6,8 @@ import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -42,6 +36,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@Autowired
|
||||
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
@@ -69,6 +68,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
|
||||
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
||||
if(caseAttachList!=null&&caseAttachList.size()>0){
|
||||
for (CaseAttach caseAttach : caseAttachList){
|
||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
@@ -118,6 +126,30 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
arbitrateRecord.setCaseAppliId(caseApplication.getId());
|
||||
ArbitrateRecord arbitrateRecordselect = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
|
||||
// CaseAttach caseAttachSelect = new CaseAttach();
|
||||
// caseAttachSelect.setCaseAppliId(caseApplication.getId());
|
||||
// caseAttachSelect.setAnnexType(2);
|
||||
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
caseAttach.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if(startIndexnew!=-1){
|
||||
String annexNamenew = annexName.substring(startIndexnew+1);
|
||||
caseAttach.setAnnexName(annexNamenew);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
caseApplicationselect.setCaseAttachList(caseAttachList);
|
||||
|
||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
if(caseAffiliatListeselect!=null){
|
||||
StringBuffer applicantName = new StringBuffer();
|
||||
|
||||
+7
-5
@@ -98,11 +98,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
.build();
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
if (count > 0) {
|
||||
//修改案件状态
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
caseApplication.setCaseStatus(4);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
if(id!=null){
|
||||
//修改案件状态
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
caseApplication.setCaseStatus(4);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
}
|
||||
return AjaxResult.success("上传成功");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
@@ -22,4 +22,33 @@
|
||||
from case_attach
|
||||
where case_appli_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
from case_attach
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND case_appli_id = #{id}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
<if test="annexTypeList != null and annexTypeList.size() > 0">
|
||||
and annex_type in
|
||||
<foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
|
||||
#{annexType}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="CaseAttach">
|
||||
update case_attach
|
||||
set
|
||||
case_appli_id= #{caseAppliId}
|
||||
where annexId = #{annex_id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user