Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Mediation-Backend into bgy
# Conflicts: # ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java # ruoyi-system/pom.xml
This commit is contained in:
@@ -20,7 +20,6 @@ public interface ISysUserService
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser user);
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
|
||||
@@ -9,8 +9,6 @@ import javax.validation.Validator;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -62,8 +60,6 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
|
||||
@Autowired
|
||||
protected Validator validator;
|
||||
@@ -80,23 +76,6 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
return userMapper.selectUserList(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
|
||||
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
|
||||
if(sysUsers!=null&&sysUsers.size()>0){
|
||||
for(SysUser sysUser: sysUsers){
|
||||
Long userId = sysUser.getUserId();
|
||||
int casenum = caseApplicationMapper.selectCasenum(userId.toString());
|
||||
String nickName = sysUser.getNickName();
|
||||
String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
|
||||
sysUser.setNickNameAndNum(nickNamenew);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return sysUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
*
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="ms_case_log_record")
|
||||
public class MsCaseLogRecordDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "Id")
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 案件申请id
|
||||
*/
|
||||
@Column(name="case_appli_id")
|
||||
private Long caseAppliId;
|
||||
|
||||
/**
|
||||
* 案件节点
|
||||
*/
|
||||
@Column(name="case_node")
|
||||
private Integer caseNode;
|
||||
|
||||
/**
|
||||
* 案件节点时间
|
||||
*/
|
||||
@Column(name="case_node_time")
|
||||
private Date caseNodeTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Column(name="notes")
|
||||
private String notes;
|
||||
|
||||
/**
|
||||
* 操作人用户名
|
||||
*/
|
||||
@Column(name="create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 操作人用户昵称
|
||||
*/
|
||||
@Column(name="create_nick_name")
|
||||
private String createNickName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name="create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@Column(name="update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name="update_time")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.ruoyi.wisdomarbitrate;
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArbitrateRecordMapper {
|
||||
int insertArbitrateRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
int updataArbitrateRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
ArbitrateRecord selectArbitrateRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArbitratorMapper {
|
||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@Repository
|
||||
public interface CaseAffiliateLogMapper {
|
||||
|
||||
|
||||
int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
|
||||
|
||||
|
||||
void deletecaseAffiliate(CaseApplication caseApplication);
|
||||
void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
|
||||
|
||||
|
||||
List<CaseAffiliate> selectCaseAffiliate(@Param("caseAppliLogId") Long caseAppliLogId);
|
||||
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliLogId") Long caseAppliLogId, @Param("identityType")int identityType);
|
||||
|
||||
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CaseAffiliateMapper {
|
||||
|
||||
|
||||
int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
|
||||
|
||||
|
||||
void deletecaseAffiliate(CaseApplication caseApplication);
|
||||
void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
|
||||
|
||||
|
||||
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||
List<CaseAffiliate> selectCaseAffiliateByCaseIds(@Param("ids") List<Long> ids);
|
||||
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
|
||||
|
||||
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||
|
||||
/**
|
||||
* 根据案件查询邮箱
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
|
||||
|
||||
/**
|
||||
* 批量修改
|
||||
* @param affiliateLogList
|
||||
*/
|
||||
void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
|
||||
|
||||
/**
|
||||
* 根据案件id删除
|
||||
* @param caseId
|
||||
*/
|
||||
void deleteByCaseId(@Param("caseAppliId") Long caseId);
|
||||
}
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 案件日志
|
||||
* @date 2023-11-17 14:05
|
||||
*/
|
||||
@Repository
|
||||
public interface CaseApplicationLogMapper {
|
||||
int insert(CaseApplication caseApplicationLog);
|
||||
|
||||
int deleteById(Long id);
|
||||
|
||||
|
||||
|
||||
CaseApplication selectByCaseIdAndVersion(@Param("caseAppliId")long caseAppliId,@Param("version") int version);
|
||||
|
||||
Integer selectMaxVersionByCaseId(@Param("caseAppliId")long caseAppliId);
|
||||
|
||||
/**
|
||||
* 修改日志表状态
|
||||
* @param vo
|
||||
*/
|
||||
void updateStatus(UpdateSubmitVO vo);
|
||||
|
||||
/**
|
||||
* 根据案件id查询秘书角色最新版本号
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
|
||||
|
||||
/**
|
||||
* 删除日志
|
||||
* @param ids
|
||||
*/
|
||||
void batchDeleteLog(@Param("ids") List<Long> ids);
|
||||
|
||||
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
|
||||
|
||||
Integer batchSave(@Param("list")List<CaseApplication> caseApplications);
|
||||
|
||||
/**
|
||||
* 根据案件id查询所有的日志id
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectLogsByCaseIds(@Param("ids")List<Long> ids);
|
||||
}
|
||||
-140
@@ -1,140 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CaseApplicationMapper {
|
||||
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
|
||||
List<CaseApplication> selectCaseApplicationList1(CaseApplication caseApplication);
|
||||
|
||||
int selectCaseApplicationCount(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 查询超级管理员案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
|
||||
|
||||
int insertCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
|
||||
int updataCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
int submitCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
int deletecaseApplication(CaseApplication caseApplication);
|
||||
|
||||
CaseApplication selectCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 根据案件id查询案件信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
|
||||
|
||||
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 查询最大编号
|
||||
* @param caseNum
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
Integer selectCaseNumLike(@Param("caseNum") String caseNum, @Param("length") int length);
|
||||
|
||||
/**
|
||||
* 查询仲裁员根据案件id
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
String selectArbitratorList(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 修改支付方式
|
||||
* @param payDTO
|
||||
*/
|
||||
void updatePayType(CaseConfirmPayDTO payDTO);
|
||||
|
||||
|
||||
ToDoCount selectAdminCaseToDoCount();
|
||||
|
||||
|
||||
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 修改案件锁定状态
|
||||
* @param id
|
||||
* @param lockStatus
|
||||
* @return
|
||||
*/
|
||||
int updateCaseLockStatus(@Param("id")Long id,@Param("lockStatus") Integer lockStatus);
|
||||
|
||||
/**
|
||||
* 批量删除案件
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int batchDeletecaseApplication(@Param("ids") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 绑定房间号
|
||||
* @param caseId
|
||||
* @param roomId
|
||||
*/
|
||||
void bindCaseId(@Param("caseId")Long caseId,@Param("roomId") String roomId);
|
||||
|
||||
/**
|
||||
* 根据房间号查询案件id
|
||||
* @param roomId
|
||||
* @return
|
||||
*/
|
||||
Long selectCaseIdByRoomId(@Param("roomId")String roomId);
|
||||
|
||||
/**
|
||||
* 查询已办案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
|
||||
/**
|
||||
* 查询最大房间号
|
||||
* @return
|
||||
*/
|
||||
Long selectMaxRoomId();
|
||||
|
||||
/**
|
||||
* 修改案件版本号
|
||||
* @param id
|
||||
* @param version
|
||||
*/
|
||||
void updateVersionById(@Param("id")Long id, @Param("version")Integer version);
|
||||
|
||||
|
||||
/**
|
||||
* 查询最大批号
|
||||
* @return
|
||||
*/
|
||||
Integer selectBatchNumberLike();
|
||||
|
||||
/**
|
||||
* 批量新增案件
|
||||
* @param caseApplications
|
||||
* @return
|
||||
*/
|
||||
int batchSave(@Param("list")List<CaseApplication> caseApplications);
|
||||
|
||||
int selectCasenum(@Param("userId") String userId);
|
||||
|
||||
List<CaseApplication> selectAdminCaseApplicationListBatch(CaseApplication caseApplication);
|
||||
|
||||
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CaseEvidenceDirectoryMapper {
|
||||
|
||||
int save(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||
/**
|
||||
* 查询证据目录信息
|
||||
*
|
||||
* @param caseEvidenceDirectory 目录信息
|
||||
* @return 目录信息集合
|
||||
*/
|
||||
List<CaseEvidenceDirectory> selectList(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||
|
||||
/**
|
||||
* 根据证据名称查询证据目录树信息
|
||||
* @param evidenceName 证据名称
|
||||
* @param deptCheckStrictly 目录树选择项是否关联显示
|
||||
*/
|
||||
List<Integer> selectDeptListByEvidenceName(@Param("evidenceName") String evidenceName, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CaseEvidenceMapper {
|
||||
List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
|
||||
, @Param(value = "caseStatusList") List<Integer> caseStatusList
|
||||
, @Param(value = "identityType" ) Integer identityType
|
||||
);
|
||||
}
|
||||
+4
-5
@@ -1,14 +1,13 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.MsCaseLogRecordDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface CaseLogRecordMapper {
|
||||
|
||||
public interface CaseLogRecordMapper extends Mapper<MsCaseLogRecordDTO> {
|
||||
|
||||
|
||||
List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord);
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CasePaymentRecordMapper {
|
||||
int saveRecord(CasePaymentRecord casePaymentRecord);
|
||||
|
||||
List<CasePaymentRecord> queryRecord(String orderNumber);
|
||||
|
||||
void update(CasePaymentRecord casePaymentRecord);
|
||||
|
||||
CasePaymentRecord selectRecordByCaseId(Long id);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SealSignRecordMapper {
|
||||
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
|
||||
|
||||
/**
|
||||
* 查询已签署和签署中的文件
|
||||
* @param sealSignRecord
|
||||
* @return
|
||||
*/
|
||||
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
|
||||
|
||||
/**
|
||||
* 差询等待签署,签署中的案件
|
||||
* @param penSonAccount 签署人员
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectSealSigning(@Param("penSonAccount") String penSonAccount, @Param("caseStatus") Integer caseStatus);
|
||||
|
||||
int updataSealSignRecord(SealSignRecord sealSignRecord);
|
||||
|
||||
|
||||
void insertSealSignRecord(SealSignRecord sealSignRecord);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TemplateManualMapper {
|
||||
|
||||
int insertTemplateManual(TemplateManual templateManual);
|
||||
|
||||
int updateTemplateManual(TemplateManual templateManual);
|
||||
|
||||
List<TemplateManual> selectTemplateManual(TemplateManual templateManual);
|
||||
}
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 案件日志
|
||||
* @date 2023-11-17 13:58
|
||||
*/
|
||||
public interface CaseApplicationLogService {
|
||||
/**
|
||||
* 新增案件日志
|
||||
* @param caseApplicationLog
|
||||
* @return
|
||||
*/
|
||||
int insert(CaseApplication caseApplicationLog);
|
||||
|
||||
/**
|
||||
* 根据案件日志id删除案件日志
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int delete(Long id);
|
||||
|
||||
/**
|
||||
* 根据案件id和版本号查询案件日志
|
||||
* @param id
|
||||
* @param version
|
||||
* @return
|
||||
*/
|
||||
CaseApplication selectByCaseIdAndVersion(Long id, int version);
|
||||
|
||||
/**
|
||||
* 修改的案件提交到秘书
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult submit(UpdateSubmitVO vo);
|
||||
|
||||
/**
|
||||
* 修改撤销申请
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult revoke(UpdateSubmitVO vo);
|
||||
|
||||
/**
|
||||
* 秘书审核修改的案件
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateAudit(UpdateSubmitVO vo);
|
||||
|
||||
|
||||
AjaxResult selectCompareCase(UpdateSubmitVO vo);
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAdjudicationService {
|
||||
AjaxResult createDocument(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
|
||||
|
||||
List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult signature(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult caseFile( List<Long> ids);
|
||||
|
||||
AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
|
||||
|
||||
AjaxResult stamp(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult getArchivesDetail(Long id);
|
||||
|
||||
AjaxResult regenerationDocument(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 根据案件id查询邮箱
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AjaxResult emailByCaseId(Long id);
|
||||
|
||||
/**
|
||||
* 批量生成裁决书
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
AjaxResult batchDocument(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据签署流程id查询批量签名链接
|
||||
* @param idsReq
|
||||
* @return
|
||||
*/
|
||||
SealSignRecord selectBatchSignUrl( StringIdsReq idsReq);
|
||||
|
||||
/**
|
||||
* 根据仲裁员手机号分页查询等待签署,签署中的裁决书
|
||||
* @param personAccount
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectSealSigning(String personAccount,Integer caseStatus);
|
||||
|
||||
SealSignRecord selectBatchSealUrl(StringIdsReq idsReq);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IArbitratorService {
|
||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||
|
||||
|
||||
|
||||
}
|
||||
-154
@@ -1,154 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ICaseApplicationService {
|
||||
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
|
||||
List<CaseApplication> selectCaseApplicationListByRole(CaseApplication caseApplication);
|
||||
|
||||
|
||||
int insertcaseApplication(CaseApplication caseApplication);
|
||||
|
||||
int selectCaseApplicationCount(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult editCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
int submitCaseApplication( List<Long> ids);
|
||||
|
||||
int deletecaseApplicationByIds(List<Long> ids);
|
||||
|
||||
CaseApplication selectCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
String importCaseApplication(List<CaseApplication> caseApplicationList, String operName);
|
||||
|
||||
int pendTral(CaseApplication caseApplication);
|
||||
|
||||
int pendingAppointArbotrar(CaseApplication caseApplication);
|
||||
|
||||
int pendTralCheck(CaseApplication caseApplication);
|
||||
|
||||
int pendTralSure(CaseApplication caseApplication);
|
||||
|
||||
int verificationArbitrateRecord(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult checkArbitrateRecord(CaseApplication caseApplication);
|
||||
|
||||
int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
|
||||
|
||||
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
||||
|
||||
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
|
||||
|
||||
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
/**
|
||||
* 查询待办数量
|
||||
* @return
|
||||
*/
|
||||
ToDoCount selectToDoCount();
|
||||
|
||||
AjaxResult selectCaseProgress(CaseApplication caseApplication);
|
||||
|
||||
int updateHeardate(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 修改案件锁定状态
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
int updateCaseLockStatus(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult uploadZipFile(MultipartFile file, Long id, String username, Long userId);
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
|
||||
|
||||
/**
|
||||
* 获取userSign
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
String generateUserSign(String userId);
|
||||
|
||||
/**
|
||||
* 预约会议
|
||||
* @param reservedConferenceVO
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 腾讯云销毁房间回调
|
||||
* @return
|
||||
*/
|
||||
long createRoomId(Long caseId);
|
||||
|
||||
/**
|
||||
* 根据案件id查询已预约的会议
|
||||
* @param caseId
|
||||
* @return
|
||||
*/
|
||||
List<ReservedConference> reserveConferenceList(Long caseId);
|
||||
|
||||
AjaxResult deleteRoom( String roomId);
|
||||
|
||||
AjaxResult uploadCaseZipFile(MultipartFile file,Long templateId);
|
||||
|
||||
/**
|
||||
* 根据附件id修改案件id
|
||||
* @param caseAttach
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach);
|
||||
|
||||
/**
|
||||
* 仲裁员审核裁决书
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult creatTrialRecordnew(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
|
||||
|
||||
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
|
||||
|
||||
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
|
||||
|
||||
int submitCaseApplicationBatch(String batchNumber);
|
||||
|
||||
int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
|
||||
|
||||
int pendTralCheckBatch(CaseApplication caseApplication);
|
||||
|
||||
int pendTralSureBatch(CaseApplication caseApplication);
|
||||
|
||||
int verificationArbitrateRecordBatch(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult arbitratorCheckArbitrateRecordBatch(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult checkArbitrateRecordBatch(CaseApplication caseApplication);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseIds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICaseArbitrateService {
|
||||
|
||||
|
||||
AjaxResult writtenHear(CaseIds caseIds);
|
||||
|
||||
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
|
||||
}
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICaseEvidenceService {
|
||||
|
||||
AjaxResult getCaseDetailsById(Long id,String userName);
|
||||
|
||||
AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
|
||||
|
||||
List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
|
||||
|
||||
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
|
||||
|
||||
/**
|
||||
* 批量上传文件
|
||||
* @param file
|
||||
* @param annexType
|
||||
* @param id
|
||||
* @param username
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
|
||||
|
||||
AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList);
|
||||
|
||||
int deleteFile( List<Integer> fileIds);
|
||||
|
||||
List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||
|
||||
|
||||
/**
|
||||
* 查询证据目录数据
|
||||
*
|
||||
* @param caseEvidenceDirectory 证据目录信息
|
||||
* @return 证据目录信息集合
|
||||
*/
|
||||
List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
*
|
||||
* @param caseEvidenceDirectorys 证据列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
*
|
||||
* @param caseEvidenceDirectorys 证据目录列表
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
|
||||
|
||||
AjaxResult uploadRecord(MultipartFile file, Integer annexType, Long id, String username, Long userId);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICasePaymentService {
|
||||
/**
|
||||
* 案件缴费
|
||||
*/
|
||||
AjaxResult casePay(CasePayDTO casePayDTO);
|
||||
|
||||
AjaxResult confirmPayment( List<Long> ids);
|
||||
|
||||
/**
|
||||
* 确认缴费
|
||||
* @param payDTO
|
||||
* @return
|
||||
*/
|
||||
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
|
||||
|
||||
|
||||
AjaxResult casePayList(CasePayDTO casePayDTO);
|
||||
|
||||
AjaxResult confirmPayBatch(CasePayDTO payDTO);
|
||||
|
||||
AjaxResult casePayListBatch(CasePayDTO casePayDTO);
|
||||
|
||||
AjaxResult confirmPaymentBatch(String batchNumber);
|
||||
|
||||
AjaxResult casePayBatch(CasePayDTO casePayDTO);
|
||||
}
|
||||
-1513
File diff suppressed because it is too large
Load Diff
-28
@@ -1,28 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ArbitratorServiceImpl implements IArbitratorService {
|
||||
@Autowired
|
||||
private ArbitratorMapper arbitratorMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Arbitrator> selectArbitratorList(Arbitrator arbitrator) {
|
||||
return arbitratorMapper.selectArbitratorList(arbitrator);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+5
-4
@@ -11,12 +11,13 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@Slf4j
|
||||
public class CallBackHandleServiceImpl implements CallBackService {
|
||||
@Autowired
|
||||
private CasePaymentServiceImpl casePaymentService;
|
||||
|
||||
// todo
|
||||
// @Autowired
|
||||
// private CasePaymentServiceImpl casePaymentService;
|
||||
|
||||
@Override
|
||||
public void successPay(String orderSn) {
|
||||
casePaymentService.callback(orderSn);
|
||||
// casePaymentService.callback(orderSn);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-512
@@ -1,512 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.enums.UpdateSubmitStatus;
|
||||
import com.ruoyi.common.enums.YesOrNoEnum;
|
||||
import com.ruoyi.common.utils.ObjectFieldUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 案件日志
|
||||
* @date 2023-11-17 14:05
|
||||
*/
|
||||
@Service
|
||||
public class CaseApplicationLogServiceImpl implements CaseApplicationLogService {
|
||||
@Autowired
|
||||
private CaseApplicationLogMapper caseApplicationLogMapper;
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateLogMapper caseAffiliateLogMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private CaseAttachLogMapper caseAttachLogMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
@Autowired
|
||||
private ColumnValueLogMapper columnValueLogMapper;
|
||||
// 对比两个版本修改的字段,基本字段对比
|
||||
private static final String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
|
||||
"claimPrinciOwed","arbitratClaims","properPreser","requestRule","facts"};
|
||||
// 人员字段对比
|
||||
private static final String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
|
||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||
"compLegalperPost","responSex","responBirth"};
|
||||
@Override
|
||||
public int insert(CaseApplication caseApplicationLog) {
|
||||
return caseApplicationLogMapper.insert(caseApplicationLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Long id) {
|
||||
return caseApplicationLogMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CaseApplication selectByCaseIdAndVersion(Long id, int version) {
|
||||
return caseApplicationLogMapper.selectByCaseIdAndVersion(id,version);
|
||||
}
|
||||
/**
|
||||
* 修改的案件提交到秘书
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult submit(UpdateSubmitVO vo) {
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
|
||||
// 修改日志表提交状态
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult revoke(UpdateSubmitVO vo) {
|
||||
// 根据案件id和版本号查询改案件
|
||||
CaseApplication caseApplication = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
if(caseApplication == null){
|
||||
return AjaxResult.error("案件不存在");
|
||||
}
|
||||
// 如果秘书没有审核,将撤销状态改为同意撤销,否则改为撤销
|
||||
if(caseApplication.getUpdateSubmitStatus()!=null && !caseApplication.getUpdateSubmitStatus().equals(UpdateSubmitStatus.AGREE.getCode())){
|
||||
agreeRevoke(vo);
|
||||
|
||||
}else {
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
|
||||
// 修改日志表提交状态
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 秘书审核修改的案件
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult updateAudit(UpdateSubmitVO vo) {
|
||||
if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.COMMITTED.getCode())) {
|
||||
// 审核修改提交状态
|
||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
// 如果版本号为1,则直接返回
|
||||
if(vo.getVersion() <= 1){
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
|
||||
// 查询日志记录表本版本数据
|
||||
CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
if (caseApplicationLog == null) {
|
||||
return AjaxResult.error("未找到该案件");
|
||||
}
|
||||
// 将日志表改版本的状态改为同意
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
// 根据caseLogId查询相关人员表
|
||||
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
|
||||
// 更新案件主表
|
||||
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
|
||||
|
||||
// 更新相关人员主表
|
||||
if(CollectionUtil.isNotEmpty(affiliateLogList)){
|
||||
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
|
||||
for (CaseAffiliate caseAffiliate : affiliateLogList) {
|
||||
caseAffiliate.setCaseAppliId(vo.getCaseId());
|
||||
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
|
||||
}
|
||||
// // 根据caseLogId查询案件记录附件表
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
|
||||
caseApplication.setAnnexType(2);
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 更新自定义字段表
|
||||
// 根据caseLogId查询自定义字段表
|
||||
List<ColumnValue> columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
|
||||
if(CollectionUtil.isNotEmpty(columnValueList)){
|
||||
for (ColumnValue columnValue : columnValueList) {
|
||||
columnValue.setCaseAppliLogId(vo.getCaseId());
|
||||
|
||||
}
|
||||
columnValueLogMapper.batchUpdate(columnValueList);
|
||||
}
|
||||
} else {
|
||||
// 拒绝,将日志表改版本的状态改为拒绝
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return sendAuditMessage(vo);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
|
||||
// 审核修改撤销状态
|
||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
// 同意撤销
|
||||
agreeRevoke(vo);
|
||||
} else {
|
||||
// 拒绝撤销,将日志表改版本的状态改为拒绝撤销
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return sendAuditMessage(vo);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 给申请人发送短信
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
private AjaxResult sendAuditMessage(UpdateSubmitVO vo) {
|
||||
// 查询申请人
|
||||
CaseApplication logCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
if(logCase == null){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
CaseAffiliate caseAffiliate = caseAffiliateLogMapper.selectCaseAffiliateByIdentityType(logCase.getCaseLogId(), 1);
|
||||
if(caseAffiliate == null){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1996949");
|
||||
request.setPhone(caseAffiliate.getContactTelphone());
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), logCase.getCaseNum(),vo.getReason()});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseAffiliate.getCaseAppliId());
|
||||
caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
smsSendRecord.setCaseNum(caseApplication.getCaseNum());
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
// 1996949 审核案件结果通知 尊敬的{1}用户,您的{2}仲裁案件,审核未通过,理由为{3},请知晓,如非本人操作,请忽略本短信
|
||||
String content = "尊敬的" + caseAffiliate.getName() + ",您的"+logCase.getCaseNum()+"仲裁案件,审核未通过,理由为"+vo.getReason()+",请知晓,如非本人操作,请忽略本短信。";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
|
||||
// 查询当前版本号和主表的案件
|
||||
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseAppliId(vo.getCaseId());
|
||||
caseApplication.setId(vo.getCaseId());
|
||||
CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
|
||||
// 查询案件关联人员
|
||||
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
|
||||
// 查询自定义字段表
|
||||
afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
|
||||
// 查询附件
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
||||
caseAttach.setAnnexType(2);
|
||||
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||
List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
if (CollectionUtil.isNotEmpty(afterAttachList)) {
|
||||
for (CaseAttach attach : afterAttachList) {
|
||||
String annexName = attach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
attach.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
attach.setAnnexName(annexNamenew);
|
||||
}
|
||||
}
|
||||
afterCase.setCaseAttachList(afterAttachList);
|
||||
}
|
||||
afterCase.setCaseAttachList(afterAttachList);
|
||||
CompareCaseVO compareCaseVO = new CompareCaseVO();
|
||||
compareCaseVO.setBeforeCase(beforeCase);
|
||||
compareCaseVO.setAfterCase(afterCase);
|
||||
|
||||
StringBuilder changeColumn = new StringBuilder();
|
||||
// 对比基本字段
|
||||
for (String column : columns) {
|
||||
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
|
||||
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
|
||||
if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
|
||||
changeColumn.append(column).append(",");
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
|
||||
changeColumn.append(column).append(",");
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
|
||||
changeColumn.append(column).append(",");
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// 对比案件人员字段
|
||||
compareAffilate(beforeCase, afterCase);
|
||||
// 对比申请人证据资料
|
||||
compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
|
||||
// 对比自定义字段
|
||||
//
|
||||
List<ColumnValue> beforeColumnValues = beforeCase.getColumnValues();
|
||||
List<ColumnValue> afterColumnValues = afterCase.getColumnValues();
|
||||
StringBuilder columnValueChange = new StringBuilder();
|
||||
|
||||
if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
|
||||
Map<String, String> beforeColumnValueMap = beforeColumnValues.stream().collect(Collectors.toMap(ColumnValue::getColumn, ColumnValue::getValue, (n1, n2) -> n2));
|
||||
for (ColumnValue afterColumnValue : afterColumnValues) {
|
||||
// 改变前字段不包含改变后字段
|
||||
if (!beforeColumnValueMap.containsKey(afterColumnValue.getColumn())) {
|
||||
columnValueChange.append(afterColumnValue.getColumn()).append(",");
|
||||
} else {
|
||||
// 都有这个字段,比较内容是否相同
|
||||
// 修改后为空,修改前不为空
|
||||
if (StrUtil.isEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
|
||||
columnValueChange.append(afterColumnValue.getColumn()).append(",");
|
||||
} else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
|
||||
// 修改前为空,修改后不为空
|
||||
columnValueChange.append(afterColumnValue.getColumn()).append(",");
|
||||
} else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))
|
||||
&& !afterColumnValue.getValue().equals(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
|
||||
// 修改前不为空,修改后不为空,内容不同
|
||||
columnValueChange.append(afterColumnValue.getColumn()).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (CollectionUtil.isEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
|
||||
for (ColumnValue afterColumnValue : afterColumnValues) {
|
||||
columnValueChange.append(afterColumnValue.getColumn()).append(",");
|
||||
}
|
||||
|
||||
} else if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isEmpty(afterColumnValues)) {
|
||||
for (ColumnValue beforeColumn : beforeColumnValues) {
|
||||
columnValueChange.append(beforeColumn.getColumn()).append(",");
|
||||
}
|
||||
|
||||
}
|
||||
compareCaseVO.setColumnValueChangeColumn(columnValueChange.toString());
|
||||
|
||||
return AjaxResult.success(compareCaseVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比申请人证据资料
|
||||
* @param beforeCase
|
||||
* @param afterCase
|
||||
* @param changeColumn
|
||||
* @return
|
||||
*/
|
||||
private StringBuilder compareApplicantFile(CaseApplication beforeCase, CaseApplication afterCase, StringBuilder changeColumn) {
|
||||
List<CaseAttach> beforeAttachFilter =new ArrayList<>();
|
||||
List<CaseAttach> afterAttachFilter =new ArrayList<>();
|
||||
if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
|
||||
beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
|
||||
if(beforeAttachFilter.size()!=afterAttachFilter.size()){
|
||||
changeColumn.append("fileColumn");
|
||||
}else {
|
||||
Map<String, CaseAttach> afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
|
||||
for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
|
||||
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
|
||||
changeColumn.append("fileColumn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return changeColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比案件人员字段
|
||||
* @param beforeCase
|
||||
* @param afterCase
|
||||
*/
|
||||
private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
|
||||
// 对比人员字段
|
||||
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
|
||||
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
|
||||
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
|
||||
if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
|
||||
// 转为map
|
||||
beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
|
||||
}
|
||||
StringBuilder affiliateChangeColumn;
|
||||
// 如果上一个版本和现版本有一个为空,那么所有字段都修改
|
||||
if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
|
||||
affiliateChangeColumn = new StringBuilder();
|
||||
for (String column : affiliateColumns) {
|
||||
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
}
|
||||
|
||||
} else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
|
||||
affiliateChangeColumn = new StringBuilder();
|
||||
for (String column : affiliateColumns) {
|
||||
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
}
|
||||
} else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
|
||||
for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
|
||||
// 找到相同身份类型的数据,进行对比
|
||||
affiliateChangeColumn = new StringBuilder();
|
||||
int identityType = afterCaseCaseAffiliate.getIdentityType();
|
||||
if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
|
||||
CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
|
||||
for (String column : affiliateColumns) {
|
||||
String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
|
||||
String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
|
||||
if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
for (String column : affiliateColumns) {
|
||||
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
}
|
||||
}
|
||||
afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意撤销
|
||||
* @param vo
|
||||
*/
|
||||
private void agreeRevoke(UpdateSubmitVO vo) {
|
||||
CaseApplication caseApplicationLog;
|
||||
// 查询日志记录表上个版本未被拒绝数据
|
||||
if(vo.getVersion()<=1){
|
||||
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
|
||||
|
||||
}else {
|
||||
caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
|
||||
}
|
||||
if (caseApplicationLog == null) {
|
||||
return;
|
||||
}
|
||||
// 将日志表改版本的状态改为拒绝
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
// 根据caseLogId查询相关人员表
|
||||
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
|
||||
|
||||
|
||||
// 更新案件主表
|
||||
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
|
||||
|
||||
// 更新相关人员主表
|
||||
if(CollectionUtil.isNotEmpty(affiliateLogList)){
|
||||
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
|
||||
for (CaseAffiliate caseAffiliate : affiliateLogList) {
|
||||
caseAffiliate.setCaseAppliId(vo.getCaseId());
|
||||
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
|
||||
}
|
||||
// // 根据caseLogId查询案件记录附件表
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
|
||||
caseApplication.setAnnexType(2);
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 根据caseLogId查询自定义字段表
|
||||
List<ColumnValue> columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
|
||||
|
||||
// 更新相关人员主表
|
||||
if(CollectionUtil.isNotEmpty(columnValueList)){
|
||||
for (ColumnValue columnValue : columnValueList) {
|
||||
columnValue.setCaseAppliLogId(vo.getCaseId());
|
||||
|
||||
}
|
||||
columnValueLogMapper.batchUpdate(columnValueList);
|
||||
}
|
||||
}
|
||||
}
|
||||
-3703
File diff suppressed because it is too large
Load Diff
-533
@@ -1,533 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.WordUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
@Service
|
||||
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseLogRecordMapper caseLogRecordMapper;
|
||||
@Autowired
|
||||
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private IAdjudicationService adjudicationService;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethodNow) {
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
|
||||
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
if (opinion == 0) { //拒绝
|
||||
if (arbitratMethodOriral == 2) {
|
||||
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||
//修改案件状态修改开庭时间
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
//修改案件状态为待修改开庭时间
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||
|
||||
} else {
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
}
|
||||
} else if (opinion == 1 ) {
|
||||
if (arbitratMethodOriral == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
} else {
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setArbitratMethod(1);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
//修改案件状态为待修改开庭时间
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||
|
||||
}
|
||||
}else if (opinion == 2) {
|
||||
if (arbitratMethodNow == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
} else {
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setArbitratMethod(1);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
//修改案件状态为待修改开庭时间
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||
|
||||
}
|
||||
}
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication1.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
request.setTemplateId("1931000");
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean){
|
||||
smsSendRecord.setSendStatus(1);
|
||||
}else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success("审核成功");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult writtenHear(CaseIds caseIds) {
|
||||
if (caseIds!=null){
|
||||
List<Long> ids = caseIds.getIds();
|
||||
for (Long caseId : ids) {
|
||||
//查询案件详情
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
//先判断案件是否已经提交过仲裁结果
|
||||
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
|
||||
arbitrateRecord.setCaseAppliId(caseId);
|
||||
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
if (arbitrateRecord1 != null) {
|
||||
int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
||||
if (i > 0) {
|
||||
//案件日志表里添加数据
|
||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
||||
caseLogRecord.setCreateBy(getUsername());
|
||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
|
||||
|
||||
}
|
||||
} else {
|
||||
//提交仲裁结果
|
||||
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
|
||||
if (i > 0) {
|
||||
//案件日志表里添加数据
|
||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
||||
caseLogRecord.setCreateBy(getUsername());
|
||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
|
||||
}
|
||||
}
|
||||
// 生成裁决书
|
||||
CaseApplication application = new CaseApplication();
|
||||
application.setId(caseId);
|
||||
adjudicationService.createDocument(application);
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
|
||||
}
|
||||
return AjaxResult.success("审理成功");
|
||||
}
|
||||
return AjaxResult.error("请检查参数");
|
||||
}
|
||||
|
||||
//生成仲裁文书
|
||||
private Boolean generateAward(Long id) {
|
||||
try {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
//获取案件详细信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
//生成编码
|
||||
String equipmentNo = getNewEquipmentNo();
|
||||
datas.put("num", equipmentNo);
|
||||
//获取仲裁记录表里的相关信息
|
||||
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
|
||||
arbitrateRecord.setCaseAppliId(id);
|
||||
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
//获取案件关联人信息
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(id);
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
List<String> nameAgentList = new ArrayList<>();
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
if (identityType == 1) { //申请人
|
||||
datas.put("appName", affiliate.getName());
|
||||
datas.put("appAddress", affiliate.getResidenAffili());
|
||||
datas.put("appContactAddress", affiliate.getContactAddress());
|
||||
datas.put("appLegalPerson", affiliate.getCompLegalPerson());
|
||||
datas.put("appLegalPersonTitle", affiliate.getCompLegalperPost());
|
||||
datas.put("appAgentName", affiliate.getNameAgent());
|
||||
datas.put("appAgentTitle", affiliate.getAppliAgentTitle());
|
||||
nameAgentList.add(affiliate.getNameAgent());
|
||||
} else if (identityType == 2) { //被申请人
|
||||
datas.put("resName", affiliate.getName());
|
||||
datas.put("resAddress", affiliate.getResidenAffili());
|
||||
String responSex = affiliate.getResponSex();
|
||||
if (responSex.equals("0")) {
|
||||
datas.put("resSex", "男");
|
||||
} else if (responSex.equals("1")){
|
||||
datas.put("resSex", "女");
|
||||
}else {
|
||||
datas.put("resSex", "未知");
|
||||
}
|
||||
Date responBirth = affiliate.getResponBirth();
|
||||
if (responBirth != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String responBirthStr = sdf.format(responBirth);
|
||||
datas.put("resDateOfBirth", responBirthStr);
|
||||
|
||||
}
|
||||
|
||||
datas.put("resContactAddress", affiliate.getContactAddress());
|
||||
nameAgentList.add(affiliate.getNameAgent());
|
||||
}
|
||||
}
|
||||
}
|
||||
Date createTime = caseApplication1.getCreateTime();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// 将日期格式化为字符串
|
||||
String createTimeStr = sdf.format(createTime);
|
||||
datas.put("submissionDate", createTimeStr);
|
||||
Date registerDate = caseApplication1.getRegisterDate();
|
||||
String registerDateStr = sdf.format(registerDate);
|
||||
datas.put("acceptDate", registerDateStr);
|
||||
//反请求
|
||||
Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
|
||||
String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
|
||||
"《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
|
||||
"仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
|
||||
if (adjudicaCounter == null) {
|
||||
datas.put("counterclaim", null);
|
||||
} else if (adjudicaCounter == 1) {
|
||||
datas.put("counterclaim", counterclaim);
|
||||
} else {
|
||||
datas.put("counterclaim", null);
|
||||
}
|
||||
//财产保全
|
||||
Integer properPreser = caseApplication1.getProperPreser();
|
||||
String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
|
||||
"第二十八条之规定,将该申请提交至法院。";
|
||||
if (properPreser == null) {
|
||||
datas.put("preservation", null);
|
||||
} else if (properPreser == 1) {
|
||||
datas.put("preservation", preservation);
|
||||
} else {
|
||||
datas.put("preservation", null);
|
||||
}
|
||||
//管辖权异议
|
||||
Integer objectiJuris = caseApplication1.getObjectiJuris();
|
||||
String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
|
||||
",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
|
||||
if (objectiJuris == null) {
|
||||
datas.put("jurisdictionalObjection", null);
|
||||
} else if (objectiJuris == 1) {
|
||||
datas.put("jurisdictionalObjection", jurisdictionalObjection);
|
||||
} else {
|
||||
datas.put("jurisdictionalObjection", null);
|
||||
}
|
||||
String arbitratorName = caseApplication1.getArbitratorName();
|
||||
datas.put("arbitratorName", arbitratorName);
|
||||
Integer arbitratMethod = caseApplication1.getArbitratMethod();
|
||||
Date hearDate = caseApplication1.getHearDate();
|
||||
if (hearDate != null) {
|
||||
String hearDateStr = sdf.format(hearDate);
|
||||
//线上开庭时
|
||||
if (arbitratMethod == 1) {
|
||||
String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
|
||||
String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
|
||||
datas.put("onLine1", onLine1);
|
||||
datas.put("hearDate", hearDateStr);
|
||||
datas.put("onLine2", onLine2);
|
||||
} else {
|
||||
//书面仲裁时
|
||||
String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
|
||||
String written2 = "在仲裁委所在地开庭审理了本案。";
|
||||
datas.put("written1", written1);
|
||||
datas.put("hearDate1", hearDateStr);
|
||||
datas.put("written2", written2);
|
||||
}
|
||||
}
|
||||
Integer isAbsence = caseApplication1.getIsAbsence();
|
||||
if (isAbsence == null) {
|
||||
datas.put("absent1", null);
|
||||
datas.put("absent2", null);
|
||||
datas.put("absent3", null);
|
||||
datas.put("absent4", null);
|
||||
datas.put("absent5", null);
|
||||
datas.put("attend1", null);
|
||||
datas.put("attend2", null);
|
||||
datas.put("attend3", null);
|
||||
datas.put("attend4", null);
|
||||
datas.put("attend5", null);
|
||||
datas.put("attend6", null);
|
||||
datas.put("attend7", null);
|
||||
datas.put("appAgentName1", null);
|
||||
datas.put("appAgentName2", null);
|
||||
datas.put("resAgentName", null);
|
||||
} else if (isAbsence == 1) {
|
||||
//缺席审理
|
||||
String absent1 = "申请人的特别授权委托代理人";
|
||||
String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
|
||||
"《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。";
|
||||
String absent3 = "庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明," +
|
||||
"发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。";
|
||||
String absent4 = "(二/三)当事人提供的证据材料\n" +
|
||||
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
|
||||
String absent5 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
|
||||
"第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
|
||||
datas.put("absent1", absent1);
|
||||
datas.put("absent2", absent2);
|
||||
datas.put("absent3", absent3);
|
||||
datas.put("absent4", absent4);
|
||||
datas.put("absent5", absent5);
|
||||
datas.put("appAgentName1", nameAgentList.get(0));
|
||||
} else {
|
||||
//出席审理
|
||||
String attend1 = "申请人的特别授权委托代理人";
|
||||
String attend2 = "和被申请人本人/的特别授权委托代理人";
|
||||
String attend3 = "出席了庭审。";
|
||||
String attend4 = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;" +
|
||||
"双方当事人均出示了证据材料并对对方的证据材料进行了质证;申请人出示了证据材料," +
|
||||
"被申请人对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论," +
|
||||
"并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。";
|
||||
String attend5 = "(二)被申请人的答辩意见";
|
||||
String attend6 = "(二/三)当事人提供的证据材料及对方的质证意见\n" +
|
||||
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
|
||||
String attend7 = "被申请人对上述材料的质证意见为:";
|
||||
datas.put("attend1", attend1);
|
||||
datas.put("attend2", attend2);
|
||||
datas.put("attend3", attend3);
|
||||
datas.put("attend4", attend4);
|
||||
datas.put("attend5", attend5);
|
||||
datas.put("attend6", attend6);
|
||||
datas.put("attend7", attend7);
|
||||
datas.put("responCrossOpin", caseApplication1.getResponCrossOpin());
|
||||
datas.put("appAgentName2", nameAgentList.get(0));
|
||||
datas.put("resAgentName", nameAgentList.get(1));
|
||||
if (arbitratMethod == 1) {
|
||||
//被申出席+开庭
|
||||
String attend8 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
|
||||
"第五十一条的规定,裁决如下:";
|
||||
datas.put("attend8", attend8);
|
||||
} else {
|
||||
//被申出席+书面
|
||||
String attend9 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
|
||||
"第五十一条、第五十八条的规定,裁决如下:";
|
||||
datas.put("attend9", attend9);
|
||||
}
|
||||
}
|
||||
datas.put("claims", caseApplication1.getArbitratClaims());
|
||||
datas.put("request", caseApplication1.getRequestRule());
|
||||
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
|
||||
if (caseAttachList1 != null && caseAttachList1.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList1) {
|
||||
if (caseAttach.getAnnexType() == 6) { //被申请人证据材料
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
||||
if (isImageFile) {
|
||||
String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
||||
System.out.println("路径是===========" + annexPath);
|
||||
PictureRenderData pictureRenderData = WordUtil
|
||||
.rebuildImageContent(100, 100, null, annexPath);
|
||||
datas.put("resEvidenceMaterial", pictureRenderData);
|
||||
}
|
||||
} else if (caseAttach.getAnnexType() == 2) { //申请人证据材料
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
||||
if (isImageFile) {
|
||||
String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
||||
System.out.println("路径是===========" + annexPath);
|
||||
PictureRenderData pictureRenderData = WordUtil
|
||||
.rebuildImageContent(100, 100, null, annexPath);
|
||||
//申请人证据材料
|
||||
datas.put("appEvidenceMaterial", pictureRenderData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
datas.put("applicaCrossOpin", "被申请人证据不足,无法说明事实");
|
||||
datas.put("factDetermi", "被申请人欠款属实");
|
||||
datas.put("arbitrateThink", " 被申请人应按约定还款");
|
||||
datas.put("rulingFollows", "被申请人依法偿还申请人欠款");
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
datas.put("year", year);
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
|
||||
//String modalFilePath = "D:/develop/新裁决书模板.docx";
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
//String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
Path sourcePath = new File(modalFilePath).toPath();
|
||||
Path destinationPath = new File(resultFilePath).toPath();
|
||||
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
|
||||
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
||||
File file = new File(docFilePath);
|
||||
if (file.exists()) {
|
||||
InputStream in = new FileInputStream(file);
|
||||
XWPFDocument xwpfDocument = new XWPFDocument(in);
|
||||
WordUtil.changeText(xwpfDocument);
|
||||
}
|
||||
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||
CaseAttach caseAttach = CaseAttach.builder()
|
||||
.caseAppliId(id)
|
||||
.annexName(saveName)
|
||||
.annexPath(savePath)
|
||||
.annexType(3)
|
||||
.build();
|
||||
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
||||
CaseAttach caseAttach1 = new CaseAttach();
|
||||
caseAttach1.setAnnexType(3);
|
||||
caseAttach1.setCaseAppliId(id);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
//之前已经生成过了,更新
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
} else {
|
||||
//之前没生成过,新增
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
if (i > 0) {
|
||||
if (arbitrateRecord1 != null) {
|
||||
Integer annexId = caseAttach.getAnnexId();
|
||||
//将附件id保存到仲裁记录表里面
|
||||
arbitrateRecord1.setAnnexId(annexId);
|
||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
} catch (IOException e) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNewEquipmentNo() {
|
||||
Object awardNum = redisCache.getCacheObject("awardNum");
|
||||
if (awardNum == null) {
|
||||
redisCache.setCacheObject("awardNum", "00001");
|
||||
String s = redisCache.getCacheObject("awardNum").toString();
|
||||
// 字符串数字解析为整数
|
||||
int no = Integer.parseInt(s);
|
||||
// 最新设备编号自增1
|
||||
int newEquipment = ++no;
|
||||
// 将整数格式化为5位数字
|
||||
s = String.format("%05d", newEquipment);
|
||||
redisCache.setCacheObject("awardNum", s);
|
||||
return s;
|
||||
} else {
|
||||
String s = awardNum.toString();
|
||||
// 字符串数字解析为整数
|
||||
int no = Integer.parseInt(s);
|
||||
// 最新设备编号自增1
|
||||
int newEquipment = ++no;
|
||||
// 将整数格式化为5位数字
|
||||
s = String.format("%05d", newEquipment);
|
||||
redisCache.setCacheObject("awardNum", s);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
-511
@@ -1,511 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
@Service
|
||||
public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
@Autowired
|
||||
private CaseEvidenceMapper caseEvidenceMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult getCaseDetailsById(Long id, String userName) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 != null) {
|
||||
CaseDetailVO caseDetailVO = new CaseDetailVO();
|
||||
BeanUtils.copyProperties(caseApplication1, caseDetailVO);
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(id);
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
if (affiliate.getName() != null) {
|
||||
String name = affiliate.getName();
|
||||
//判断当前登录人和案件关联人姓名是否一致
|
||||
if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
|
||||
caseDetailVO.setIdentityType(affiliate.getIdentityType());
|
||||
}
|
||||
}
|
||||
if (affiliate.getIdentityType() == 1) { //申请人
|
||||
caseDetailVO.setApplicantName(affiliate.getName());
|
||||
} else {
|
||||
caseDetailVO.setRespondentName(affiliate.getName());
|
||||
}
|
||||
//根据案件id查询案件证据材料
|
||||
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
||||
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
|
||||
// for (CaseAttach caseAttach : evidenceMaterialList) {
|
||||
// //根据附件类型决定返回的路径
|
||||
// Integer annexType = caseAttach.getAnnexType();
|
||||
// if (annexType != 1){
|
||||
// String path = caseAttach.getAnnexName();
|
||||
// String prefix = "/profile";
|
||||
// int startIndex = path.indexOf(prefix);
|
||||
// startIndex += prefix.length();
|
||||
// String extractedPath = "/uploadPath" + path.substring(startIndex);
|
||||
// caseAttach.setAnnexPath(extractedPath);
|
||||
// }else {
|
||||
// String annexPath = caseAttach.getAnnexPath();
|
||||
// String result = annexPath.replace("/home/ruoyi", "");
|
||||
// caseAttach.setAnnexPath(result);
|
||||
// }
|
||||
// }
|
||||
|
||||
for (CaseAttach caseAttach : evidenceMaterialList) {
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
if(startIndex!=-1) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
|
||||
}
|
||||
return AjaxResult.success(caseDetailVO);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id, String userName, Long userId) {
|
||||
|
||||
if (file.isEmpty()) {
|
||||
return AjaxResult.error("请选择要上传的文件");
|
||||
}
|
||||
try {
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
|
||||
.annexName(fileName)
|
||||
.annexPath(filePath)
|
||||
.annexType(annexType)
|
||||
.userId(userId)
|
||||
.userName(userName)
|
||||
.build();
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
if (count > 0 && annexType != null && annexType != 8) {
|
||||
if (id != null) {
|
||||
//修改案件状态
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
caseApplication.setCaseStatus(4);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
}
|
||||
}
|
||||
CaseAttach caseAttachselect = new CaseAttach();
|
||||
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
if(StrUtil.isNotEmpty(annexName)) {
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
caseAttach.setAnnexName(annexNamenew);
|
||||
}
|
||||
}
|
||||
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
||||
return AjaxResult.success("上传成功", caseAttachselect);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
|
||||
// 是否为超级管理员
|
||||
int adMinFlag=0;
|
||||
String identityNum = "";
|
||||
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 查询该用户的角色
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
|
||||
String username = sysUser.getUserName();
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
for (SysRole role : roles) {
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
){
|
||||
// 超级管理员可查看所有待案件质证的案件
|
||||
adMinFlag=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(adMinFlag!=1) {
|
||||
authentication.setUserName(username);
|
||||
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
||||
if (authentication1 != null) {
|
||||
identityNum = authentication1.getIdentityNo();
|
||||
}
|
||||
}
|
||||
|
||||
List<Integer> caseStatusList = Arrays.asList(caseStatus);
|
||||
return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
if (i > 0) {
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_TRIAL, "");
|
||||
|
||||
return AjaxResult.success("证据确认成功");
|
||||
}
|
||||
return AjaxResult.error("暂无需要确认的证据");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) {
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseEvidenceDTO.getCaseId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 != null) {
|
||||
caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
|
||||
int caseStatus = caseApplication1.getCaseStatus();
|
||||
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
|
||||
caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
|
||||
caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter());
|
||||
caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris());
|
||||
caseApplication1.setRespondentIsWrittenHear(caseEvidenceDTO.getRespondentIsWrittenHear());
|
||||
List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
|
||||
if (arbitrators != null && arbitrators.size() > 0) {
|
||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
caseApplication1.setArbitratorId(idstr);
|
||||
caseApplication1.setArbitratorName(arbitratorNamestr);
|
||||
}
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
|
||||
|
||||
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT, "");
|
||||
|
||||
return AjaxResult.success("提交成功");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
|
||||
List<CaseAttach> successList = new ArrayList<>();
|
||||
try {
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
for (MultipartFile file : files) {
|
||||
// 上传
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
|
||||
.annexName(fileName)
|
||||
.annexPath(filePath)
|
||||
.annexType(annexType)
|
||||
.userId(userId)
|
||||
.userName(userName)
|
||||
.isBatchUpload(1)
|
||||
.build();
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
if (count > 0 && annexType != null && annexType != 8) {
|
||||
CaseAttach caseAttachselect = new CaseAttach();
|
||||
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
||||
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
||||
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
||||
successList.add(caseAttachselect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
// 给秘书发送短信
|
||||
// 根据caseid查询该案件的法律顾问,根据案件id查申请表,查到申请机构id,然后拿申请机构id查询在哪个人下并且角色要是法律顾问
|
||||
CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
|
||||
if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
|
||||
List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
|
||||
if(CollectionUtil.isNotEmpty(userList)){
|
||||
// 新增短信记录
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
// 1992106 普通短信 修改证据资料通知 尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
|
||||
request.setTemplateId("1992106");
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
for (SysUser user : userList) {
|
||||
request.setPhone(user.getPhonenumber());
|
||||
request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
|
||||
|
||||
smsSendRecord.setCaseNum(caseApplication.getCaseNum());
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + user.getNickName() + ",您的"+caseApplication.getCaseNum()+"仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return AjaxResult.success("上传成功", successList);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseAppliId);
|
||||
caseApplication.setAnnexTypeList(annexTypeList);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
if (CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(caseAttachList);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteFile(List<Integer> fileIds) {
|
||||
return caseAttachMapper.deleteByFileIds(fileIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory) {
|
||||
List<CaseEvidenceDirectory> caseEvidenceDirectorys = SpringUtils.getAopProxy(this).selectCaseEvidenceList(caseEvidenceDirectory);
|
||||
return buildCaseEvidenceTreeSelect(caseEvidenceDirectorys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory) {
|
||||
return caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
|
||||
List<CaseEvidenceDirectory> returnList = new ArrayList<>();
|
||||
List<Long> tempList = caseEvidenceDirectorys.stream().map(CaseEvidenceDirectory::getId).collect(Collectors.toList());
|
||||
for (CaseEvidenceDirectory caseEvidenceDirectory : caseEvidenceDirectorys) {
|
||||
String annexName = caseEvidenceDirectory.getAnnexName();
|
||||
if (annexName!=null){
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
caseEvidenceDirectory.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if(startIndexnew!=-1){
|
||||
String annexNamenew = annexName.substring(startIndexnew+1);
|
||||
caseEvidenceDirectory.setAnnexName(annexNamenew);
|
||||
}
|
||||
}
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(caseEvidenceDirectory.getParentId())) {
|
||||
recursionFn(caseEvidenceDirectorys, caseEvidenceDirectory);
|
||||
returnList.add(caseEvidenceDirectory);
|
||||
}
|
||||
}
|
||||
if (returnList.isEmpty())
|
||||
{
|
||||
returnList = caseEvidenceDirectorys;
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
|
||||
List<CaseEvidenceDirectory> caseEvidenceDirectories = buildCaseEvidenceTree(caseEvidenceDirectorys);
|
||||
return caseEvidenceDirectories.stream().map(CaseEvidenceDirectoryVO::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult uploadRecord(MultipartFile file, Integer annexType, Long id, String username, Long userId) {
|
||||
if (file.isEmpty()) {
|
||||
return AjaxResult.error("请选择要上传的文件");
|
||||
}
|
||||
try {
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
|
||||
.annexName(fileName)
|
||||
.annexPath(filePath)
|
||||
.annexType(annexType)
|
||||
.userId(userId)
|
||||
.userName(username)
|
||||
.build();
|
||||
|
||||
CaseApplication caseApplicationsel = new CaseApplication();
|
||||
caseApplicationsel.setId(id);
|
||||
caseApplicationsel.setAnnexType(7);
|
||||
List<CaseAttach> caseAttachs = caseAttachMapper.queryCaseAttachList(caseApplicationsel);
|
||||
if(caseAttachs!=null&&caseAttachs.size()>0){
|
||||
caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,7);
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
}else {
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
}
|
||||
|
||||
return AjaxResult.success("上传成功");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return AjaxResult.error("上传失败");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归列表
|
||||
*/
|
||||
private void recursionFn(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||
// 得到子节点列表
|
||||
List<CaseEvidenceDirectory> childList = getChildList(list, t);
|
||||
t.setChildren(childList);
|
||||
for (CaseEvidenceDirectory tChild : childList) {
|
||||
if (hasChild(list, tChild)) {
|
||||
recursionFn(list, tChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到子节点列表
|
||||
*/
|
||||
private List<CaseEvidenceDirectory> getChildList(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||
List<CaseEvidenceDirectory> tlist = new ArrayList<>();
|
||||
Iterator<CaseEvidenceDirectory> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
CaseEvidenceDirectory n = it.next();
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否有子节点
|
||||
*/
|
||||
private boolean hasChild(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||
return getChildList(list, t).size() > 0;
|
||||
}
|
||||
|
||||
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
||||
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
||||
// todo 返回房间号和开庭时间
|
||||
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|
||||
for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
|
||||
//根据案件id查询姓名
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
if (affiliate.getIdentityType() == 1) { //申请人
|
||||
caseEvidenceVO.setApplicantName(affiliate.getName());
|
||||
} else {
|
||||
caseEvidenceVO.setRespondentName(affiliate.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return caseListByRespondent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
-328
@@ -1,328 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.SpringUtil;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description excel导入校验
|
||||
* @date 2023-12-11 11:45
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CaseImportValid {
|
||||
private CaseApplication caseApplication;
|
||||
private Map<String, Long> deptMap;
|
||||
// 手机号正则
|
||||
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
||||
// 邮箱正则
|
||||
private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
|
||||
private static SysUserMapper sysUserMapper= SpringUtil.getBean(SysUserMapper.class);
|
||||
|
||||
/**
|
||||
* 导入校验
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param
|
||||
*/
|
||||
public void importValid(CaseApplication caseApplication, Map<String, Long> deptMap) {
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
caseApplication.setErrorMsg(failureMsg);
|
||||
// 校验基本字段
|
||||
validBaseColumn(caseApplication, failureMsg);
|
||||
// 校验申请人信息
|
||||
validApplicationColumn(caseApplication, failureMsg);
|
||||
// 校验申请人代理信息
|
||||
validApplicationAgentColumn(caseApplication, failureMsg, deptMap);
|
||||
// 校验被申请人信息
|
||||
validDebtorApplicationColumn(caseApplication, failureMsg);
|
||||
// 校验被申请人代理信息
|
||||
validDebtorApplicationAgentColumn(caseApplication, failureMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验被申请人代理信息
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
*/
|
||||
private void validDebtorApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorNameAgent())) {
|
||||
failureMsg.append("【被申请人主体信息-代理人姓名】字段不能为空;");
|
||||
} else if (caseApplication.getDebtorNameAgent().length() > 50) {
|
||||
failureMsg.append("【被申请人主体信息-代理人姓名】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
|
||||
failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
|
||||
} else if (!IdcardUtil.isValidCard((caseApplication.getDebtorIdentityNumAgent()))) {
|
||||
failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
|
||||
}
|
||||
String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
|
||||
if (StrUtil.isEmpty(debtorContactTelphoneAgent)) {
|
||||
failureMsg.append("【被申请人主体信息-代理人联系电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(debtorContactTelphoneAgent).matches()) {
|
||||
failureMsg.append("【被申请人主体信息-代理人联系电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorContactAddressAgent())) {
|
||||
failureMsg.append("【被申请人主体信息-代理人联系地址】字段不能为空;");
|
||||
} else if (caseApplication.getDebtorContactAddressAgent().length() > 50) {
|
||||
failureMsg.append("【被申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验被申请人信息
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
*/
|
||||
private void validDebtorApplicationColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorName())) {
|
||||
failureMsg.append("【被申请人主体信息-申请人姓名】字段不能为空;");
|
||||
} else if (caseApplication.getDebtorName().length() > 50) {
|
||||
failureMsg.append("【被申请人主体信息-申请人姓名】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
|
||||
failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
|
||||
} else if (!IdcardUtil.isValidCard(caseApplication.getDebtorIdentityNum())) {
|
||||
failureMsg.append("【被申请人主体信息-身份证号】不合法;");
|
||||
}
|
||||
String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
|
||||
if (StrUtil.isEmpty(debtorContactTelphone)) {
|
||||
failureMsg.append("【被申请人主体信息-联系电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(debtorContactTelphone).matches()) {
|
||||
failureMsg.append("【被申请人主体信息-联系电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorContactAddress())) {
|
||||
failureMsg.append("【被申请人主体信息-联系地址】字段不能为空;");
|
||||
} else if (caseApplication.getDebtorContactAddress().length() > 50) {
|
||||
failureMsg.append("【被申请人主体信息-联系地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
String debtorWorkTelphone = caseApplication.getDebtorWorkTelphone();
|
||||
if (StrUtil.isEmpty(debtorWorkTelphone)) {
|
||||
failureMsg.append("【被申请人主体信息-单位电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(debtorWorkTelphone).matches()) {
|
||||
failureMsg.append("【被申请人主体信息-单位电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorWorkAddress())) {
|
||||
failureMsg.append("【被申请人主体信息-单位地址】字段不能为空;");
|
||||
} else if (caseApplication.getDebtorWorkAddress().length() > 50) {
|
||||
failureMsg.append("【被申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getResponSex())) {
|
||||
failureMsg.append("【被申请人主体信息-性别】字段不能为空;");
|
||||
} else if (caseApplication.getResponSex().length() > 1) {
|
||||
failureMsg.append("【被申请人主体信息-性别】字段超出指定长度,最大长度为1;");
|
||||
}
|
||||
if (caseApplication.getResponBirth() == null) {
|
||||
failureMsg.append("【被申请人主体信息-出生年月日】字段不合法;");
|
||||
} else if (caseApplication.getResponBirth().after(new Date())) {
|
||||
failureMsg.append("【被申请人主体信息-出生年月日】字段不合法,不能超过当前日期;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
|
||||
failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
|
||||
} else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
|
||||
|
||||
failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验申请人代理信息
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
*/
|
||||
private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg, Map<String, Long> deptMap) {
|
||||
if (StrUtil.isEmpty(caseApplication.getNameAgent())) {
|
||||
failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;");
|
||||
} else if (caseApplication.getNameAgent().length() > 50) {
|
||||
failureMsg.append("【申请人主体信息-代理人姓名】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getIdentityNumAgent())) {
|
||||
failureMsg.append("【申请人主体信息-代理人身份证号】字段不能为空;");
|
||||
} else if (!IdcardUtil.isValidCard(caseApplication.getIdentityNumAgent())) {
|
||||
failureMsg.append("【申请人主体信息-代理人身份证号】不合法;");
|
||||
}
|
||||
validAgentInfo(caseApplication, failureMsg, deptMap);
|
||||
String contactTelphoneAgent = caseApplication.getContactTelphoneAgent();
|
||||
if (StrUtil.isEmpty(contactTelphoneAgent)) {
|
||||
failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(contactTelphoneAgent).matches()) {
|
||||
failureMsg.append("【申请人主体信息-代理人联系电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getContactAddressAgent())) {
|
||||
failureMsg.append("【申请人主体信息-代理人联系地址】字段不能为空;");
|
||||
} else if (caseApplication.getContactAddressAgent().length() > 50) {
|
||||
failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验代理人与组织机构关系
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
* @return
|
||||
*/
|
||||
private void validAgentInfo(CaseApplication caseApplication, StringBuilder failureMsg, Map<String, Long> deptMap) {
|
||||
// 申请机构与代理人都不为空,校验代理人与组织机构关系(代理人必须在该部门下)
|
||||
if (StrUtil.isNotEmpty(caseApplication.getName()) && StrUtil.isNotEmpty(caseApplication.getNameAgent())) {
|
||||
String applicationOrganId = "";
|
||||
// 申请机构已经存在
|
||||
if (deptMap.containsKey(caseApplication.getName())) {
|
||||
applicationOrganId = String.valueOf(deptMap.get(caseApplication.getName()));
|
||||
}
|
||||
// 根据代理人身份证去用户表查询
|
||||
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseApplication.getIdentityNumAgent());
|
||||
// 代理人的部门和申请机构不匹配
|
||||
if (null != agentUser && null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(applicationOrganId)) {
|
||||
// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
|
||||
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
|
||||
failureMsg.append("该申请代理人已在【").append(agentUser.getDept().getDeptName()).append("】申请机构下存在,请检查填写信息是否正确");
|
||||
} else {
|
||||
failureMsg.append("该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验申请人主题信息
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
*/
|
||||
private void validApplicationColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
|
||||
if (StrUtil.isEmpty(caseApplication.getName())) {
|
||||
failureMsg.append("【申请人主体信息-申请人(机构)】字段不能为空;");
|
||||
} else if (caseApplication.getName().length() > 20) {
|
||||
failureMsg.append("【申请人主体信息-申请人(机构)】字段超出指定长度,最大长度为20;");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(caseApplication.getIdentityNum()) && caseApplication.getIdentityNum().length() > 50) {
|
||||
failureMsg.append("【申请人主体信息-代码】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
String contactTelphone = caseApplication.getContactTelphone();
|
||||
if (StrUtil.isEmpty(contactTelphone)) {
|
||||
failureMsg.append("【申请人主体信息-联系电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(contactTelphone).matches()) {
|
||||
failureMsg.append("【申请人主体信息-联系电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getContactAddress())) {
|
||||
failureMsg.append("【申请人主体信息-联系地址】字段不能为空;");
|
||||
} else if (caseApplication.getName().length() > 50) {
|
||||
failureMsg.append("【申请人主体信息-联系地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
String workTelphone = caseApplication.getWorkTelphone();
|
||||
if (StrUtil.isEmpty(workTelphone)) {
|
||||
failureMsg.append("【申请人主体信息-单位电话】字段不能为空;");
|
||||
} else if (!TELEPHONE_REGX.matcher(workTelphone).matches()) {
|
||||
failureMsg.append("【申请人主体信息-单位电话】字段不合法;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getWorkAddress())) {
|
||||
failureMsg.append("【申请人主体信息-单位地址】字段不能为空;");
|
||||
} else if (caseApplication.getWorkAddress().length() > 50) {
|
||||
failureMsg.append("【申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getEmail())) {
|
||||
failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
|
||||
} else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
|
||||
|
||||
failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验基本字段
|
||||
*
|
||||
* @param caseApplication
|
||||
* @param failureMsg
|
||||
*/
|
||||
private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
|
||||
if (StrUtil.isEmpty(caseApplication.getCaseName())) {
|
||||
failureMsg.append("【案件名称】字段不能为空;");
|
||||
} else if (caseApplication.getCaseName().length() > 50) {
|
||||
failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount();
|
||||
if (null == caseSubjectAmount) {
|
||||
failureMsg.append("【案件标的】字段不合法;");
|
||||
} else {
|
||||
if (caseSubjectAmount.compareTo(new BigDecimal("0")) < 0 || caseSubjectAmount.compareTo(new BigDecimal("99999999.99")) > 0) {
|
||||
failureMsg.append("【案件标的】字段超出范围,范围为[0,100000000);");
|
||||
}
|
||||
if (caseSubjectAmount.scale() > 2) {
|
||||
failureMsg.append("【案件标的】字段超出指定精度(10^-2);");
|
||||
}
|
||||
}
|
||||
if (caseApplication.getLoanStartDate() == null) {
|
||||
failureMsg.append("【借款开始日期】字段不合法;");
|
||||
}
|
||||
if (caseApplication.getLoanEndDate() == null) {
|
||||
failureMsg.append("【借款结束日期】字段不合法;");
|
||||
}
|
||||
if (caseApplication.getLoanStartDate() != null && caseApplication.getLoanEndDate() != null && caseApplication.getLoanStartDate().after(caseApplication.getLoanEndDate())) {
|
||||
failureMsg.append("【借款结束日期】不能早于【借款开始日期】;");
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getContractNumber())) {
|
||||
failureMsg.append("【合同编号】字段不能为空;");
|
||||
} else if (caseApplication.getContractNumber().length() > 50) {
|
||||
failureMsg.append("【合同编号】字段超出指定长度,最大长度为50;");
|
||||
}
|
||||
BigDecimal claimPrinciOwed = caseApplication.getClaimPrinciOwed();
|
||||
if (null == claimPrinciOwed) {
|
||||
failureMsg.append("【申请人主张欠本金】字段不合法;");
|
||||
} else {
|
||||
if (claimPrinciOwed.compareTo(new BigDecimal("0")) < 0 || claimPrinciOwed.compareTo(new BigDecimal("99999999.99")) > 0) {
|
||||
failureMsg.append("【申请人主张欠本金】字段超出范围,范围为[0,100000000);");
|
||||
}
|
||||
if (claimPrinciOwed.scale() > 2) {
|
||||
failureMsg.append("【申请人主张欠本金】字段超出指定精度(10^-2);");
|
||||
}
|
||||
}
|
||||
BigDecimal claimInterestOwed = caseApplication.getClaimInterestOwed();
|
||||
if (null == claimInterestOwed) {
|
||||
failureMsg.append("【申请人主张欠利息】字段不合法;");
|
||||
} else {
|
||||
if (claimInterestOwed.compareTo(new BigDecimal("0")) < 0 || claimInterestOwed.compareTo(new BigDecimal("99999999.99")) > 0) {
|
||||
failureMsg.append("【申请人主张欠利息】字段超出范围,范围为[0,100000000);");
|
||||
}
|
||||
if (claimInterestOwed.scale() > 2) {
|
||||
failureMsg.append("【申请人主张欠利息】字段超出指定精度(10^-2);");
|
||||
}
|
||||
}
|
||||
BigDecimal claimLiquidDamag = caseApplication.getClaimLiquidDamag();
|
||||
if (null == claimLiquidDamag) {
|
||||
failureMsg.append("【申请人主张违约金】字段不合法;");
|
||||
} else {
|
||||
if (claimLiquidDamag.compareTo(new BigDecimal("0")) < 0 || claimLiquidDamag.compareTo(new BigDecimal("99999999.99")) > 0) {
|
||||
failureMsg.append("【申请人主张违约金】字段超出范围,范围为[0,100000000);");
|
||||
}
|
||||
if (claimLiquidDamag.scale() > 2) {
|
||||
failureMsg.append("【申请人主张违约金】字段超出指定精度(10^-2);");
|
||||
}
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getArbitratClaims())) {
|
||||
failureMsg.append("【申请人仲裁请求及事实和理由】字段不能为空;");
|
||||
} else if (caseApplication.getArbitratClaims().length() > 10000) {
|
||||
failureMsg.append("【申请人仲裁请求及事实和理由】字段超出指定长度,最大长度为10000;");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(caseApplication.getArbitratClaims()) && caseApplication.getArbitratClaims().length() > 10000) {
|
||||
failureMsg.append("【申请人请求仲裁庭裁决】字段超出指定长度,最大长度为10000;");
|
||||
}
|
||||
}
|
||||
}
|
||||
-491
@@ -1,491 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.ElegentPay;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.dto.PayResponse;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
@Service
|
||||
public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
private final ElegentPay elegentPay;
|
||||
private final CaseApplicationMapper caseApplicationMapper;
|
||||
private final CasePaymentRecordMapper casePaymentRecordMapper;
|
||||
private final CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
|
||||
@Autowired
|
||||
public CasePaymentServiceImpl(ElegentPay elegentPay
|
||||
, CaseApplicationMapper caseApplicationMapper
|
||||
, CasePaymentRecordMapper casePaymentRecordMapper
|
||||
, CaseAffiliateMapper caseAffiliateMapper
|
||||
) {
|
||||
this.elegentPay = elegentPay;
|
||||
this.caseApplicationMapper = caseApplicationMapper;
|
||||
this.casePaymentRecordMapper = casePaymentRecordMapper;
|
||||
this.caseAffiliateMapper = caseAffiliateMapper;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult casePay(CasePayDTO casePayDTO) {
|
||||
PayRequest payRequest = new PayRequest();
|
||||
payRequest.setBody("案件缴费");
|
||||
payRequest.setOrderSn(System.currentTimeMillis() + "");
|
||||
payRequest.setTotalFee(casePayDTO.getTotalFee());
|
||||
PayResponse response = elegentPay.requestPay(payRequest, casePayDTO.getTradeType(), casePayDTO.getPlatform());
|
||||
if (response.getCode_url() == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
List<Long> caseIds = casePayDTO.getCaseIds();
|
||||
if (CollectionUtil.isEmpty(caseIds)) {
|
||||
return AjaxResult.error("请检查参数是否有误");
|
||||
}
|
||||
for (Long caseId : caseIds) {
|
||||
//缴费记录表里新增数据
|
||||
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
|
||||
casePaymentRecord.setCaseId(caseId);
|
||||
casePaymentRecord.setOrderNumber(payRequest.getOrderSn());
|
||||
casePaymentRecord.setPaymentStatus(0);
|
||||
casePaymentRecord.setCreateTime(new Date());
|
||||
int count = casePaymentRecordMapper.saveRecord(casePaymentRecord);
|
||||
if (count < 1) {
|
||||
return AjaxResult.error("请检查参数是否有误");
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(response);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public AjaxResult callback(String orderNumber) {
|
||||
//查询记录
|
||||
List<CasePaymentRecord> casePaymentRecords = casePaymentRecordMapper.queryRecord(orderNumber);
|
||||
if(casePaymentRecords!=null&&casePaymentRecords.size()>0){
|
||||
for (CasePaymentRecord casePaymentRecord:casePaymentRecords){
|
||||
Long caseId = casePaymentRecord.getCaseId();
|
||||
//更改记录表里的支付状态和支付时间
|
||||
casePaymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
casePaymentRecordMapper.update(casePaymentRecord);
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("未查询到相关记录");
|
||||
}
|
||||
return AjaxResult.success("支付成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult confirmPayment( List<Long> ids) {
|
||||
for (Long id : ids) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
continue;
|
||||
}
|
||||
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
if (identityType == 1) { //申请人
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("1928003"); //传入申请人模板id
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 模板id:1928003 普通短信 案件受理通知
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseNum);
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
} else { //被申请人
|
||||
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("1952840");
|
||||
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseNum);
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
}
|
||||
}
|
||||
//更改记录表里的支付状态和支付时间
|
||||
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
|
||||
casePaymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
casePaymentRecordMapper.update(casePaymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
|
||||
List<Long> caseIds = payDTO.getCaseIds();
|
||||
if (caseIds == null || caseIds.size() == 0) {
|
||||
return AjaxResult.error("案件id参数有误");
|
||||
}
|
||||
if (payDTO.getPayType() != null) {
|
||||
// 修改支付方式
|
||||
caseApplicationMapper.updatePayType(payDTO);
|
||||
}
|
||||
for (Long caseId : caseIds) {
|
||||
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(caseId);
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
// 修改支付状态
|
||||
CasePaymentRecord paymentRecord = new CasePaymentRecord();
|
||||
paymentRecord.setPayType(payDTO.getPayType());
|
||||
paymentRecord.setCaseId(caseId);
|
||||
paymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecordMapper.saveRecord(paymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult casePayList(CasePayDTO casePayDTO) {
|
||||
//参数校验
|
||||
List<Long> caseIds = casePayDTO.getCaseIds();
|
||||
if (caseIds == null || caseIds.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
BigDecimal totalCost = new BigDecimal(0);
|
||||
BigDecimal sum = totalCost;
|
||||
CasePayListVO listVO = new CasePayListVO();
|
||||
listVO.setCaseTotal(caseIds.size());
|
||||
List<CaseApplicationPay> caseApplicationList = new ArrayList<>();
|
||||
for (Long caseId : caseIds) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
CaseApplicationPay caseApplicationPay = new CaseApplicationPay();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
BigDecimal feePayable = caseApplication1.getFeePayable();
|
||||
sum = sum.add(feePayable);
|
||||
listVO.setTotalFee(sum);
|
||||
caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
|
||||
caseApplicationPay.setCaseResName(caseApplication1.getRespondentName());
|
||||
caseApplicationPay.setCaseNum(caseApplication1.getCaseNum());
|
||||
caseApplicationPay.setCaseStatus(caseApplication1.getCaseStatus());
|
||||
caseApplicationPay.setCaseSubjectAmount(caseApplication1.getCaseSubjectAmount());
|
||||
caseApplicationPay.setFeePayable(caseApplication1.getFeePayable());
|
||||
caseApplicationList.add(caseApplicationPay);
|
||||
listVO.setCaseApplicationList(caseApplicationList);
|
||||
}
|
||||
|
||||
if (sum.compareTo(BigDecimal.ZERO) == 0) {
|
||||
return AjaxResult.error("没有可支付的费用");
|
||||
}
|
||||
return AjaxResult.success(listVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult confirmPayBatch(CasePayDTO payDTO) {
|
||||
|
||||
String batchNumber = payDTO.getBatchNumber();
|
||||
CaseApplication caseApplicationsel = new CaseApplication();
|
||||
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
|
||||
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
|
||||
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
||||
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
|
||||
if(caseApplications!=null&&caseApplications.size()>0){
|
||||
if (payDTO.getPayType() != null) {
|
||||
payDTO.setCaseIds(caseIds);
|
||||
// 修改支付方式
|
||||
CaseConfirmPayDTO caseConfirmPayDTO = new CaseConfirmPayDTO();
|
||||
BeanUtils.copyProperties(payDTO, caseConfirmPayDTO);
|
||||
caseApplicationMapper.updatePayType(caseConfirmPayDTO);
|
||||
}
|
||||
for (Long caseId : caseIds) {
|
||||
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(caseId);
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
// 修改支付状态
|
||||
CasePaymentRecord paymentRecord = new CasePaymentRecord();
|
||||
paymentRecord.setPayType(payDTO.getPayType());
|
||||
paymentRecord.setCaseId(caseId);
|
||||
paymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecordMapper.saveRecord(paymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
throw new ServiceException("这个批号没有批量缴费的案件");
|
||||
}
|
||||
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult casePayListBatch(CasePayDTO casePayDTO) {
|
||||
String batchNumber = casePayDTO.getBatchNumber();
|
||||
CaseApplication caseApplicationsel = new CaseApplication();
|
||||
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
|
||||
// caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
|
||||
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
||||
CasePayListVO listVO = new CasePayListVO();
|
||||
BigDecimal sum = new BigDecimal(0);
|
||||
if(caseApplications!=null&&caseApplications.size()>0){
|
||||
for(CaseApplication caseApplication:caseApplications){
|
||||
BigDecimal feePayable = caseApplication.getFeePayable();
|
||||
sum = sum.add(feePayable);
|
||||
}
|
||||
listVO.setTotalFee(sum);
|
||||
}
|
||||
if (sum.compareTo(BigDecimal.ZERO) == 0) {
|
||||
return AjaxResult.error("没有可支付的费用");
|
||||
}
|
||||
return AjaxResult.success(listVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult confirmPaymentBatch(String batchNumber) {
|
||||
CaseApplication caseApplicationsel = new CaseApplication();
|
||||
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
|
||||
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
||||
|
||||
if (caseApplications != null && caseApplications.size() > 0) {
|
||||
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
|
||||
for (Long caseId : caseIds) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
continue;
|
||||
}
|
||||
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
if (identityType == 1) { //申请人
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("1928003"); //传入申请人模板id
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 模板id:1928003 普通短信 案件受理通知
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseNum);
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
} else { //被申请人
|
||||
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("1952840");
|
||||
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseNum);
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
}
|
||||
}
|
||||
//更改记录表里的支付状态和支付时间
|
||||
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
|
||||
casePaymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecord.setCaseId(caseId);
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
casePaymentRecordMapper.update(casePaymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
throw new ServiceException("这个批号没有批量缴费确认的案件");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult casePayBatch(CasePayDTO casePayDTO) {
|
||||
PayRequest payRequest = new PayRequest();
|
||||
payRequest.setBody("案件缴费");
|
||||
payRequest.setOrderSn(System.currentTimeMillis() + "");
|
||||
payRequest.setTotalFee(casePayDTO.getTotalFee());
|
||||
PayResponse response = elegentPay.requestPay(payRequest, casePayDTO.getTradeType(), casePayDTO.getPlatform());
|
||||
if (response.getCode_url() == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
String batchNumber = casePayDTO.getBatchNumber();
|
||||
if(StringUtils.isEmpty(batchNumber) ){
|
||||
return AjaxResult.error("请检查参数是否有误");
|
||||
}
|
||||
CaseApplication caseApplicationsel = new CaseApplication();
|
||||
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
|
||||
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
|
||||
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
||||
if(caseApplications!=null&&caseApplications.size()>0){
|
||||
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
|
||||
for (Long caseId : caseIds) {
|
||||
//缴费记录表里新增数据
|
||||
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
|
||||
casePaymentRecord.setCaseId(caseId);
|
||||
casePaymentRecord.setOrderNumber(payRequest.getOrderSn());
|
||||
casePaymentRecord.setPaymentStatus(0);
|
||||
casePaymentRecord.setCreateTime(new Date());
|
||||
int count = casePaymentRecordMapper.saveRecord(casePaymentRecord);
|
||||
if (count < 1) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return AjaxResult.success(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-1035
File diff suppressed because it is too large
Load Diff
-485
@@ -1,485 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.PdfUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.VideoService;
|
||||
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
|
||||
import com.tencentcloudapi.common.Credential;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||
import com.tencentcloudapi.common.profile.HttpProfile;
|
||||
import com.tencentcloudapi.trtc.v20190722.TrtcClient;
|
||||
import com.tencentcloudapi.trtc.v20190722.models.*;
|
||||
import com.tencentcloudapi.vod.v20180717.VodClient;
|
||||
import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosRequest;
|
||||
import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosResponse;
|
||||
import com.tencentyun.TLSSigAPIv2;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 视频录制
|
||||
* @date 2023-10-26 11:45
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class VideoServiceImpl implements VideoService {
|
||||
// 腾讯云即时通信sdkAppId
|
||||
@Value("${imConfig.sdkAppId}")
|
||||
private long sdkAppId;
|
||||
// 腾讯云即时通信密钥
|
||||
@Value("${imConfig.sdkSecretKey}")
|
||||
private String sdkSecretKey;
|
||||
// 腾讯云个人账户secretId
|
||||
@Value("${imConfig.secretId}")
|
||||
private String secretId;
|
||||
// 腾讯云个人账户密钥
|
||||
@Value("${imConfig.secretKey}")
|
||||
private String secretKey;
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
|
||||
/**
|
||||
* 功能:第三方回调sign校验
|
||||
* 参数:
|
||||
* key:控制台配置的密钥key
|
||||
* body:腾讯云回调返回的body体
|
||||
* sign:腾讯云回调返回的签名值sign
|
||||
* 返回值:
|
||||
* Status:OK 表示校验通过,FAIL 表示校验失败,具体原因参考Info
|
||||
* Info:成功/失败信息
|
||||
* @param body
|
||||
* @param request
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void videoRollBack(String body, HttpServletRequest request) {
|
||||
String key = "key";
|
||||
String sdkAppId = request.getHeader("SdkAppId");
|
||||
String sign = request.getHeader("Sign");
|
||||
// String resultSign = getResultSign(key,body);
|
||||
// log.info("resultSign:"+resultSign);
|
||||
// if (resultSign.equals(sign)) {
|
||||
JSONObject jsonObject = (JSONObject) JSON.parse(body);
|
||||
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
|
||||
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
|
||||
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
|
||||
String roomId = jsonObject1.getString("RoomId");
|
||||
String taskId = jsonObject1.getString("TaskId"); // 任务ID
|
||||
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
|
||||
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
|
||||
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
|
||||
JSONObject jsonObject3 = (JSONObject) JSON.parse(tencentVod);
|
||||
// 录制视频上传成功
|
||||
if (eventType == 311) {
|
||||
// 点播平台的唯一 ID
|
||||
String fileId = jsonObject3.getString("FileId");
|
||||
// 点播平台的播放地址
|
||||
String videoUrl = jsonObject3.getString("VideoUrl");
|
||||
// 主辅流标识,main 代表主流(摄像头),aux 代表辅流(屏幕分享),mix 代表混流录制
|
||||
String mediaId = jsonObject3.getString("MediaId");
|
||||
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
|
||||
try {
|
||||
downloadImage(fileId,videoUrl,roomId);
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult bindCaseId(Long caseId, String roomId) {
|
||||
caseApplicationMapper .bindCaseId(caseId,roomId);
|
||||
return success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult videoList(Long caseId) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
caseApplication.setAnnexType(9);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
if(CollectionUtil.isEmpty(caseAttachList)){
|
||||
return success();
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
return success(caseAttachList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启腾讯云录制
|
||||
* @param roomId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult openCloudRecording(long caseId,long roomId) {
|
||||
try {
|
||||
String userId="recorder_"+roomId;
|
||||
|
||||
Credential cred = new Credential(secretId, secretKey);
|
||||
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
|
||||
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
CreateCloudRecordingRequest req = new CreateCloudRecordingRequest();
|
||||
req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同
|
||||
req.setRoomId(String.valueOf(roomId)); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId
|
||||
req.setRoomIdType(1L);
|
||||
/**
|
||||
* 录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),
|
||||
* 注意这个UserId不能与其他TRTC房间内的主播或者其他录制任务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分,
|
||||
* 即录制机器人进入房间的userid应保证独立且唯一
|
||||
*/
|
||||
req.setUserId(userId);
|
||||
|
||||
TLSSigAPIv2 api = new TLSSigAPIv2(sdkAppId, sdkSecretKey);
|
||||
String userSign = api.genUserSig(userId, 60 * 60 * 10);
|
||||
req.setUserSig(userSign); // 录制机器人用于进入TRTC房间拉流的用户签名,当前 UserId 对应的验证签名,相当于登录密码
|
||||
RecordParams recordParams = new RecordParams();
|
||||
// 混流录制
|
||||
recordParams.setMaxIdleTime(60L*5); // 5分钟内房间里面没有主播,自动停止录制
|
||||
recordParams.setStreamType(0L); // 0:录制音频+视频流(默认); 1:仅录制音频流; 2:仅录制视频流
|
||||
recordParams.setRecordMode(2L); // 1:单流录制,分别录制房间的订阅UserId的音频和视频,将录制文件上传至云存储; 2:混流录制,将房间内订阅UserId的音视频混录成一个音视频文件,将录制文件上传至云存储;
|
||||
recordParams.setOutputFormat(0L); // 0:(默认)输出文件为hls格式。1:输出文件格式为hls+mp4。2:输出文件格式为hls+aac
|
||||
MixLayoutParams mixLayoutParams = new MixLayoutParams();
|
||||
// 布局模式: 1:悬浮布局;2:屏幕分享布局;3:九宫格布局(默认);4:自定义布局;
|
||||
mixLayoutParams.setMixLayoutMode(3L);
|
||||
req.setMixLayoutParams(mixLayoutParams);
|
||||
|
||||
StorageParams storageParams1 = new StorageParams();
|
||||
CloudVod cloudVod = new CloudVod();
|
||||
TencentVod tencentVod = new TencentVod();
|
||||
tencentVod.setSubAppId(1304001529L);
|
||||
// 录制的文件永久保存
|
||||
tencentVod.setExpireTime(0L);
|
||||
// 录制文件名拼接前缀
|
||||
tencentVod.setUserDefineRecordId(caseId+"");
|
||||
cloudVod.setTencentVod(tencentVod); // 腾讯云点播相关参数。
|
||||
storageParams1.setCloudVod(cloudVod); // 必填】腾讯云云点播的账号信息,目前仅支持存储至腾讯云点播VOD。
|
||||
req.setRecordParams(recordParams); // 云端录制控制参数
|
||||
req.setStorageParams(storageParams1); // 云端录制文件上传到云存储的参数(目前只支持使用腾讯云点播作为存储)
|
||||
// 返回的resp是一个CreateCloudRecordingResponse的实例,与请求对象对应
|
||||
CreateCloudRecordingResponse resp = client.CreateCloudRecording(req);
|
||||
|
||||
return success((JSONObject) JSON.toJSON(resp));
|
||||
} catch (TencentCloudSDKException e) {
|
||||
return AjaxResult.error(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult closeDeleteCloudRecording(String taskId) {
|
||||
|
||||
try {
|
||||
if (taskId != null) {
|
||||
taskId = taskId.replaceAll(" ", "+");
|
||||
}
|
||||
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
|
||||
// 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
|
||||
// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
|
||||
Credential cred = new Credential(secretId, secretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
DeleteCloudRecordingRequest req = new DeleteCloudRecordingRequest();
|
||||
req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同
|
||||
req.setTaskId(taskId); // TaskId – 录制任务的唯一Id,在启动录制成功后会返回
|
||||
// 返回的resp是一个DeleteCloudRecordingResponse的实例,与请求对象对应
|
||||
DeleteCloudRecordingResponse resp = client.DeleteCloudRecording(req);
|
||||
// 输出json格式的字符串回包
|
||||
return success((JSONObject) JSON.toJSON(resp));
|
||||
} catch (TencentCloudSDKException e) {
|
||||
return AjaxResult.error(e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult dissolveRoom( Long roomId) {
|
||||
Credential cred = new Credential(secretId, secretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
|
||||
DismissRoomRequest req = new DismissRoomRequest();
|
||||
req.setSdkAppId(sdkAppId);
|
||||
req.setRoomId(roomId);
|
||||
try {
|
||||
DismissRoomResponse resp = client.DismissRoom(req);
|
||||
return success((JSONObject) JSON.toJSON(resp));
|
||||
} catch (TencentCloudSDKException e) {
|
||||
return AjaxResult.error("解散房间失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult secretaryRoleByUserId(Long userId) {
|
||||
List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
boolean isSecretaryRole=false;
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
for (SysRole role : roles) {
|
||||
if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
|
||||
isSecretaryRole=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
jsonObject.put("isSecretaryRole",isSecretaryRole);
|
||||
return success(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据html字符串转pdf并和案件关联
|
||||
* @param reservedConferenceVO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult htmlToPDF(ReservedConferenceVO reservedConferenceVO) {
|
||||
String currentFileName = System.currentTimeMillis() + ".pdf";
|
||||
String fileName = null;
|
||||
try {
|
||||
fileName = getPathFileName(RuoYiConfig.getHtml2PDFPath(), currentFileName);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String htmlContent = "<html><head> <title>庭审笔录</title></head><body style=\"font-size:12.0pt; font-family:SimSun;\"><h1 align=\"center\">庭审笔录</h1>" +reservedConferenceVO.getHtmlContent()+"</body></html>";
|
||||
// html转pdf并上传到服务器
|
||||
boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
|
||||
|
||||
// 绑定案件
|
||||
if(convertFlag){
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
|
||||
.annexName(fileName)
|
||||
.annexPath(RuoYiConfig.getHtml2PDFPath())
|
||||
.annexType(7)
|
||||
.build();
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
return AjaxResult.error("pdf转换失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult attachListByCaseId(Long caseAppliId, Integer annexType) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseAppliId);
|
||||
caseApplication.setAnnexType(annexType);
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
if(CollectionUtil.isEmpty(caseAttachList)){
|
||||
return success(caseAttachList);
|
||||
}
|
||||
|
||||
// 附件转换
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return success(caseAttachList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询出音视频集合,并下载,在将云点播上面的音视频删除
|
||||
* @param fileIds 点播平台唯一ID集合
|
||||
* @throws Exception
|
||||
*/
|
||||
private void downloadVideo(String [] fileIds) throws Exception {
|
||||
try{
|
||||
//创建文件对象
|
||||
Properties properties = new Properties();
|
||||
//加载文件获取数据 文件带后缀
|
||||
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream
|
||||
("application.properties"));
|
||||
//根据key来获取value
|
||||
String secretId = properties.getProperty("secretid");
|
||||
String secretKey = properties.getProperty("secretkey");
|
||||
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
|
||||
// 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
|
||||
// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
|
||||
Credential cred = new Credential(secretId, secretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("vod.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
VodClient client = new VodClient(cred, "ap-beijing", clientProfile);
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
DescribeMediaInfosRequest req = new DescribeMediaInfosRequest();
|
||||
req.setFileIds(fileIds);
|
||||
String[] basicInfos = {"basicInfo"};
|
||||
req.setFilters(basicInfos);
|
||||
// 返回的resp是一个DescribeMediaInfosResponse的实例,与请求对象对应
|
||||
DescribeMediaInfosResponse resp = client.DescribeMediaInfos(req);
|
||||
// 输出json格式的字符串回包
|
||||
log.info(DescribeMediaInfosResponse.toJsonString(resp));
|
||||
String json = DescribeMediaInfosResponse.toJsonString(resp);
|
||||
JSONObject jsonObject = (JSONObject) JSON.parse(json);
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("MediaInfoSet"); // 媒体文件信息列表。
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject jsonObject1 = jsonArray.getJSONObject(i);
|
||||
String fileId = jsonObject1.getString("FileId"); // 点播平台的唯一 ID
|
||||
String basicInfo = jsonObject1.getString("BasicInfo"); // 基础信息
|
||||
JSONObject jsonObject2 = (JSONObject) JSON.parse(basicInfo);
|
||||
String mediaUrl = jsonObject2.getString("MediaUrl"); // 文件地址
|
||||
String downPath = downloadImage(null,null,mediaUrl); // 下载音视频(返回本地下载地址)
|
||||
// 将未下载的音视频列表查询出来,进行下载到服务器上面,并更新数据库数据
|
||||
log.info(downPath); // 本地地址
|
||||
}
|
||||
log.info("下载音视频成功");
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.info(e.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
log.info("腾讯云测试成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 将视频下载到本地
|
||||
* @param fileUrl 视频路径
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
public String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
|
||||
String staticAndMksDir = null;
|
||||
if (fileUrl != null) {
|
||||
//下载时文件名称
|
||||
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
||||
fileName = fileName.replace("/", "");
|
||||
fileName=fileId+fileName;
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
|
||||
if(downloadFile>0) {
|
||||
Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 存入数据库
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
|
||||
.annexName(annexName)
|
||||
.annexPath(RuoYiConfig.getVideoUploadPath())
|
||||
.annexType(9)
|
||||
.build();
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return annexName;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
/**
|
||||
* @param key 回调秘钥
|
||||
* @param body 入参
|
||||
* @return 签名 Sign 计算公式中 key 为计算签名 Sign 用的加密密钥。
|
||||
* @throws Exception
|
||||
*/
|
||||
private static String getResultSign(String key, String body) throws Exception {
|
||||
Mac hmacSha256 = Mac.getInstance("HmacSHA256");
|
||||
SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256");
|
||||
hmacSha256.init(secret_key);
|
||||
return Base64.getEncoder().encodeToString(hmacSha256.doFinal(body.getBytes()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.task;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.FatchRule;
|
||||
import com.ruoyi.wisdomarbitrate.service.impl.CaseZipImportImpl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
/**
|
||||
* @description rbd调用xfta计算任务类
|
||||
* @Author mingYang
|
||||
* @Date 2021/11/12 15:35
|
||||
* @Version V1.0
|
||||
**/
|
||||
|
||||
public class CaseZipImportTask implements Callable<List<CaseApplication>> {
|
||||
private CaseZipImportImpl caseZipImportImpl;
|
||||
private Long templateId;
|
||||
private List<FatchRule> fatchRuleList;
|
||||
private Map<String, String> fatchMap;
|
||||
private Map<String, List<FatchRule>> fatchRuleMap;
|
||||
private Map<String, SysUser> userMap;
|
||||
private List<SysDictData> dictDataList;
|
||||
private File[] files;
|
||||
private Map<String, Long> deptMap;
|
||||
private LoginUser loginUser;
|
||||
private Integer maxBatchNumber;
|
||||
|
||||
public CaseZipImportTask(CaseZipImportImpl caseZipImportImpl, Long templateId, List<FatchRule> fatchRuleList, Map<String, String> fatchMap, Map<String, List<FatchRule>> fatchRuleMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, File[] files, Map<String, Long> deptMap, LoginUser loginUser,Integer maxBatchNumber) {
|
||||
this.caseZipImportImpl = caseZipImportImpl;
|
||||
this.templateId = templateId;
|
||||
this.fatchRuleList = fatchRuleList;
|
||||
this.fatchMap = fatchMap;
|
||||
this.fatchRuleMap = fatchRuleMap;
|
||||
this.userMap = userMap;
|
||||
this.dictDataList = dictDataList;
|
||||
this.files = files;
|
||||
this.deptMap = deptMap;
|
||||
this.loginUser = loginUser;
|
||||
this.maxBatchNumber = maxBatchNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CaseApplication> call() {
|
||||
List<CaseApplication> caseApplications = new ArrayList<>();
|
||||
try {
|
||||
for (File file1 : files) {
|
||||
if (file1.isDirectory() && file1.listFiles() != null) {
|
||||
|
||||
for (File file2 : file1.listFiles()) {
|
||||
CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser,maxBatchNumber);
|
||||
if (caseApplication != null) {
|
||||
caseApplications.add(caseApplication);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("导入失败");
|
||||
}
|
||||
|
||||
return caseApplications;
|
||||
}
|
||||
}
|
||||
-362
@@ -1,362 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.constant.FileTransformation;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.SealUtil;
|
||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Component
|
||||
public class FixSelectFlowDetailUtils {
|
||||
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private SealSignRecordMapper sealSignRecordMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private DeptIdentifyMapper deptIdentifyMapper;
|
||||
@Autowired
|
||||
private SealManageMapper sealManageMapper;
|
||||
|
||||
/*
|
||||
定时查询签署流程详情
|
||||
*/
|
||||
@Scheduled(cron = "0/10 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectFlowDetailUtils() {
|
||||
Gson gson = new Gson();
|
||||
|
||||
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||
// sealSignRecordselect.setSignFlowStatus(1);
|
||||
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
||||
|
||||
try {
|
||||
if (sealSignRecords != null && sealSignRecords.size() > 0) {
|
||||
for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||
SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
||||
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
||||
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(), JsonObject.class);
|
||||
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
||||
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
||||
Integer psnsignStatus = null;
|
||||
Integer orgsignStatus = null;
|
||||
for (int j = 0; j < signersArray.size(); j++) {
|
||||
JsonObject signerObject = (JsonObject) signersArray.get(j);
|
||||
|
||||
if (!(signerObject.get("psnSigner").toString()).equals("null")) {
|
||||
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||
if (psnSignerData != null) {
|
||||
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
}
|
||||
}
|
||||
if (!(signerObject.get("orgSigner").toString()).equals("null")) {
|
||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||
if (orgSignerData != null) {
|
||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ((psnsignStatus.intValue() == 2) && (orgsignStatus.intValue() == 1)) {
|
||||
//更新立案申请状态为待用印
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||
|
||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplicationselect != null) {
|
||||
if ((caseApplicationselect.getCaseStatus() != null) && (caseApplicationselect.getCaseStatus().intValue() == CaseApplicationConstants.SIGN_ARBITRATION)) {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
sealSignRecord.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ((psnsignStatus.intValue() == 2) && (orgsignStatus.intValue() == 2)) {
|
||||
//更新立案申请状态为待送达
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||
|
||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplicationselect != null) {
|
||||
if ((caseApplicationselect.getCaseStatus() != null) && (caseApplicationselect.getCaseStatus().intValue() == CaseApplicationConstants.ARBITRATED_SEAL)) {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||
//下载审核完成的裁决书,
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if (filesArray != null && filesArray.size() > 0) {
|
||||
JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
//修改"签署用印记录表"的状态为签署完成
|
||||
sealSignRecord.setSignFlowStatus(3);
|
||||
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1));
|
||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||
|
||||
String filearbitraUrl = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
Long caseAppliId = sealSignRecord.getCaseAppliId();
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(3);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (EsignDemoException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时查询企业认证状态
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Scheduled(cron = "*/30 * * * * *")
|
||||
@Transactional
|
||||
public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
|
||||
Gson gson = new Gson();
|
||||
DeptIdentify deptIdentify = new DeptIdentify();
|
||||
List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
|
||||
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
|
||||
for (int i = 0; i < deptIdentifysnew.size(); i++) {
|
||||
DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
|
||||
Integer identifyStatus = deptIdentify1.getIdentifyStatus();
|
||||
if (identifyStatus!=1){
|
||||
String authFlowId = deptIdentify1.getAuthFlowId();
|
||||
if (authFlowId != null) {
|
||||
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
|
||||
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
|
||||
int code = identifyInfoJsonObject.get("code").getAsInt();
|
||||
if (code == 0) {
|
||||
JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
|
||||
int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
|
||||
if (realnameStatus == 1) {
|
||||
String orgId = identifyInfoData.get("orgId").getAsString();
|
||||
//查询企业内部印章
|
||||
EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
|
||||
JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
|
||||
int code1 = jsonObject.get("code").getAsInt();
|
||||
if (code1 == 0) {
|
||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||
JsonArray seals = data.get("seals").getAsJsonArray();
|
||||
if (seals.size() > 0) {
|
||||
for (int j = 0; j < seals.size(); j++) {
|
||||
//保存印章信息到数据库
|
||||
JsonObject asJsonObject = seals.get(j).getAsJsonObject();
|
||||
SealManage sealManage = new SealManage();
|
||||
String sealName = asJsonObject.get("sealName").toString();
|
||||
String sealId = asJsonObject.get("sealId").toString();
|
||||
String url = asJsonObject.get("sealImageDownloadUrl").toString();
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
String fileDownloadUrlnew = url.substring(1, url.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setAnnexType(10); //10代表印章图片
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
int i1 = caseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将印章信息保存到公章管理表里
|
||||
String sealName1 = sealName.substring(1, sealName.length() - 1);
|
||||
String sealId1 = sealId.substring(1, sealId.length() - 1);
|
||||
Integer annexId1 = caseAttach.getAnnexId();
|
||||
sealManage.setAnnexId(annexId1);
|
||||
sealManage.setSealId(sealId1);
|
||||
sealManage.setSealName(sealName1);
|
||||
sealManage.setIdentifyId(deptIdentify1.getId());
|
||||
sealManage.setSealStatus(1);
|
||||
sealManage.setIsUse(1);
|
||||
sealManageMapper.insertSealManage(sealManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//将orgId保存到数据库里
|
||||
deptIdentify1.setOrgId(orgId);
|
||||
deptIdentify1.setIdentifyStatus(1);
|
||||
deptIdentify1.setIsUse(0); //默认机构为未启用
|
||||
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
||||
}
|
||||
}else {
|
||||
deptIdentify1.setIdentifyStatus(2);
|
||||
deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定时查询印章审核状态
|
||||
*/
|
||||
@Scheduled(cron = "0/30 * * * * ?")
|
||||
@Transactional
|
||||
public void searchForInstitutionalSeal() {
|
||||
try {
|
||||
SealManage sealManage = new SealManage();
|
||||
sealManage.setSealStatus(0);
|
||||
List<SealManage> sealManageList = sealManageMapper.selectSealList(sealManage);
|
||||
if (sealManageList != null && sealManageList.size() > 0) {
|
||||
for (SealManage sealManage1 : sealManageList) {
|
||||
//查询企业内部印章
|
||||
Integer annexId = sealManage1.getAnnexId();
|
||||
String sealId = sealManage1.getSealId();
|
||||
DeptIdentify deptIdentify = new DeptIdentify();
|
||||
deptIdentify.setId(sealManage1.getIdentifyId());
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
|
||||
if (deptIdentifies != null && deptIdentifies.size() > 0) {
|
||||
DeptIdentify deptIdentify1 = deptIdentifies.get(0);
|
||||
String orgId = deptIdentify1.getOrgId();
|
||||
if (orgId == null) {
|
||||
continue;
|
||||
}
|
||||
if (annexId == null) {
|
||||
//说明之前没有下载过
|
||||
EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
|
||||
JSONObject jsonObject = JSONObject.parseObject(response.getBody());
|
||||
int code = jsonObject.getIntValue("code");
|
||||
if (code == 0) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
int sealStatus = data.getIntValue("sealStatus");
|
||||
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
|
||||
//已启用证明审核通过,下载到数据库
|
||||
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setAnnexType(10); //10代表印章图片
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
int i1 = caseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将附件id保存到公章管理表里
|
||||
Integer annexId1 = caseAttach.getAnnexId();
|
||||
sealManage1.setAnnexId(annexId1);
|
||||
sealManage1.setSealStatus(1);
|
||||
sealManage1.setIsUse(0);
|
||||
sealManageMapper.updateSealManage(sealManage1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (EsignDemoException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
-10
@@ -17,14 +17,4 @@ public class ImageToBase64Converter {
|
||||
String base64Image = Base64.getEncoder().encodeToString(imageBytes);
|
||||
return base64Image;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String imagePath = "D:\\develop\\2.jpg";
|
||||
try {
|
||||
String base64Image = imageToBase64(imagePath);
|
||||
System.out.println(base64Image);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,20 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.EsignApplicaConfig;
|
||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||
import com.ruoyi.common.utils.SealUtil;
|
||||
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.StringIdsReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SignAward {
|
||||
|
||||
|
||||
@@ -16,12 +16,6 @@ import java.util.zip.ZipFile;
|
||||
@Slf4j
|
||||
public class UnZipFileUtils {
|
||||
|
||||
public static void main(String[] args) {
|
||||
File file = new File("D:\\home\\ruoyi\\仲裁委项目-测试单.zip");
|
||||
String targetPath = "D:\\home\\unzip\\";
|
||||
unZipFile(file,targetPath);
|
||||
}
|
||||
|
||||
public static boolean unZipFile(File aboriginalFile, String targetPath) {
|
||||
if (!aboriginalFile.exists()) {
|
||||
log.error("此文件不存在:", aboriginalFile.getPath());
|
||||
|
||||
@@ -10,27 +10,6 @@ import java.util.zip.ZipOutputStream;
|
||||
|
||||
public class ZipFileUtils {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String file1 = "F:\\testZip\\123.pdf";
|
||||
String file2 = "F:\\testZip\\456.png";
|
||||
String zipFileOutPath = "F:\\testZip\\outputfile123.zip";
|
||||
|
||||
try {
|
||||
FileOutputStream zfous = new FileOutputStream(zipFileOutPath);
|
||||
ZipOutputStream zipFileOutstream = new ZipOutputStream(zfous);
|
||||
FileInputStream fis1 = new FileInputStream(file1);
|
||||
FileInputStream fis2 = new FileInputStream(file2);
|
||||
zipFile(file1, fis1, zipFileOutstream);
|
||||
zipFile(file2, fis2, zipFileOutstream);
|
||||
|
||||
zipFileOutstream.close();
|
||||
zfous.close();
|
||||
System.out.println("文件成功打包成ZIP文件!");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void zipFile(String zipfilePath, FileInputStream zipFileinsteam, ZipOutputStream zipfileOut)
|
||||
throws IOException {
|
||||
ZipEntry zipfileEntry = new ZipEntry(new File(zipfilePath).getName());
|
||||
|
||||
@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectConfigVo">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
|
||||
from sys_config
|
||||
from ms_sys_config
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertConfig" parameterType="SysConfig">
|
||||
insert into sys_config (
|
||||
insert into ms_sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||
<if test="configValue != null and configValue != '' ">config_value,</if>
|
||||
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<update id="updateConfig" parameterType="SysConfig">
|
||||
update sys_config
|
||||
update ms_sys_config
|
||||
<set>
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
|
||||
@@ -104,11 +104,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteConfigById" parameterType="Long">
|
||||
delete from sys_config where config_id = #{configId}
|
||||
delete from ms_sys_config where config_id = #{configId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteConfigByIds" parameterType="Long">
|
||||
delete from sys_config where config_id in
|
||||
delete from ms_sys_config where config_id in
|
||||
<foreach item="configId" collection="array" open="(" separator="," close=")">
|
||||
#{configId}
|
||||
</foreach>
|
||||
|
||||
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_type,d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
|
||||
from sys_dept d
|
||||
from ms_sys_dept d
|
||||
</sql>
|
||||
|
||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
||||
@@ -50,37 +50,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectDeptListByRoleId" resultType="Long">
|
||||
select d.dept_id
|
||||
from sys_dept d
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
from ms_sys_dept d
|
||||
left join ms_sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
where rd.role_id = #{roleId}
|
||||
<if test="deptCheckStrictly">
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
|
||||
and d.dept_id not in (select d.parent_id from ms_sys_dept d inner join ms_sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
|
||||
</if>
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name,d.dept_type, d.order_num, d.leader, d.phone, d.email, d.status,
|
||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
||||
from sys_dept d
|
||||
(select dept_name from ms_sys_dept where dept_id = d.parent_id) parent_name
|
||||
from ms_sys_dept d
|
||||
where d.dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
|
||||
select count(1) from ms_sys_user where dept_id = #{deptId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_dept
|
||||
select count(1) from ms_sys_dept
|
||||
where del_flag = '0' and parent_id = #{deptId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select * from sys_dept where find_in_set(#{deptId}, ancestors)
|
||||
select * from ms_sys_dept where find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
||||
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
|
||||
select count(*) from ms_sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||
@@ -88,12 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
|
||||
select u.dept_id from sys_user_role r
|
||||
join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
|
||||
select u.dept_id from ms_sys_user_role r
|
||||
join ms_sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
|
||||
insert into sys_dept(
|
||||
insert into ms_sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
);
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
insert into sys_dept(
|
||||
insert into ms_sys_dept(
|
||||
dept_id,
|
||||
parent_id,
|
||||
dept_name,
|
||||
@@ -156,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<update id="updateDept" parameterType="SysDept">
|
||||
update sys_dept
|
||||
update ms_sys_dept
|
||||
<set>
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
@@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateDeptChildren" parameterType="java.util.List">
|
||||
update sys_dept set ancestors =
|
||||
update ms_sys_dept set ancestors =
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
separator=" " open="case dept_id" close="end">
|
||||
when #{item.deptId} then #{item.ancestors}
|
||||
@@ -187,14 +187,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateDeptStatusNormal" parameterType="Long">
|
||||
update sys_dept set status = '0' where dept_id in
|
||||
update ms_sys_dept set status = '0' where dept_id in
|
||||
<foreach collection="array" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeptById" parameterType="Long">
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
update ms_sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectDictDataVo">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
|
||||
from sys_dict_data
|
||||
from ms_sys_dict_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
select dict_label from sys_dict_data
|
||||
select dict_label from ms_sys_dict_data
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
||||
</select>
|
||||
|
||||
@@ -57,22 +57,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from sys_dict_data where dict_type=#{dictType}
|
||||
select count(1) from ms_sys_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code = #{dictCode}
|
||||
delete from ms_sys_dict_data where dict_code = #{dictCode}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictDataByIds" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code in
|
||||
delete from ms_sys_dict_data where dict_code in
|
||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
||||
#{dictCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictData" parameterType="SysDictData">
|
||||
update sys_dict_data
|
||||
update ms_sys_dict_data
|
||||
<set>
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||
@@ -90,11 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateDictDataType" parameterType="String">
|
||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
update ms_sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictData" parameterType="SysDictData">
|
||||
insert into sys_dict_data(
|
||||
insert into ms_sys_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||
|
||||
@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
from ms_sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
@@ -61,18 +61,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id = #{dictId}
|
||||
delete from ms_sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
delete from ms_sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update sys_dict_type
|
||||
update ms_sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into sys_dict_type(
|
||||
insert into ms_sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
|
||||
@@ -17,12 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
insert into ms_sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from ms_sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
@@ -44,14 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<delete id="deleteLogininforByIds" parameterType="Long">
|
||||
delete from sys_logininfor where info_id in
|
||||
delete from ms_sys_logininfor where info_id in
|
||||
<foreach collection="array" item="infoId" open="(" separator="," close=")">
|
||||
#{infoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="cleanLogininfor">
|
||||
truncate table sys_logininfor
|
||||
truncate table ms_sys_logininfor
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<sql id="selectMenuVo">
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
||||
from sys_menu
|
||||
from ms_sys_menu
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
@@ -50,16 +50,16 @@
|
||||
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
from ms_sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role ro on ur.role_id = ro.role_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join ms_sys_role ro on ur.role_id = ro.role_id
|
||||
where ur.user_id = #{params.userId}
|
||||
<if test="menuName != null and menuName != ''">
|
||||
AND m.menu_name like concat('%', #{menuName}, '%')
|
||||
@@ -75,46 +75,46 @@
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role ro on ur.role_id = ro.role_id
|
||||
left join sys_user u on ur.user_id = u.user_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join ms_sys_role ro on ur.role_id = ro.role_id
|
||||
left join ms_sys_user u on ur.user_id = u.user_id
|
||||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByRoleId" resultType="Long">
|
||||
select m.menu_id
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
where rm.role_id = #{roleId}
|
||||
<if test="menuCheckStrictly">
|
||||
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
|
||||
and m.menu_id not in (select m.parent_id from ms_sys_menu m inner join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
|
||||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuPerms" resultType="String">
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
|
||||
</select>
|
||||
|
||||
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
from ms_sys_menu m
|
||||
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
where m.status = '0' and rm.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
</select>
|
||||
|
||||
<select id="hasChildByMenuId" resultType="Integer">
|
||||
select count(1) from sys_menu where parent_id = #{menuId}
|
||||
select count(1) from ms_sys_menu where parent_id = #{menuId}
|
||||
</select>
|
||||
|
||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
@@ -133,7 +133,7 @@
|
||||
</select>
|
||||
|
||||
<update id="updateMenu" parameterType="SysMenu">
|
||||
update sys_menu
|
||||
update ms_sys_menu
|
||||
<set>
|
||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
@@ -156,7 +156,7 @@
|
||||
</update>
|
||||
|
||||
<insert id="insertMenu" parameterType="SysMenu">
|
||||
insert into sys_menu(
|
||||
insert into ms_sys_menu(
|
||||
<if test="menuId != null and menuId != 0">menu_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="menuName != null and menuName != ''">menu_name,</if>
|
||||
@@ -196,7 +196,7 @@
|
||||
</insert>
|
||||
|
||||
<delete id="deleteMenuById" parameterType="Long">
|
||||
delete from sys_menu where menu_id = #{menuId}
|
||||
delete from ms_sys_menu where menu_id = #{menuId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectNoticeVo">
|
||||
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
||||
from sys_notice
|
||||
from ms_sys_notice
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
||||
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
insert into sys_notice (
|
||||
insert into ms_sys_notice (
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
||||
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
|
||||
@@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<update id="updateNotice" parameterType="SysNotice">
|
||||
update sys_notice
|
||||
update ms_sys_notice
|
||||
<set>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
|
||||
@@ -76,11 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteNoticeById" parameterType="Long">
|
||||
delete from sys_notice where notice_id = #{noticeId}
|
||||
delete from ms_sys_notice where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNoticeByIds" parameterType="Long">
|
||||
delete from sys_notice where notice_id in
|
||||
delete from ms_sys_notice where notice_id in
|
||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
||||
#{noticeId}
|
||||
</foreach>
|
||||
|
||||
@@ -26,11 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectOperLogVo">
|
||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
|
||||
from sys_oper_log
|
||||
from ms_sys_oper_log
|
||||
</sql>
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
||||
insert into ms_sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
|
||||
</insert>
|
||||
|
||||
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<delete id="deleteOperLogByIds" parameterType="Long">
|
||||
delete from sys_oper_log where oper_id in
|
||||
delete from ms_sys_oper_log where oper_id in
|
||||
<foreach collection="array" item="operId" open="(" separator="," close=")">
|
||||
#{operId}
|
||||
</foreach>
|
||||
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<update id="cleanOperLog">
|
||||
truncate table sys_oper_log
|
||||
truncate table ms_sys_oper_log
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectPostVo">
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
from sys_post
|
||||
from ms_sys_post
|
||||
</sql>
|
||||
|
||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
||||
@@ -53,17 +53,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
||||
select p.post_id
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
from ms_sys_post p
|
||||
left join ms_ms_sys_user_post up on up.post_id = p.post_id
|
||||
left join ms_sys_user u on u.user_id = up.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
||||
select p.post_id, p.post_name, p.post_code
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
from ms_sys_post p
|
||||
left join ms_ms_sys_user_post up on up.post_id = p.post_id
|
||||
left join ms_sys_user u on u.user_id = up.user_id
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<update id="updatePost" parameterType="SysPost">
|
||||
update sys_post
|
||||
update ms_sys_post
|
||||
<set>
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
||||
@@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||
insert into sys_post(
|
||||
insert into ms_sys_post(
|
||||
<if test="postId != null and postId != 0">post_id,</if>
|
||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||
<if test="postName != null and postName != ''">post_name,</if>
|
||||
@@ -114,11 +114,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<delete id="deletePostById" parameterType="Long">
|
||||
delete from sys_post where post_id = #{postId}
|
||||
delete from ms_sys_post where post_id = #{postId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePostByIds" parameterType="Long">
|
||||
delete from sys_post where post_id in
|
||||
delete from ms_sys_post where post_id in
|
||||
<foreach collection="array" item="postId" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
|
||||
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteRoleDeptByRoleId" parameterType="Long">
|
||||
delete from sys_role_dept where role_id=#{roleId}
|
||||
delete from ms_sys_role_dept where role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<select id="selectCountRoleDeptByDeptId" resultType="Integer">
|
||||
select count(1) from sys_role_dept where dept_id=#{deptId}
|
||||
select count(1) from ms_sys_role_dept where dept_id=#{deptId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteRoleDept" parameterType="Long">
|
||||
delete from sys_role_dept where role_id in
|
||||
delete from ms_sys_role_dept where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchRoleDept">
|
||||
insert into sys_role_dept(role_id, dept_id) values
|
||||
insert into ms_sys_role_dept(role_id, dept_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.roleId},#{item.deptId})
|
||||
</foreach>
|
||||
|
||||
@@ -24,10 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectRoleVo">
|
||||
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
|
||||
r.status, r.del_flag, r.create_time, r.remark
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
from ms_sys_role r
|
||||
left join ms_ms_sys_user_role ur on ur.role_id = r.role_id
|
||||
left join ms_sys_user u on u.user_id = ur.user_id
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
||||
@@ -67,9 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
|
||||
select r.role_id
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
from ms_sys_role r
|
||||
left join ms_ms_sys_user_role ur on ur.role_id = r.role_id
|
||||
left join ms_sys_user u on u.user_id = ur.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
@@ -93,11 +93,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
<select id="selectRoleIdByName" resultType="java.lang.Long" >
|
||||
select role_id from sys_role where role_name=#{roleName}
|
||||
select role_id from ms_sys_role where role_name=#{roleName}
|
||||
</select>
|
||||
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into sys_role(
|
||||
insert into ms_sys_role(
|
||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||
<if test="roleKey != null and roleKey != ''">role_key,</if>
|
||||
@@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<update id="updateRole" parameterType="SysRole">
|
||||
update sys_role
|
||||
update ms_sys_role
|
||||
<set>
|
||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
|
||||
@@ -142,11 +142,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteRoleById" parameterType="Long">
|
||||
update sys_role set del_flag = '2' where role_id = #{roleId}
|
||||
update ms_sys_role set del_flag = '2' where role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRoleByIds" parameterType="Long">
|
||||
update sys_role set del_flag = '2' where role_id in
|
||||
update ms_sys_role set del_flag = '2' where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
|
||||
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<select id="checkMenuExistRole" resultType="Integer">
|
||||
select count(1) from sys_role_menu where menu_id = #{menuId}
|
||||
select count(1) from ms_sys_role_menu where menu_id = #{menuId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteRoleMenuByRoleId" parameterType="Long">
|
||||
delete from sys_role_menu where role_id=#{roleId}
|
||||
delete from ms_sys_role_menu where role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRoleMenu" parameterType="Long">
|
||||
delete from sys_role_menu where role_id in
|
||||
delete from ms_sys_role_menu where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchRoleMenu">
|
||||
insert into sys_role_menu(role_id, menu_id) values
|
||||
insert into ms_sys_role_menu(role_id, menu_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.roleId},#{item.menuId})
|
||||
</foreach>
|
||||
|
||||
@@ -52,19 +52,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
|
||||
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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name,
|
||||
d.leader , r.role_id, r.role_name, d.dept_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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
AND u.user_id = #{userId}
|
||||
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM ms_sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
@@ -93,10 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
@@ -110,12 +110,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
and u.user_id not in (select u.user_id from ms_sys_user u inner join ms_sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
@@ -139,27 +139,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectUserByDeptId" parameterType="Long" resultMap="SysUserResult">
|
||||
SELECT ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
|
||||
FROM (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
|
||||
FROM sys_user_post up left join sys_user u on u.user_id = up.user_id
|
||||
left join sys_post sp on up.post_id = sp.post_id
|
||||
where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
|
||||
FROM ms_sys_user_post up left join ms_sys_user u on u.user_id = up.user_id
|
||||
left join ms_sys_post sp on up.post_id = sp.post_id
|
||||
where sp.post_code = 'jbr') ud left join ms_sys_dept d on ud.dept_id = d.dept_id
|
||||
where d.dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
||||
select user_id, user_name from ms_sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
|
||||
select user_id, phonenumber from ms_sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
select user_id, email from ms_sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
<select id="selectUserListByAdRole" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
|
||||
join sys_user_role ur on ur.user_id =u.user_id
|
||||
join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from ms_sys_user u
|
||||
join ms_sys_user_role ur on ur.user_id =u.user_id
|
||||
join ms_sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
|
||||
where r.del_flag = '0' and r.status='0'
|
||||
and u.del_flag = '0' and u.status='0'
|
||||
<if test="arbitratorName != null and arbitratorName != ''">
|
||||
@@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</select>
|
||||
<select id="selectUserListByIds" resultMap="SysUserResult">
|
||||
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
|
||||
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from ms_sys_user u
|
||||
|
||||
<where>
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
@@ -192,31 +192,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
|
||||
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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_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>
|
||||
<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
|
||||
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
|
||||
from ms_sys_user u
|
||||
left join ms_sys_dept d on u.dept_id = d.dept_id
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where u.phonenumber = #{phone} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
|
||||
</select>
|
||||
<select id="selectByDeptIdAndRole" resultMap="SysUserResult">
|
||||
select u.* from
|
||||
sys_user u
|
||||
join sys_user_role ur on u.user_id = ur.user_id
|
||||
join sys_role r on ur.role_id = r.role_id
|
||||
ms_sys_user u
|
||||
join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
join ms_sys_role r on ur.role_id = r.role_id
|
||||
where u.dept_id = #{deptId} and r.role_name = #{roleName} and u.del_flag = '0' and r.del_flag='0'
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
insert into ms_sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
@@ -249,7 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
insert into sys_user(
|
||||
insert into ms_sys_user(
|
||||
user_id,
|
||||
dept_id,
|
||||
user_name,
|
||||
@@ -286,7 +286,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
update sys_user
|
||||
update ms_sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
@@ -308,31 +308,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
update ms_sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
update ms_sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
update ms_sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
update ms_sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
update ms_sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectRoleUserByDeptId" parameterType="long" resultMap="SysUserResult">
|
||||
SELECT u.* FROM sys_user u
|
||||
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
|
||||
INNER JOIN sys_dept d ON u.dept_id = d.dept_id
|
||||
SELECT u.* FROM ms_sys_user u
|
||||
INNER JOIN ms_sys_user_role ur ON u.user_id = ur.user_id
|
||||
INNER JOIN ms_sys_dept d ON u.dept_id = d.dept_id
|
||||
WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
|
||||
</select>
|
||||
|
||||
|
||||
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserPostByUserId" parameterType="Long">
|
||||
delete from sys_user_post where user_id=#{userId}
|
||||
delete from ms_sys_user_post where user_id=#{userId}
|
||||
</delete>
|
||||
|
||||
<select id="countUserPostById" resultType="Integer">
|
||||
select count(1) from sys_user_post where post_id=#{postId}
|
||||
select count(1) from ms_sys_user_post where post_id=#{postId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserPost" parameterType="Long">
|
||||
delete from sys_user_post where user_id in
|
||||
delete from ms_sys_user_post where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchUserPost">
|
||||
insert into sys_user_post(user_id, post_id) values
|
||||
insert into ms_sys_user_post(user_id, post_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.userId},#{item.postId})
|
||||
</foreach>
|
||||
|
||||
@@ -10,33 +10,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserRoleByUserId" parameterType="Long">
|
||||
delete from sys_user_role where user_id=#{userId}
|
||||
delete from ms_sys_user_role where user_id=#{userId}
|
||||
</delete>
|
||||
|
||||
<select id="countUserRoleByRoleId" resultType="Integer">
|
||||
select count(1) from sys_user_role where role_id=#{roleId}
|
||||
select count(1) from ms_sys_user_role where role_id=#{roleId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserRole" parameterType="Long">
|
||||
delete from sys_user_role where user_id in
|
||||
delete from ms_sys_user_role where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchUserRole">
|
||||
insert into sys_user_role(user_id, role_id) values
|
||||
insert into ms_sys_user_role(user_id, role_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.userId},#{item.roleId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
|
||||
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
||||
delete from ms_sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserRoleInfos">
|
||||
delete from sys_user_role where role_id=#{roleId} and user_id in
|
||||
delete from ms_sys_user_role where role_id=#{roleId} and user_id in
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper">
|
||||
<resultMap type="ArbitrateRecord" id="ArbitrateRecordResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliId" column="case_appli_id" />
|
||||
<result property="evidenDetermi" column="eviden_determi" />
|
||||
<result property="factDetermi" column="fact_determi" />
|
||||
<result property="caseSketch" column="case_sketch" />
|
||||
<result property="arbitrateThink" column="arbitrate_think" />
|
||||
<result property="rulingFollows" column="ruling_follows" />
|
||||
<result property="verificaOpinion" column="verifica_opinion" />
|
||||
<result property="checkOpinion" column="check_opinion" />
|
||||
<result property="annexId" column="annex_id" />
|
||||
<result property="caseFocus" column="case_focus" />
|
||||
<result property="caseFacts" column="case_facts" />
|
||||
<result property="respondentOpinion" column="respondent_opinion" />
|
||||
<result property="applicantOpinion" column="applicant_opinion" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertArbitrateRecord" parameterType="ArbitrateRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into arbitrate_record(
|
||||
<if test="caseAppliId != null">case_appli_id,</if>
|
||||
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi,</if>
|
||||
<if test="factDetermi != null and factDetermi != ''">fact_determi,</if>
|
||||
<if test="caseSketch != null and caseSketch != ''">case_sketch,</if>
|
||||
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows,</if>
|
||||
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion,</if>
|
||||
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think,</if>
|
||||
|
||||
<if test="checkOpinion != null and checkOpinion != ''">check_opinion,</if>
|
||||
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject,</if>
|
||||
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
case_focus,
|
||||
case_facts,
|
||||
respondent_opinion,
|
||||
applicant_opinion,
|
||||
create_time
|
||||
)values(
|
||||
<if test="caseAppliId != null ">#{caseAppliId},</if>
|
||||
<if test="evidenDetermi != null and evidenDetermi != ''">#{evidenDetermi},</if>
|
||||
<if test="factDetermi != null and factDetermi != ''">#{factDetermi},</if>
|
||||
<if test="caseSketch != null and caseSketch != ''">#{caseSketch},</if>
|
||||
<if test="rulingFollows != null and rulingFollows != ''">#{rulingFollows},</if>
|
||||
<if test="verificaOpinion != null and verificaOpinion != ''">#{verificaOpinion},</if>
|
||||
<if test="arbitrateThink != null and arbitrateThink != ''">#{arbitrateThink},</if>
|
||||
<if test="checkOpinion != null and checkOpinion != ''">#{checkOpinion},</if>
|
||||
<if test="caseCheckReject != null and caseCheckReject != ''">#{caseCheckReject},</if>
|
||||
<if test="arbitrateReject != null and arbitrateReject != ''">#{arbitrateReject},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
#{caseFocus},
|
||||
#{caseFacts},
|
||||
#{respondentOpinion},
|
||||
#{applicantOpinion},
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updataArbitrateRecord" parameterType="ArbitrateRecord">
|
||||
update arbitrate_record
|
||||
<set>
|
||||
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi = #{evidenDetermi},</if>
|
||||
<if test="factDetermi != null and factDetermi != ''">fact_determi = #{factDetermi},</if>
|
||||
<if test="caseSketch != null and caseSketch != ''">case_sketch = #{caseSketch},</if>
|
||||
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think = #{arbitrateThink},</if>
|
||||
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows = #{rulingFollows},</if>
|
||||
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion = #{verificaOpinion},</if>
|
||||
<if test="checkOpinion != null and checkOpinion != ''">check_opinion = #{checkOpinion},</if>
|
||||
<if test="arbitraCheckOpinion != null and arbitraCheckOpinion != ''">arbitra_check_opinion = #{arbitraCheckOpinion},</if>
|
||||
<if test="annexId != null ">annex_id = #{annexId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="caseFocus != null and caseFocus != ''">case_focus = #{caseFocus},</if>
|
||||
<if test="caseFacts != null and caseFacts != ''">case_facts = #{caseFacts},</if>
|
||||
<if test="respondentOpinion != null and respondentOpinion != ''">respondent_opinion = #{respondentOpinion},</if>
|
||||
<if test="applicantOpinion != null and applicantOpinion != ''">applicant_opinion = #{applicantOpinion},</if>
|
||||
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject = #{caseCheckReject},</if>
|
||||
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject = #{arbitrateReject},</if>
|
||||
<if test="deptorReject != null and deptorReject != ''">deptor_reject = #{deptorReject},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
|
||||
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
|
||||
a.verifica_opinion ,a.check_opinion,a.annex_id,a.case_focus,a.case_facts,a.respondent_opinion,a.applicant_opinion,
|
||||
a.case_check_reject ,a.arbitrate_reject,a.deptor_reject
|
||||
from arbitrate_record a
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND a.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper">
|
||||
<resultMap type="Arbitrator" id="ArbitratorResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="arbitratorName" column="arbitrator_name" />
|
||||
<result property="title" column="title" />
|
||||
<result property="career" column="career" />
|
||||
<result property="professiClassifi" column="professi_classifi" />
|
||||
<result property="education" column="education" />
|
||||
<result property="area" column="area" />
|
||||
<result property="telephone" column="telephone" />
|
||||
<result property="currentCaseNum" column="current_case_num" />
|
||||
<result property="closedCaseNum" column="closed_case_num" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectArbitratorList" parameterType="Arbitrator" resultMap="ArbitratorResult">
|
||||
select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
|
||||
a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
|
||||
from arbitrator a
|
||||
<where>
|
||||
<if test="arbitratorName != null and arbitratorName != ''">
|
||||
AND a.arbitrator_name like concat('%', #{arbitratorName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND a.id in
|
||||
<foreach item="id" collection="idList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateLogMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate" id="CaseAffiliateResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliLogId" column="case_appli_log_id" />
|
||||
<result property="identityType" column="identity_type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="identityNum" column="identity_num" />
|
||||
<result property="workTelphone" column="work_telphone" />
|
||||
<result property="contactTelphone" column="contact_telphone" />
|
||||
<result property="contactAddress" column="contact_address" />
|
||||
<result property="workAddress" column="work_address" />
|
||||
<result property="nameAgent" column="name_agent" />
|
||||
<result property="identityNumAgent" column="identity_num_agent" />
|
||||
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
|
||||
<result property="contactAddressAgent" column="contact_address_agent" />
|
||||
<result property="trackNum" column="track_num" />
|
||||
<result property="applicationOrganId" column="application_organ_id" />
|
||||
<result property="applicationOrganName" column="application_organ_name" />
|
||||
|
||||
<result property="compLegalPerson" column="comp_legal_person" />
|
||||
<result property="compLegalperPost" column="comp_legalper_post" />
|
||||
<result property="responSex" column="respon_sex" />
|
||||
<result property="responBirth" column="respon_birth" />
|
||||
|
||||
<result property="residenAffili" column="residen_affili" />
|
||||
<result property="appliAgentTitle" column="appli_agent_title" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="email" column="email" />
|
||||
<result property="sendEmail" column="send_email" />
|
||||
<result property="applicantAgentUserId" column="applicant_agent_user_id" />
|
||||
<result property="agentEmail" column="agent_email" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||
select c.*,s.user_id
|
||||
from case_affiliate_log c
|
||||
left join sys_user s on c.identity_num=s.id_card
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
AND c.case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
|
||||
select c.*
|
||||
from case_affiliate_log c
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
AND c.case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
<if test="identityType != null ">
|
||||
AND c.identity_type = #{identityType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="batchCaseAffiliate">
|
||||
insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
|
||||
residen_affili,appli_agent_title,
|
||||
contact_address_agent,email , send_email,track_num,applicant_agent_user_id,agent_email) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
|
||||
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
|
||||
#{item.residenAffili},#{item.appliAgentTitle},
|
||||
#{item.contactAddressAgent},
|
||||
#{item.email},
|
||||
#{item.sendEmail},
|
||||
#{item.trackNum},
|
||||
#{item.applicantAgentUserId},
|
||||
#{item.agentEmail}
|
||||
)
|
||||
</foreach>;
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
|
||||
update case_affiliate_log
|
||||
set
|
||||
case_appli_log_id=#{caseAppliLogId},
|
||||
identity_type= #{identityType},
|
||||
application_organ_id= #{applicationOrganId},
|
||||
application_organ_name= #{applicationOrganName},
|
||||
name = #{name},
|
||||
identity_num = #{identityNum},
|
||||
contact_telphone = #{contactTelphone},
|
||||
contact_address = #{contactAddress},
|
||||
work_address = #{workAddress},
|
||||
work_telphone = #{workTelphone},
|
||||
|
||||
name_agent = #{nameAgent},
|
||||
identity_num_agent = #{identityNumAgent},
|
||||
contact_telphone_agent = #{contactTelphoneAgent},
|
||||
contact_address_agent = #{contactAddressAgent},
|
||||
send_email = #{sendEmail},
|
||||
residen_affili = #{residenAffili},
|
||||
email= #{email},
|
||||
track_num = #{trackNum},
|
||||
comp_legal_person=#{compLegalPerson},
|
||||
comp_legalper_post=#{compLegalperPost},
|
||||
applicant_agent_user_id=#{applicantAgentUserId},
|
||||
respon_sex=#{responSex},
|
||||
respon_birth=#{responBirth},
|
||||
residen_affili=#{residenAffili},
|
||||
appli_agent_title=#{appliAgentTitle}
|
||||
|
||||
<if test="agentEmail !=null and agentEmail!=''">
|
||||
,agent_email=#{agentEmail}
|
||||
</if>
|
||||
where id = #{id}
|
||||
|
||||
</update>
|
||||
|
||||
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
|
||||
delete from case_affiliate_log where case_appli_log_id = #{caseAppliLogId}
|
||||
</delete>
|
||||
<delete id="batchDeletecaseAffiliate">
|
||||
|
||||
delete from case_affiliate_log where case_appli_log_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,204 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
|
||||
|
||||
<resultMap type="CaseAffiliate" id="CaseAffiliateResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliId" column="case_appli_id" />
|
||||
<result property="identityType" column="identity_type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="identityNum" column="identity_num" />
|
||||
<result property="workTelphone" column="work_telphone" />
|
||||
<result property="contactTelphone" column="contact_telphone" />
|
||||
<result property="contactAddress" column="contact_address" />
|
||||
<result property="workAddress" column="work_address" />
|
||||
<result property="nameAgent" column="name_agent" />
|
||||
<result property="identityNumAgent" column="identity_num_agent" />
|
||||
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
|
||||
<result property="contactAddressAgent" column="contact_address_agent" />
|
||||
<result property="trackNum" column="track_num" />
|
||||
<result property="applicationOrganId" column="application_organ_id" />
|
||||
<result property="applicationOrganName" column="application_organ_name" />
|
||||
|
||||
<result property="compLegalPerson" column="comp_legal_person" />
|
||||
<result property="compLegalperPost" column="comp_legalper_post" />
|
||||
<result property="responSex" column="respon_sex" />
|
||||
<result property="responBirth" column="respon_birth" />
|
||||
|
||||
<result property="residenAffili" column="residen_affili" />
|
||||
<result property="appliAgentTitle" column="appli_agent_title" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="email" column="email" />
|
||||
<result property="sendEmail" column="send_email" />
|
||||
<result property="applicantAgentUserId" column="applicant_agent_user_id" />
|
||||
<result property="agentEmail" column="agent_email" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||
select distinct (c.id),
|
||||
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
|
||||
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
||||
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
||||
c.residen_affili,appli_agent_title,
|
||||
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
||||
from case_affiliate c
|
||||
left join sys_user s on c.identity_num=s.id_card
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND c.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
|
||||
select (c.id),
|
||||
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
|
||||
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
||||
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
||||
c.residen_affili,appli_agent_title,
|
||||
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
||||
from case_affiliate c
|
||||
left join sys_user s on c.identity_num=s.id_card
|
||||
<where>
|
||||
<if test="ids != null ">
|
||||
case_appli_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
|
||||
select c.*
|
||||
from case_affiliate c
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND c.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
<if test="identityType != null ">
|
||||
AND c.identity_type = #{identityType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="emailByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate">
|
||||
select c.identity_type identityType,c.email
|
||||
from case_affiliate c
|
||||
where c.case_appli_id=#{caseAppliId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="batchCaseAffiliate">
|
||||
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
|
||||
residen_affili,appli_agent_title,
|
||||
contact_address_agent,email, send_email,track_num,applicant_agent_user_id,agent_email) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
|
||||
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
|
||||
#{item.residenAffili},#{item.appliAgentTitle},
|
||||
#{item.contactAddressAgent},
|
||||
#{item.email},
|
||||
#{item.sendEmail},
|
||||
#{item.trackNum},
|
||||
#{item.applicantAgentUserId},
|
||||
#{item.agentEmail}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
|
||||
update case_affiliate
|
||||
set
|
||||
case_appli_id=#{caseAppliId},
|
||||
identity_type= #{identityType},
|
||||
application_organ_id= #{applicationOrganId},
|
||||
application_organ_name= #{applicationOrganName},
|
||||
name = #{name},
|
||||
identity_num = #{identityNum},
|
||||
contact_telphone = #{contactTelphone},
|
||||
contact_address = #{contactAddress},
|
||||
work_address = #{workAddress},
|
||||
work_telphone = #{workTelphone},
|
||||
name_agent = #{nameAgent},
|
||||
identity_num_agent = #{identityNumAgent},
|
||||
contact_telphone_agent = #{contactTelphoneAgent},
|
||||
contact_address_agent = #{contactAddressAgent},
|
||||
send_email = #{sendEmail},
|
||||
residen_affili = #{residenAffili},
|
||||
email= #{email},
|
||||
track_num = #{trackNum},
|
||||
comp_legal_person=#{compLegalPerson},
|
||||
comp_legalper_post=#{compLegalperPost},
|
||||
applicant_agent_user_id=#{applicantAgentUserId},
|
||||
respon_sex=#{responSex},
|
||||
respon_birth=#{responBirth},
|
||||
residen_affili=#{residenAffili},
|
||||
appli_agent_title=#{appliAgentTitle}
|
||||
|
||||
<if test="agentEmail !=null and agentEmail!=''">
|
||||
,agent_email=#{agentEmail}
|
||||
</if>
|
||||
where id = #{id}
|
||||
|
||||
</update>
|
||||
<update id="updateCaseAffiliateByCaseId">
|
||||
|
||||
<foreach collection="list" item="item" >
|
||||
update case_affiliate
|
||||
<set>
|
||||
|
||||
application_organ_id= #{item.applicationOrganId},
|
||||
application_organ_name= #{item.applicationOrganName},
|
||||
name = #{item.name},
|
||||
identity_num = #{item.identityNum},
|
||||
contact_telphone = #{item.contactTelphone},
|
||||
contact_address = #{item.contactAddress},
|
||||
work_address = #{item.workAddress},
|
||||
work_telphone = #{item.workTelphone},
|
||||
|
||||
name_agent = #{item.nameAgent},
|
||||
identity_num_agent = #{item.identityNumAgent},
|
||||
contact_telphone_agent = #{item.contactTelphoneAgent},
|
||||
contact_address_agent = #{item.contactAddressAgent},
|
||||
send_email = #{item.sendEmail},
|
||||
residen_affili = #{item.residenAffili},
|
||||
email= #{item.email},
|
||||
track_num = #{item.trackNum},
|
||||
comp_legal_person=#{item.compLegalPerson},
|
||||
comp_legalper_post=#{item.compLegalperPost},
|
||||
applicant_agent_user_id=#{item.applicantAgentUserId},
|
||||
respon_sex=#{item.responSex},
|
||||
respon_birth=#{item.responBirth},
|
||||
residen_affili=#{item.residenAffili},
|
||||
appli_agent_title=#{item.appliAgentTitle}
|
||||
|
||||
<if test="agentEmail !=null and agentEmail!=''">
|
||||
,agent_email=#{agentEmail}
|
||||
</if>
|
||||
</set>
|
||||
where case_appli_id = #{caseAppliId} and identity_type= #{item.identityType};
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
|
||||
delete from case_affiliate where case_appli_id = #{id}
|
||||
</delete>
|
||||
<delete id="batchDeletecaseAffiliate">
|
||||
|
||||
delete from case_affiliate where case_appli_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByCaseId">
|
||||
delete from case_affiliate where case_appli_id = #{caseAppliId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,291 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationLogMapper">
|
||||
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliId" column="caseAppliId" />
|
||||
<result property="caseNum" column="case_num" />
|
||||
<result property="caseName" column="case_name" />
|
||||
<result property="caseSubjectAmount" column="case_subject_amount" />
|
||||
<result property="registerDate" column="register_date" />
|
||||
<result property="arbitratMethod" column="arbitrat_method" />
|
||||
<result property="caseStatus" column="case_status" />
|
||||
<result property="hearDate" column="hear_date" />
|
||||
<result property="arbitratClaims" column="arbitrat_claims" />
|
||||
<result property="loanStartDate" column="loan_start_date" />
|
||||
<result property="loanEndDate" column="loan_end_date" />
|
||||
<result property="claimPrinciOwed" column="claim_princi_owed" />
|
||||
<result property="claimInterestOwed" column="claim_interest_owed" />
|
||||
<result property="claimLiquidDamag" column="claim_liquid_damag" />
|
||||
|
||||
<result property="feePayable" column="fee_payable" />
|
||||
<result property="beginVideoDate" column="begin_video_date" />
|
||||
<result property="onlineVideoPerson" column="online_video_person" />
|
||||
<result property="contractNumber" column="contract_number" />
|
||||
<result property="caseStatusName" column="caseStatusName" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="arbitratMethodName" column="arbitratMethodName" />
|
||||
|
||||
<result property="isAbsence" column="is_absence" />
|
||||
<result property="responCrossOpin" column="respon_cross_opin" />
|
||||
<result property="applicaCrossOpin" column="applica_cross_opin" />
|
||||
<result property="responDefenOpini" column="respon_defen_opini" />
|
||||
|
||||
<result property="arbitratorId" column="arbitrator_id" />
|
||||
<result property="arbitratorName" column="arbitrator_name" />
|
||||
<result property="paymentStatus" column="payment_status" />
|
||||
<result property="paymentStatusName" column="paymentStatusName" />
|
||||
<result property="filearbitraUrl" column="filearbitra_url" />
|
||||
|
||||
<result property="requestRule" column="request_rule" />
|
||||
<result property="properPreser" column="proper_preser" />
|
||||
<result property="adjudicaCounter" column="adjudica_counter" />
|
||||
<result property="lockStatus" column="lock_status" />
|
||||
<result property="version" column="version" />
|
||||
<result property="updateSubmitStatus" column="update_submit_status" />
|
||||
<result property="properPreser" column="proper_preser" />
|
||||
<result property="interestRate" column="interest_rate" />
|
||||
<result property="outstandingMoney" column="outstanding_money" />
|
||||
<result property="facts" column="facts" />
|
||||
<result property="partyA" column="party_a" />
|
||||
<result property="disputes" column="disputes" />
|
||||
<result property="loanType" column="loan_type" />
|
||||
<result property="loanTerm" column="loan_term" />
|
||||
<result property="mediationAgreement" column="mediation_agreement" />
|
||||
</resultMap>
|
||||
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into case_application_log(
|
||||
<if test="caseLogId != null ">id ,</if>
|
||||
<if test="caseAppliId != null ">case_appli_id ,</if>
|
||||
<if test="caseName != null and caseName != ''">case_name ,</if>
|
||||
<if test="caseNum != null and caseNum != ''">case_num,</if>
|
||||
<if test="caseSubjectAmount != null">case_subject_amount,</if>
|
||||
|
||||
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
|
||||
<if test="requestRule != null and requestRule != ''">request_rule,</if>
|
||||
<if test="loanStartDate != null ">loan_start_date,</if>
|
||||
<if test="loanEndDate != null ">loan_end_date,</if>
|
||||
<if test="claimPrinciOwed != null ">claim_princi_owed,</if>
|
||||
|
||||
<if test="claimInterestOwed != null ">claim_interest_owed,</if>
|
||||
<if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
|
||||
<if test="feePayable != null ">fee_payable,</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">contract_number,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="version != null ">version,</if>
|
||||
<if test="updateSubmitStatus != null ">update_submit_status,</if>
|
||||
<if test="properPreser != null ">proper_preser,</if>
|
||||
interest_rate,
|
||||
outstanding_money,
|
||||
facts,
|
||||
party_a,
|
||||
disputes,
|
||||
loan_type,
|
||||
loan_term,
|
||||
mediation_agreement,
|
||||
create_time
|
||||
)values(
|
||||
<if test="caseLogId != null ">#{id} ,</if>
|
||||
<if test="caseAppliId != null">#{caseAppliId},</if>
|
||||
<if test="caseName != null and caseName != ''">#{caseName},</if>
|
||||
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
||||
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
|
||||
|
||||
<if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
|
||||
<if test="requestRule != null and requestRule != ''">#{requestRule},</if>
|
||||
<if test="loanStartDate != null ">#{loanStartDate},</if>
|
||||
<if test="loanEndDate != null ">#{loanEndDate},</if>
|
||||
<if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
|
||||
|
||||
<if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
|
||||
<if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
|
||||
<if test="feePayable != null ">#{feePayable},</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="version != null ">#{version},</if>
|
||||
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
|
||||
<if test="properPreser != null ">#{properPreser},</if>
|
||||
#{interestRate},
|
||||
#{outstandingMoney},
|
||||
#{facts},
|
||||
#{partyA},
|
||||
#{disputes},
|
||||
#{loanType},
|
||||
#{loanTerm},
|
||||
#{mediationAgreement},
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
insert into case_application_log(
|
||||
id,
|
||||
case_appli_id ,
|
||||
case_name ,
|
||||
case_num,
|
||||
case_subject_amount,
|
||||
arbitrat_claims,
|
||||
request_rule,
|
||||
loan_start_date,
|
||||
loan_end_date,
|
||||
claim_princi_owed,
|
||||
claim_interest_owed,
|
||||
claim_liquid_damag,
|
||||
fee_payable,
|
||||
contract_number,
|
||||
create_by,
|
||||
version,
|
||||
update_submit_status,
|
||||
proper_preser,
|
||||
interest_rate,
|
||||
outstanding_money,
|
||||
facts,
|
||||
party_a,
|
||||
disputes,
|
||||
loan_type,
|
||||
loan_term,
|
||||
mediation_agreement,
|
||||
create_time
|
||||
)values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
id=#{item.id},
|
||||
#{item.caseAppliId},
|
||||
#{item.caseName},
|
||||
#{item.caseNum},
|
||||
#{item.caseSubjectAmount},
|
||||
#{item.arbitratClaims},
|
||||
#{item.requestRule},
|
||||
#{item.loanStartDate},
|
||||
#{item.loanEndDate},
|
||||
#{item.claimPrinciOwed},
|
||||
#{item.claimInterestOwed},
|
||||
#{item.claimLiquidDamag},
|
||||
#{item.feePayable},
|
||||
#{item.contractNumber},
|
||||
#{item.createBy},
|
||||
#{item.version},
|
||||
#{item.updateSubmitStatus},
|
||||
#{item.properPreser},
|
||||
#{item.interestRate},
|
||||
#{item.outstandingMoney},
|
||||
#{item.facts},
|
||||
#{item.partyA},
|
||||
#{item.disputes},
|
||||
#{item.loanType},
|
||||
#{item.loanTerm},
|
||||
#{item.mediationAgreement},
|
||||
sysdate()
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateStatus">
|
||||
update case_application_log
|
||||
|
||||
<set>
|
||||
<if test="updateSubmitStatus!= null ">update_submit_status=#{updateSubmitStatus},</if>
|
||||
|
||||
</set>
|
||||
<where>
|
||||
<if test="caseId!= null ">AND case_appli_id=#{caseId}</if>
|
||||
<if test="version!= null ">AND version=#{version}</if>
|
||||
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById" >
|
||||
DELETE FROM case_application_log
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
<delete id="batchDeleteLog">
|
||||
|
||||
delete from case_application_log l where l.id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
;
|
||||
delete from case_affiliate_log l where l.case_appli_log_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
;
|
||||
delete from case_attach_log l where l.case_appli_log_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
;
|
||||
delete from column_value_log l where l.case_appli_log_id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
;
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
|
||||
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
|
||||
outstanding_money,
|
||||
facts,
|
||||
party_a,
|
||||
disputes,
|
||||
loan_type,
|
||||
loan_term,
|
||||
mediation_agreement
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} and version=#{version}
|
||||
</select>
|
||||
|
||||
<select id="selectLatestCase" resultMap="CaseApplicationResult">
|
||||
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
|
||||
outstanding_money,
|
||||
facts,
|
||||
party_a,
|
||||
disputes,
|
||||
loan_type,
|
||||
loan_term,
|
||||
mediation_agreement
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
|
||||
</select>
|
||||
<select id="selectMaxVersionByCaseId" resultType="java.lang.Integer">
|
||||
SELECT max(version)
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId}
|
||||
|
||||
</select>
|
||||
<select id="selectMaxVersionBySecret" resultType="java.lang.Integer">
|
||||
SELECT max(version)
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
|
||||
</select>
|
||||
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
|
||||
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
|
||||
outstanding_money,
|
||||
facts,
|
||||
party_a,
|
||||
disputes,
|
||||
loan_type,
|
||||
loan_term,
|
||||
mediation_agreement
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
||||
</select>
|
||||
<select id="selectLogsByCaseIds" resultType="java.lang.Long">
|
||||
select id from case_application_log where case_appli_id in
|
||||
<foreach collection="ids" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,18 +16,18 @@
|
||||
<result property="caseAppliLogId" column="case_appli_log_id" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
|
||||
</insert>
|
||||
<insert id="batchSave">
|
||||
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliLogId},#{item.annexId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.userId},#{item.userName},#{item.sealStatus})
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
delete from case_attach_log
|
||||
delete from ms_case_attach_log
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
from ms_case_attach_log
|
||||
where case_appli_log_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
AND case_appli_log_id = #{caseAppliLogId}
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="caseLogId != null ">
|
||||
AND case_appli_log_id = #{caseLogId}
|
||||
@@ -73,7 +73,7 @@
|
||||
</select>
|
||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
from ms_case_attach_log
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
AND annex_id = #{annexId}
|
||||
@@ -82,14 +82,14 @@
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="CaseAttach">
|
||||
update case_attach_log
|
||||
update ms_case_attach_log
|
||||
set
|
||||
case_appli_log_id= #{caseAppliLogId}
|
||||
where annex_id = #{annexId}
|
||||
</update>
|
||||
|
||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
||||
update case_attach_log
|
||||
update ms_case_attach_log
|
||||
<set>
|
||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus},#{isBatchUpload})
|
||||
</insert>
|
||||
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
VALUES
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
delete from case_attach
|
||||
delete from ms_case_attach
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByCasedIdAndType">
|
||||
delete from case_attach
|
||||
delete from ms_case_attach
|
||||
where case_appli_id = #{caseAppliId}
|
||||
and annex_type = #{annexType}
|
||||
<if test="isBatchUpload != null ">
|
||||
@@ -45,13 +45,13 @@
|
||||
|
||||
<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
|
||||
from case_attach
|
||||
from ms_case_attach
|
||||
where case_appli_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="getCaseAttachByCaseIdAndType" 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
|
||||
from case_attach
|
||||
from ms_case_attach
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND case_appli_id = #{caseAppliId}
|
||||
@@ -63,14 +63,14 @@
|
||||
</select>
|
||||
|
||||
<delete id="deleteCaseAttachByCasedIdAndType">
|
||||
delete from case_attach
|
||||
delete from ms_case_attach
|
||||
where case_appli_id = #{caseAppliId}
|
||||
and annex_type = #{annexType}
|
||||
</delete>
|
||||
|
||||
<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
|
||||
from ms_case_attach
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND case_appli_id = #{id}
|
||||
@@ -88,7 +88,7 @@
|
||||
</select>
|
||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach
|
||||
from ms_case_attach
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
AND annex_id = #{annexId}
|
||||
@@ -97,14 +97,14 @@
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="CaseAttach">
|
||||
update case_attach
|
||||
update ms_case_attach
|
||||
set
|
||||
case_appli_id= #{caseAppliId}
|
||||
where annex_id = #{annexId}
|
||||
</update>
|
||||
|
||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
||||
update case_attach
|
||||
update ms_case_attach
|
||||
<set>
|
||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceDirectoryMapper">
|
||||
<resultMap type="CaseEvidenceDirectory" id="CaseEvidenceDirectoryResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="evidenceName" column="evidence_name" />
|
||||
<result property="annexId" column="annex_id" />
|
||||
<result property="series" column="series" />
|
||||
<result property="caseId" column="case_appli_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="annexName" column="annex_name" />
|
||||
<result property="annexPath" column="annex_path" />
|
||||
</resultMap>
|
||||
<insert id="save" parameterType="CaseEvidenceDirectory" useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
insert into case_evidence_directory(
|
||||
<if test="parentId != null ">parent_id,</if>
|
||||
<if test="evidenceName != null and evidenceName != ''">evidence_name,</if>
|
||||
<if test="annexId != null ">annex_id,</if>
|
||||
<if test="series != null ">series,</if>
|
||||
<if test="caseId != null ">case_appli_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="parentId != null ">#{parentId},</if>
|
||||
<if test="evidenceName != null and evidenceName != ''">#{evidenceName},</if>
|
||||
<if test="annexId != null ">#{annexId},</if>
|
||||
<if test="series != null ">#{series},</if>
|
||||
<if test="caseId != null ">#{caseId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
<select id="selectList" parameterType="CaseEvidenceDirectory" resultMap="CaseEvidenceDirectoryResult">
|
||||
select ced.id,ced.parent_id,ced.evidence_name,ced.annex_id,ced.series,ced.create_time
|
||||
,ced.update_time,ced.case_appli_id,ced.create_by,ced.update_by,ca.annex_name,ca.annex_path
|
||||
from case_evidence_directory ced
|
||||
left join case_attach ca on ced.annex_id = ca.annex_id
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND ced.id = #{id}
|
||||
</if>
|
||||
<if test="parentId != null ">
|
||||
AND ced.parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="evidenceName != null ">
|
||||
AND ced.evidence_name = #{evidenceName}
|
||||
</if>
|
||||
<if test="annexId != null ">
|
||||
AND ced.annex_id = #{annexId}
|
||||
</if>
|
||||
<if test="series != null ">
|
||||
AND ced.series = #{series}
|
||||
</if>
|
||||
<if test="caseId != null ">
|
||||
AND ced.case_appli_id = #{caseId}
|
||||
</if>
|
||||
order by ced.parent_id
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeptListByEvidenceName" resultType="INTEGER">
|
||||
select ced.id
|
||||
from case_evidence_directory ced
|
||||
left join case_attach ca on ced.annex_id = ca.annex_id
|
||||
where ced.evidence_name = #{evidenceName}
|
||||
<if test="deptCheckStrictly">
|
||||
and ced.annex_id not in (select ced.parent_id from case_evidence_directory ced inner join case_attach ca on ced.annex_id = ca.annex_id and ced.evidence_name = #{evidenceName})
|
||||
</if>
|
||||
order by ced.parent_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
|
||||
<resultMap type="CaseEvidenceVO" id="CaseEvidenceVOResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseNum" column="case_num" />
|
||||
<result property="caseStatus" column="case_status" />
|
||||
<result property="roomId" column="room_id" />
|
||||
<result property="scheduleStartTime" column="schedule_start_time" />
|
||||
</resultMap>
|
||||
<select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
|
||||
select DISTINCT(c.id) id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
|
||||
from case_application as c join case_affiliate as d on c.id = d.case_appli_id
|
||||
left join reserved_conference rc on rc.case_id=c.id
|
||||
where c.id = d.case_appli_id
|
||||
<if test="identityNum != null and identityNum != ''">
|
||||
and d.identity_num = #{identityNum}
|
||||
</if>
|
||||
<if test="identityType != null ">
|
||||
and d.identity_type = #{identityType}
|
||||
</if>
|
||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||
and c.case_status in
|
||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -16,12 +16,12 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertCaseLogRecord">
|
||||
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
|
||||
insert into ms_case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
|
||||
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
|
||||
)
|
||||
</insert>
|
||||
<insert id="batchInsertRecord">
|
||||
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values
|
||||
insert into ms_case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{item.caseAppliId},#{item.caseNode},sysdate(),#{item.notes},#{item.createBy},#{item.createNickName},sysdate(),#{item.updateBy},sysdate()
|
||||
@@ -50,7 +50,7 @@
|
||||
when 15 then '法律顾问' when 16 then '法律顾问'
|
||||
ELSE '无角色'
|
||||
END roleName
|
||||
from case_log_record cl
|
||||
from ms_case_log_record cl
|
||||
|
||||
<where>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertCaseNumRule" parameterType="CaseNumRule" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into case_num_rule(
|
||||
insert into ms_case_num_rule(
|
||||
<if test="ruleType != null">rule_type,</if>
|
||||
<if test="prefixstr != null and prefixstr != '' ">prefixstr,</if>
|
||||
<if test="dateFormat != null">date_format,</if>
|
||||
@@ -36,7 +36,7 @@
|
||||
</insert>
|
||||
|
||||
<update id="updateCaseNumRule" parameterType="CaseNumRule">
|
||||
update case_num_rule
|
||||
update ms_case_num_rule
|
||||
<set>
|
||||
<if test="ruleType != null">rule_type = #{ruleType},</if>
|
||||
<if test="prefixstr != null and prefixstr != '' ">prefixstr = #{prefixstr},</if>
|
||||
@@ -52,12 +52,12 @@
|
||||
</where>
|
||||
</update>
|
||||
<delete id="deleteCaseNumRule" parameterType="CaseNumRule">
|
||||
delete from case_num_rule where id = #{id}
|
||||
delete from ms_case_num_rule where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
||||
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
||||
FROM case_num_rule
|
||||
FROM ms_case_num_rule
|
||||
<where>
|
||||
<if test="deptNameFirchar != null and deptNameFirchar != ''">
|
||||
AND dept_name_firchar = #{deptNameFirchar}
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
|
||||
<select id="countCaseNumRule" resultType="Integer">
|
||||
select count(1) from case_num_rule c
|
||||
select count(1) from ms_case_num_rule c
|
||||
<where>
|
||||
<if test="prefixstr != null and prefixstr != '' ">
|
||||
AND c.prefixstr = #{prefixstr}
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
|
||||
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
|
||||
FROM case_num_rule
|
||||
FROM ms_case_num_rule
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND id = #{id}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CasePaymentRecordMapper">
|
||||
<resultMap type="CasePaymentRecord" id="CasePaymentRecordResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseId" column="case_id" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="paymentStatus" column="payment_status" />
|
||||
<result property="paymentTime" column="payment_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="payType" column="pay_type" />
|
||||
</resultMap>
|
||||
<insert id="saveRecord">
|
||||
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
|
||||
VALUES (#{caseId}, #{orderNumber}, #{paymentStatus},#{createTime})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update case_payment_record
|
||||
<set>
|
||||
<if test="caseId != null">case_id= #{caseId},</if>
|
||||
<if test="orderNumber != null and orderNumber != ''">order_number = #{orderNumber},</if>
|
||||
<if test="paymentTime != null ">payment_time = #{paymentTime},</if>
|
||||
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="payType != null ">pay_type = #{payType},</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="caseId != null ">
|
||||
AND case_id = #{caseId}
|
||||
</if>
|
||||
<if test="id != null ">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<select id="queryRecord" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
|
||||
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
|
||||
from case_payment_record c
|
||||
<where>
|
||||
<if test="orderNumber != null and orderNumber != '' ">
|
||||
AND c.order_number = #{orderNumber}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRecordByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
|
||||
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
|
||||
from case_payment_record c
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND c.case_id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -11,7 +11,7 @@
|
||||
<result column="case_appli_log_id" property="caseAppliLogId" />
|
||||
</resultMap>
|
||||
<insert id="batchSave">
|
||||
INSERT INTO column_value_log ( `COLUMN`, `NAME`, `VALUE`, case_appli_log_id,is_default )
|
||||
INSERT INTO ms_column_value_log ( `COLUMN`, `NAME`, `VALUE`, case_appli_log_id,is_default )
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="listBycaseAppliLogId" resultMap="BaseResultMap">
|
||||
select * from column_value_log where case_appli_log_id=#{caseAppliLogId}
|
||||
select * from ms_column_value_log where case_appli_log_id=#{caseAppliLogId}
|
||||
</select>
|
||||
<update id="batchUpdate">
|
||||
<foreach collection="list" item="item" >
|
||||
update column_value_log
|
||||
update ms_column_value_log
|
||||
<set>
|
||||
<if test="item.value != null and item.value != ''">
|
||||
`VALUE` = #{item.value},
|
||||
@@ -34,7 +34,7 @@
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
|
||||
select * from column_value_log c
|
||||
select * from ms_column_value_log c
|
||||
<where>
|
||||
<if test="caseAppliLogId != null">
|
||||
AND c.case_appli_log_id = #{caseAppliLogId}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<result column="is_default" property="isDefault" />
|
||||
</resultMap>
|
||||
<insert id="batchSave">
|
||||
INSERT INTO column_value ( `COLUMN`, `NAME`, `VALUE`, case_id,is_default )
|
||||
INSERT INTO ms_column_value ( `COLUMN`, `NAME`, `VALUE`, case_id,is_default )
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</insert>
|
||||
<update id="batchUpdate">
|
||||
<foreach collection="list" item="item" >
|
||||
update column_value
|
||||
update ms_column_value
|
||||
<set>
|
||||
<if test="item.value != null and item.value != ''">
|
||||
`VALUE` = #{item.value},
|
||||
@@ -32,7 +32,7 @@
|
||||
</update>
|
||||
|
||||
<update id="updateColumnValue" parameterType="ColumnValue">
|
||||
update column_value
|
||||
update ms_column_value
|
||||
<set>
|
||||
<if test="value != null and value != ''">
|
||||
`VALUE` = #{value},
|
||||
@@ -42,11 +42,11 @@
|
||||
</update>
|
||||
|
||||
<select id="listByCaseId" resultMap="BaseResultMap">
|
||||
select * from column_value where case_id=#{caseId}
|
||||
select * from ms_column_value where case_id=#{caseId}
|
||||
</select>
|
||||
|
||||
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
|
||||
select * from column_value c
|
||||
select * from ms_column_value c
|
||||
<where>
|
||||
<if test="caseId != null">
|
||||
AND c.case_id = #{caseId}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
|
||||
oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
|
||||
,identify_email,dept_id ,user_id
|
||||
FROM dept_identify
|
||||
FROM ms_dept_identify
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dept_identify(
|
||||
insert into ms_dept_identify(
|
||||
<if test="identifyName != null and identifyName != ''">identify_name,</if>
|
||||
<if test="identifyStatus != null">identify_status,</if>
|
||||
<if test="identifyDate != null">identify_date,</if>
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
|
||||
<update id="updateDeptIdentify" parameterType="DeptIdentify">
|
||||
update dept_identify
|
||||
update ms_dept_identify
|
||||
<set>
|
||||
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
|
||||
<if test="identifyName != null">identify_name = #{identifyName},</if>
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
<select id="listByTemplateId" resultMap="BaseResultMap">
|
||||
select f.id ,f.file_name ,f.start_content ,f.end_content ,
|
||||
f.`column` , ifnull(f.is_default,0) is_default ,f.`column_name`,ifnull(f.start_content_repeat_order,1) start_content_repeat_order,ifnull(f.end_content_repeat_order,1) end_content_repeat_order,ifnull(f.fatch_order,0) fatch_order
|
||||
from fatch_rule f join template_fatch_rule tfr on f.id=tfr.fatch_rule_id
|
||||
from ms_fatch_rule f join ms_template_fatch_rule tfr on f.id=tfr.ms_fatch_rule_id
|
||||
where tfr.template_id=#{templateId}
|
||||
</select>
|
||||
|
||||
<select id="selectFatchRuleList" parameterType="FatchRule" resultMap="BaseResultMap">
|
||||
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
|
||||
f.`column` ,f.is_default ,f.`column_name`,f.start_content_repeat_order,f.end_content_repeat_order,f.fatch_order
|
||||
FROM template_fatch_rule tf
|
||||
left join template_manage t on tf.template_id = t.id
|
||||
LEFT JOIN fatch_rule f on tf.fatch_rule_id = f.id
|
||||
FROM ms_template_fatch_rule tf
|
||||
left join ms_template_manage t on tf.template_id = t.id
|
||||
LEFT JOIN ms_fatch_rule f on tf.ms_fatch_rule_id = f.id
|
||||
<where>
|
||||
<if test="templateId != null">
|
||||
AND tf.template_id = #{templateId}
|
||||
@@ -72,7 +72,7 @@
|
||||
<select id="selectFatchRuleListIsDefault" parameterType="FatchRule" resultMap="BaseResultMap">
|
||||
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
|
||||
f.`column` ,f.is_default ,f.`column_name`
|
||||
FROM fatch_rule f
|
||||
FROM ms_fatch_rule f
|
||||
<where>
|
||||
<if test="isDefault != null">
|
||||
AND f.is_default = #{isDefault}
|
||||
@@ -81,14 +81,14 @@
|
||||
</select>
|
||||
|
||||
<delete id="deletebatchFatchRule">
|
||||
delete from fatch_rule where id in
|
||||
delete from ms_fatch_rule where id in
|
||||
<foreach collection="fatchRuleIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertFatchRule" parameterType="FatchRule" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into fatch_rule(
|
||||
insert into ms_fatch_rule(
|
||||
<if test="fileName != null and fileName != ''">file_name,</if>
|
||||
<if test="startContent != null and startContent != ''">start_content,</if>
|
||||
<if test="endContent != null and endContent != ''">end_content,</if>
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into identi_authenti(
|
||||
insert into ms_identi_authenti(
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="idAddress != null and idAddress != ''">id_address,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
@@ -39,7 +39,7 @@
|
||||
)
|
||||
</insert>
|
||||
<update id="updateIdentityAuthentication">
|
||||
update identi_authenti
|
||||
update ms_identi_authenti
|
||||
<set>
|
||||
<if test="userId != null ">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name
|
||||
from identi_authenti i
|
||||
from ms_identi_authenti i
|
||||
<where>
|
||||
certification_status=0
|
||||
<if test="userName != null and userName != '' ">
|
||||
@@ -69,7 +69,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectCountIdentityAuthentication" resultType="Integer">
|
||||
select count(1) from identi_authenti i
|
||||
select count(1) from ms_identi_authenti i
|
||||
<where>
|
||||
<if test="userName != null and userName != '' ">
|
||||
AND i.user_name = #{userName}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ReservedConferenceMapper">
|
||||
|
||||
<insert id="insert">
|
||||
insert into reserved_conference(
|
||||
insert into ms_reserved_conference(
|
||||
case_id,
|
||||
room_id,
|
||||
schedule_start_time,
|
||||
@@ -20,17 +20,17 @@
|
||||
)
|
||||
</insert>
|
||||
<delete id="deleteByRoomId">
|
||||
delete from reserved_conference where room_id=#{roomId}
|
||||
delete from ms_reserved_conference where room_id=#{roomId}
|
||||
</delete>
|
||||
<delete id="batchDeleteByIds">
|
||||
delete from reserved_conference where id in
|
||||
delete from ms_reserved_conference where id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
|
||||
select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime,user_id userId
|
||||
from reserved_conference where case_id=#{caseId}
|
||||
from ms_reserved_conference where case_id=#{caseId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
|
||||
SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
|
||||
FROM seal_manage
|
||||
FROM ms_seal_manage
|
||||
<where>
|
||||
<if test="identifyId != null">
|
||||
AND identify_id = #{identifyId}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
<insert id="insertSealManage" parameterType="SealManage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into seal_manage(
|
||||
insert into ms_seal_manage(
|
||||
<if test="identifyId != null">identify_id,</if>
|
||||
<if test="sealName != null and sealName != ''">seal_name,</if>
|
||||
<if test="sealId != null and sealId != ''">seal_id,</if>
|
||||
@@ -46,7 +46,7 @@
|
||||
</insert>
|
||||
|
||||
<update id="updateSealManage" parameterType="SealManage">
|
||||
update seal_manage
|
||||
update ms_seal_manage
|
||||
<set>
|
||||
<if test="identifyId != null">identify_id = #{identifyId},</if>
|
||||
<if test="sealName != null">seal_name = #{sealName},</if>
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
|
||||
|
||||
<insert id="insertSealSignRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
|
||||
,penson_name,orgnize_name,orgn_name_psn_acc,orgn_name_psn_name,position_pagepsn
|
||||
,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
|
||||
,sign_flow_status)
|
||||
VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
|
||||
,#{orgnizeNamePsnAccount},#{orgnizeNamepsnName},#{positionPagepsn},#{positionXpsn},#{positionYpsn}
|
||||
,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
|
||||
</insert>
|
||||
|
||||
|
||||
<resultMap type="SealSignRecord" id="SealSignRecordResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliId" column="case_appli_id" />
|
||||
<result property="fileid" column="file_id" />
|
||||
<result property="signFlowid" column="sign_flow_id" />
|
||||
<result property="signFlowStatus" column="sign_flow_status" />
|
||||
|
||||
<result property="pensonAccount" column="penson_account" />
|
||||
<result property="orgnizeName" column="orgnize_name" />
|
||||
<result property="orgnizeNamePsnAccount" column="orgn_name_psn_acc" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
|
||||
from seal_sign_record s
|
||||
<where>
|
||||
<if test="signFlowStatus != null ">
|
||||
AND s.sign_flow_status = #{signFlowStatus}
|
||||
</if>
|
||||
<if test="caseAppliId != null ">
|
||||
AND s.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
|
||||
from seal_sign_record s join case_application c on s.case_appli_id=c.id
|
||||
where s.sign_flow_status in (1,2)
|
||||
</select>
|
||||
<select id="selectSealSigning" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
|
||||
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
|
||||
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
when 18 then '待仲裁员审核仲裁文书'
|
||||
when 31 then '待修改开庭时间'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
|
||||
ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
|
||||
c.arbitrat_method arbitratMethod ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
c.arbitrator_id arbitratorId,
|
||||
c.arbitrator_name arbitratorName
|
||||
from seal_sign_record s
|
||||
join case_application c on s.case_appli_id=c.id
|
||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
<!-- where s.sign_flow_status in (0,1,2)-->
|
||||
<where>
|
||||
<if test="penSonAccount != null and penSonAccount!='' ">
|
||||
AND s.penson_account = #{penSonAccount}
|
||||
</if>
|
||||
<if test="caseStatus != null and caseStatus!='' ">
|
||||
AND c.case_status = #{caseStatus}
|
||||
</if>
|
||||
</where>
|
||||
order by c.case_num desc
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
||||
update seal_sign_record
|
||||
<set>
|
||||
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
|
||||
<if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -19,7 +19,7 @@
|
||||
<select id="selectSendMailRecord" parameterType="SendMailRecord" resultMap="SendMailRecordResult">
|
||||
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
||||
s.update_by ,s.update_time , s.send_status ,c.case_num
|
||||
from send_mail_record s left join case_application c
|
||||
from send_mail_record s left join ms_case_application c
|
||||
on s.case_id = c.id
|
||||
<where>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectTemplateFatchRulecount" parameterType="TemplateFatchRule" resultType="Integer">
|
||||
select count(1) from template_fatch_rule t
|
||||
select count(1) from ms_template_fatch_rule t
|
||||
<where>
|
||||
<if test="templateId != null">
|
||||
AND t.template_id = #{templateId}
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<select id="selectTemplateFatchRuleList" parameterType="TemplateFatchRule" resultMap="BaseResultMap">
|
||||
SELECT t.id ,t.template_id ,t.fatch_rule_id
|
||||
from template_fatch_rule t
|
||||
from ms_template_fatch_rule t
|
||||
<where>
|
||||
<if test="templateId != null">
|
||||
AND t.template_id = #{templateId}
|
||||
@@ -32,11 +32,11 @@
|
||||
</select>
|
||||
|
||||
<delete id="deleteTemplateFatchRule" parameterType="Long">
|
||||
delete from template_fatch_rule where template_id=#{id}
|
||||
delete from ms_template_fatch_rule where template_id=#{id}
|
||||
</delete>
|
||||
|
||||
<insert id="insertTemplateFatchRule" parameterType="TemplateFatchRule" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into template_fatch_rule(
|
||||
insert into ms_template_fatch_rule(
|
||||
<if test="templateId != null">template_id,</if>
|
||||
<if test="fatchRuleId != null">fatch_rule_id</if>
|
||||
)values(
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into template_manage(
|
||||
insert into ms_template_manage(
|
||||
<if test="identifyId != null">identify_id,</if>
|
||||
<if test="temName != null and temName != ''">tem_name,</if>
|
||||
<if test="temType != null">tem_type,</if>
|
||||
@@ -40,7 +40,7 @@
|
||||
</insert>
|
||||
|
||||
<update id="updateTemplateManage" parameterType="TemplateManage">
|
||||
update template_manage
|
||||
update ms_template_manage
|
||||
<set>
|
||||
<if test="identifyId != null">identify_id = #{identifyId},</if>
|
||||
<if test="temName != null and temName != ''">tem_name = #{temName},</if>
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
|
||||
SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
|
||||
FROM template_manage
|
||||
FROM ms_template_manage
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.TemplateManualMapper">
|
||||
<resultMap type="TemplateManual" id="TemplateManualResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="content" column="content" />
|
||||
<result property="type" column="type" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
<insert id="insertTemplateManual" parameterType="TemplateManual" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into template_manual(
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="content != null and content != '' ">content,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
del_flag
|
||||
)values(
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="content != null and content != '' ">#{content},</if>
|
||||
<if test="type != null ">#{type},</if>
|
||||
0
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateTemplateManual" parameterType="TemplateManual">
|
||||
update template_manual
|
||||
<set>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="content != null and content != '' ">content = #{content},</if>
|
||||
<if test="type != null ">type = #{type},</if>
|
||||
<if test="delFlag != null ">del_flag = #{delFlag},</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</update>
|
||||
<select id="selectTemplateManual" parameterType="TemplateManual" resultMap="TemplateManualResult">
|
||||
SELECT id, name ,content , type
|
||||
FROM template_manual
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
AND content = #{content}
|
||||
</if>
|
||||
<if test="type != null ">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
AND del_flag =0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
</resultMap>
|
||||
<insert id="insertUser">
|
||||
insert into identi_authenti(
|
||||
insert into ms_ms_identi_authenti(
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||
certification_time,
|
||||
@@ -39,7 +39,7 @@
|
||||
)
|
||||
</insert>
|
||||
<update id="updateUser">
|
||||
update identi_authenti
|
||||
update ms_ms_identi_authenti
|
||||
<set>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
@@ -50,11 +50,11 @@
|
||||
</update>
|
||||
<select id="selectIdentityAuthentication" resultMap="BaseResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
|
||||
from identi_authenti i
|
||||
from ms_ms_identi_authenti i
|
||||
</select>
|
||||
<select id="selectUserByOppenId" resultMap="BaseResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
|
||||
from identi_authenti i where open_id=#{oppenId}
|
||||
from ms_ms_identi_authenti i where open_id=#{oppenId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user