代码冲突解决

This commit is contained in:
18792927508
2023-10-18 18:19:14 +08:00
parent 1c6544fea7
commit 7980d2880d
3 changed files with 85 additions and 207 deletions
@@ -55,16 +55,9 @@ public interface CaseApplicationMapper {
*/
void updatePayType(CaseConfirmPayDTO payDTO);
/**
* 查询部门长案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
ToDoCount selectAdminCaseToDoCount();
ToDoCount selectDeptHeadCaseToDoCount( @Param("statusList")List<Integer> caseStatusList);
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
}
@@ -243,12 +243,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
Map<String, Long> deptMap =new HashMap<>();
if (caseAffiliates != null && caseAffiliates.size() > 0) {
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
for (CaseAffiliate caseAffiliate : caseAffiliates) {
caseAffiliate.setCaseAppliId(caseApplication.getId());
@@ -307,7 +307,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
String currentDay = DateUtils.dateTime();
String caseNum = "zc"+ currentDay;
//查询出当天的案件编号的最大值
Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
if(null == maxCaseNum){
caseNum = caseNum + "001";
}else {
@@ -373,7 +373,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
}
}
@@ -428,7 +428,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
SmsUtils.sendSms(request);
}
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
return "申请机构与申请代理人不匹配";
return "申请机构与申请代理人不匹配";
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
// 同步用户表和案件关联人表的手机号和名称
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
@@ -602,47 +602,47 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
// if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
List<CaseApplication> caseApplicationNewList = null;
for (int i = 0; i < caseApplicationListinsert.size(); i++){
caseApplicationNewList = new ArrayList<>();
CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
// 设置自动编码
caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
CaseApplication caseApplicationNew = new CaseApplication();
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
for (int j = 0; j < caseApplicationListinsert.size(); j++){
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
List<CaseApplication> caseApplicationNewList = null;
for (int i = 0; i < caseApplicationListinsert.size(); i++){
caseApplicationNewList = new ArrayList<>();
CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
// 设置自动编码
caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
CaseApplication caseApplicationNew = new CaseApplication();
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
for (int j = 0; j < caseApplicationListinsert.size(); j++){
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
}
caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
}
caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
caseApplicationNewList.add(caseApplicationNew);
}
caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
caseApplicationNewList.add(caseApplicationNew);
}
for (int k = 0; k < caseApplicationNewList.size(); k++){
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
// 新增立案信息
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
}
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
}
for (int k = 0; k < caseApplicationNewList.size(); k++){
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
// 新增立案信息
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
}
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
}
successNum++;
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
}
successNum++;
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
}
// }
@@ -653,7 +653,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}else {
throw new ServiceException("导入立案申请数据不能为空!");
}
return successMsg.append(failureMsg.toString()).toString();
return successMsg.append(failureMsg.toString()).toString();
}
@@ -1019,7 +1019,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
double positionX = coordinateObj.getDoubleValue("positionX");
double positionY = coordinateObj.getDoubleValue("positionY");
sealSignRecord.setPositionXpsn(positionX);
sealSignRecord.setPositionXpsn(positionX+90);
sealSignRecord.setPositionYpsn(positionY);
}
}else {
@@ -1034,8 +1034,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
double positionX = coordinateObj.getDoubleValue("positionX");
double positionY = coordinateObj.getDoubleValue("positionY");
sealSignRecord.setPositionXorg(positionX);
sealSignRecord.setPositionYorg(positionY);
sealSignRecord.setPositionXorg(positionX-10);
sealSignRecord.setPositionYorg(positionY+10);
}
}
}
@@ -1423,19 +1423,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
for(int i = 0;i < idStrList.length;i ++ ){
idList.add(Long.parseLong(idStrList[i]));
}
// 查询仲裁员电话号
List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
if(CollectionUtil.isNotEmpty(userList)) {
for (SysUser user : userList) {
//给仲裁员发送短信通知
request.setPhone(user.getPhonenumber());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = user.getNickName();
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
SmsUtils.sendSms(request);
// 查询仲裁员电话号
List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
if(CollectionUtil.isNotEmpty(userList)) {
for (SysUser user : userList) {
//给仲裁员发送短信通知
request.setPhone(user.getPhonenumber());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = user.getNickName();
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
SmsUtils.sendSms(request);
}
}
}
}
}
@@ -1448,7 +1448,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
}
//给申请人、被申请人发送短信通知
@@ -1501,7 +1501,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
// 申请人信息
// 申请人信息
CaseAffiliate caseAffiliate = new CaseAffiliate();
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
@@ -1516,7 +1516,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if(StrUtil.isNotEmpty(s)){
StringBuilder errorMsg = caseApplication.getErrorMsg();
if(StrUtil.isEmpty(errorMsg)){
errorMsg=new StringBuilder();
errorMsg=new StringBuilder();
}
errorMsg.append(s);
caseApplication.setErrorMsg(errorMsg);
@@ -1563,27 +1563,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseApplication.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
// 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseApplication.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}
}
}