bug修复
This commit is contained in:
+8
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface TemplateManageMapper {
|
||||
List<TemplateManage> selectTemplateList(TemplateManage templateManage);
|
||||
List<TemplateManage> selectTemplateListByIds(@Param("fileIds") List<Long> fileIds);
|
||||
|
||||
int insertTemplateManage(TemplateManage templateManage);
|
||||
|
||||
@@ -56,6 +57,13 @@ public interface TemplateManageMapper {
|
||||
*/
|
||||
void deleteTemplateManageFileById(@Param("id")Long id, @Param("fileIds")List<Long> annexIds);
|
||||
|
||||
/**
|
||||
* 根据id和附件类型删除
|
||||
* @param id
|
||||
* @param types
|
||||
*/
|
||||
void deleteTemplateManageFileByIdAndType(@Param("id")Long id, @Param("types")List<Integer> types);
|
||||
|
||||
/**
|
||||
* 根据模板id和类型查询
|
||||
* @param templateId
|
||||
|
||||
+12
-3
@@ -427,11 +427,20 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
Long id = templateManage.getId();
|
||||
templateManage.setUpdateBy(getUsername());
|
||||
int i = templateManageMapper.updateTemplateManage(templateManage);
|
||||
|
||||
// 先删除附件
|
||||
if (CollectionUtil.isNotEmpty(templateManage.getAnnexIds())) {
|
||||
templateManageMapper.deleteTemplateManageFileById(id, templateManage.getAnnexIds());
|
||||
// 修改附件表
|
||||
templateManageMapper.updateFileByIds(templateManage);
|
||||
// 根据附件id查询附件类型
|
||||
List<TemplateManage> templateManages = templateManageMapper.selectTemplateListByIds(templateManage.getAnnexIds());
|
||||
if(CollectionUtil.isNotEmpty(templateManages)) {
|
||||
List<Integer> types = templateManages.stream().map(TemplateManage::getTemType).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(types)) {
|
||||
// 根据模板id和类型删除附件
|
||||
templateManageMapper.deleteTemplateManageFileByIdAndType(id, types);
|
||||
// 修改附件表
|
||||
templateManageMapper.updateFileByIds(templateManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
|
||||
+53
-34
@@ -1050,10 +1050,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
mediatorVO.setCompleteAmount(0L);
|
||||
} else if(caseMap.containsKey(user.getUserId())) {
|
||||
List<MsCaseApplication> applications = caseMap.get(user.getUserId());
|
||||
// 已办案件
|
||||
// 待办案件
|
||||
long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
|
||||
mediatorVO.setTodoAmount(applications.size()-count);
|
||||
mediatorVO.setCompleteAmount(count);
|
||||
mediatorVO.setCompleteAmount(applications.size()-count);
|
||||
mediatorVO.setTodoAmount(count);
|
||||
}
|
||||
mediatorVOS.add(mediatorVO);
|
||||
}
|
||||
@@ -1240,6 +1240,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
*/
|
||||
@Transactional
|
||||
public void verifyMediator(MsCaseApplication application,BookingVO vo) {
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(vo.getCaseFlowId());
|
||||
if (currentFlow == null) {
|
||||
throw new ServiceException("未找到当前流程节点");
|
||||
}
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(vo.getCaseFlowId());
|
||||
if (nextFlow == null) {
|
||||
throw new ServiceException("未找到下一个流程节点");
|
||||
@@ -1257,36 +1261,41 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
// 根据案件id查询案件
|
||||
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(application.getId());
|
||||
MsCaseAffiliate affiliate = msCaseAffiliateMapper.selectByPrimaryKey(application.getId());
|
||||
if(caseApplication==null || affiliate==null){
|
||||
throw new ServiceException("未找到该案件");
|
||||
}
|
||||
// 申请人电话
|
||||
String phone="";
|
||||
if(affiliate.getOrganizeFlag().equals(0)){
|
||||
// 自然人
|
||||
if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())){
|
||||
phone=affiliate.getContactTelphoneAgent();
|
||||
}else {
|
||||
phone=affiliate.getApplicationPhone();
|
||||
}
|
||||
// 发送开庭短信
|
||||
if(CollectionUtil.isNotEmpty(vo.getHerDates())) {
|
||||
|
||||
}else {
|
||||
phone=affiliate.getContactTelphoneAgent();
|
||||
}
|
||||
caseApplication.setHearDate(application.getHearDate());
|
||||
// 申请人发送开庭日期短信
|
||||
sendHearDateSms(caseApplication,phone);
|
||||
// 被申发送开庭日期短信
|
||||
sendHearDateSms(caseApplication,affiliate.getRespondentPhone());
|
||||
// 调解员发送短信
|
||||
// 根据调解员id查询用户
|
||||
if(caseApplication.getMediatorId()!=null) {
|
||||
SysUser sysUser = sysUserMapper.selectUserById(caseApplication.getMediatorId());
|
||||
sendHearDateSms(caseApplication, sysUser.getPhonenumber());
|
||||
MsCaseAffiliate affiliate = msCaseAffiliateMapper.selectByPrimaryKey(application.getId());
|
||||
if (caseApplication == null || affiliate == null) {
|
||||
throw new ServiceException("未找到该案件");
|
||||
}
|
||||
// 申请人电话
|
||||
String phone = "";
|
||||
if (affiliate.getOrganizeFlag().equals(0)) {
|
||||
// 自然人
|
||||
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
||||
phone = affiliate.getContactTelphoneAgent();
|
||||
} else {
|
||||
phone = affiliate.getApplicationPhone();
|
||||
}
|
||||
|
||||
} else {
|
||||
phone = affiliate.getContactTelphoneAgent();
|
||||
}
|
||||
caseApplication.setHearDate(application.getHearDate());
|
||||
// 申请人发送开庭日期短信
|
||||
sendHearDateSms(caseApplication, phone);
|
||||
// 被申发送开庭日期短信
|
||||
sendHearDateSms(caseApplication, affiliate.getRespondentPhone());
|
||||
// 调解员发送短信
|
||||
// 根据调解员id查询用户
|
||||
if (caseApplication.getMediatorId() != null) {
|
||||
SysUser sysUser = sysUserMapper.selectUserById(caseApplication.getMediatorId());
|
||||
sendHearDateSms(caseApplication, sysUser.getPhonenumber());
|
||||
}
|
||||
}
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(), "");
|
||||
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "");
|
||||
|
||||
}
|
||||
|
||||
@@ -1299,10 +1308,20 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(StrUtil.isEmpty(phone)){
|
||||
return;
|
||||
}
|
||||
// 2075447 尊敬的用户,您的{1}案件,线上调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
||||
Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
||||
String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线上调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
||||
// 新增短信记录
|
||||
Boolean smsFlag =true;
|
||||
String sendContent="";
|
||||
if(StrUtil.isNotEmpty(application.getMediationMethod()) && application.getMediationMethod().equals("1")){
|
||||
|
||||
// 线上调解 2075447 尊敬的用户,您的{1}案件,线上调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
||||
smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
||||
sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线上调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
||||
}else {
|
||||
// 线下调解 2077966 尊敬的用户,您的{1}案件,线下调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
||||
smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
||||
sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线下调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
||||
|
||||
}
|
||||
// 新增短信记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), phone, new Date(), sendContent);
|
||||
if(smsFlag){
|
||||
smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
|
||||
|
||||
+20
-1
@@ -64,7 +64,18 @@
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectTemplateListByIds" resultMap="TemplateManageResult">
|
||||
SELECT *
|
||||
FROM ms_template_manage_file
|
||||
<where>
|
||||
<if test="fileIds != null">
|
||||
and file_id in
|
||||
<foreach collection="fileIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectById" resultMap="TemplateManageResult">
|
||||
select * from ms_template_manage where id=#{id}
|
||||
</select>
|
||||
@@ -135,6 +146,14 @@
|
||||
|
||||
;
|
||||
</delete>
|
||||
<delete id="deleteTemplateManageFileByIdAndType">
|
||||
delete from ms_template_manage_file where template_manage_id = #{id} and tem_type in
|
||||
<foreach collection="types" item="it" open="(" separator="," close=")">
|
||||
#{it}
|
||||
</foreach>
|
||||
|
||||
;
|
||||
</delete>
|
||||
|
||||
<select id="selectByIdAndType" resultMap="TemplateManageResult">
|
||||
select f.* from ms_template_manage m join ms_template_manage_file f on m.id=f.template_manage_id
|
||||
|
||||
Reference in New Issue
Block a user