Commit 53ed0d81 authored by wujiang's avatar wujiang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents d6676438 ae1a6b9d
......@@ -30,11 +30,13 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingRectificationOrder;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService;
import com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -42,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.util.*;
/**
......@@ -71,6 +74,9 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
@Autowired
private CommonServiceImpl commonService;
@Resource(type = RedisLockUtil.class)
private RedisLockUtil redisLockUtil;
@UserLimits
public Page<Map<String, Object>> queryForFinancingInfoPage(Page<Map<String, Object>> page, String type, String status, String regionalCompaniesCode, String ownersName) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
......@@ -115,6 +121,13 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}
public FinancingInfoDto saveModel(FinancingInfoDto model) {
String lockName = String.format("LockName:powerStationExamine");
try{
Boolean isLocked = redisLockUtil.tryLock(lockName, lockName, 10, 1);
if (BooleanUtils.isNotTrue(isLocked)) {
throw new com.yeejoin.amos.component.robot.BadRequest("其他用户正在操作,请刷新后再试!");
}
List<String> ids;
if (model.getPeasantHouseholdIds().contains(",")) {
ids = Arrays.asList(model.getPeasantHouseholdIds().split(","));
......@@ -179,12 +192,12 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
map.put("instanceId",financingInfos1.getInstanceId());
this.execueFlow(map);
}
//发起待办
// commonService.buildTaskModel(buildDZTRZTaskModel(model, workflowResultDto, date));
});
}finally {
redisLockUtil.releaseLock(lockName);
}
return model;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment