Commit 1e57fc96 authored by shenxin's avatar shenxin

添加办件重新推送接口

parent 9dd93fa1
......@@ -51,11 +51,12 @@ public class ResourceController extends BaseCRUDJsonMappingController<ResourceSe
Map<String, Object> statsus = new HashMap<String, Object>();
statsus.put("authType", AuthType.getEnumMap());
statsus.put("sourceType", SourceType.getEnumMap());
if (getCurUser().isAdmin()) {
statsus.put("userType", IBaseEnum.getEnumMap(UserType.class));
} else {
statsus.put("userType", UserType.findByValue(getCurUser().getUserType()));
}
// if (getCurUser().isAdmin()) {
// statsus.put("userType", IBaseEnum.getEnumMap(UserType.class));
// } else {
// statsus.put("userType", UserType.findByValue(getCurUser().getUserType()));
// }
model.put(KEY_RESULT_DICT, statsus);
super.init(request, response, form, model, context);
}
......
......@@ -23,7 +23,7 @@ public class ArameterServiceImpl extends AbstractCRUDCacheServiceImpl<ArameterDa
protected void saveBefore(ArameterEntity entity, Context context) throws AppException {
if (entity.newEntity()){
entity.setId(SnowFlakeUtil.get().nextId());
entity.setCreatorId(String.valueOf(context.getUser().getId()));
entity.setCreatorId("1");
//固定阈值,先写死
entity.setThresholdValue("6");
entity.setCreateTime(DateTime.now());
......
......@@ -11,6 +11,8 @@ import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.common.code.NodeTypeEnum;
import com.mortals.xhx.common.utils.DateByAffairUtils;
import com.mortals.xhx.modules.arameter.model.ArameterEntity;
import com.mortals.xhx.modules.arameter.service.ArameterService;
import com.mortals.xhx.modules.implementlist.dao.RybMatterDao;
import com.mortals.xhx.modules.implementlist.dao.RybWorkDao;
import com.mortals.xhx.modules.implementlist.model.RybMatterListEntry;
......@@ -40,15 +42,15 @@ import java.util.stream.Collectors;
@Component("rybApplyAndAcceptInformationTaskImpl")
public class RybApplyAndAcceptInformationTaskImpl implements ITaskExcuteService {
@Value("${upload.AppKey}")
String AppKey;
@Autowired
private InformationService informationService;
@Autowired
private QueryInformationServiceImpl queryInformationService;
@Autowired
private ArameterService arameterService;
@Resource
private RybWorkDao rybWorkDao;
......@@ -71,6 +73,9 @@ public class RybApplyAndAcceptInformationTaskImpl implements ITaskExcuteService
return;
}
List<InformationEntity> entities = informationEntities.parallelStream().map(e -> {
ArameterEntity extCache = new ArameterEntity();
extCache.setSysCode(e.getSystemCode());
extCache = arameterService.find(extCache).get(0);
//组装参数
HashMap<String, Object> stringObjectHashMap = assemblyParameters(e);
if(stringObjectHashMap == null){
......@@ -86,9 +91,8 @@ public class RybApplyAndAcceptInformationTaskImpl implements ITaskExcuteService
e.setAcceptPhone(map.get("receiveuserphone"));
Map<String, Object> params = new HashMap<>();
params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap));
HttpRequest key = HttpUtil.createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjsqtjbsl/zs")//蓉易办
// HttpRequest key = HttpUtil.createPost("http://192.168.0.222:17011/m/supplement/test")//本地测试
.header("AppKey", AppKey)
HttpRequest key = HttpUtil.createPost(extCache.getDecideAdress())//蓉易办
.header("AppKey", extCache.getSysCode())
.header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8").form(params);
HttpResponse appKey = key.execute().charset("utf-8");
JSONObject jsonObject = JSONObject.parseObject(appKey.body());
......
......@@ -7,6 +7,8 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.common.code.NodeTypeEnum;
import com.mortals.xhx.modules.arameter.model.ArameterEntity;
import com.mortals.xhx.modules.arameter.service.ArameterService;
import com.mortals.xhx.modules.information.model.InformationEntity;
import com.mortals.xhx.modules.information.service.InformationService;
import com.mortals.xhx.modules.service.QueryInformationServiceImpl;
......@@ -30,12 +32,12 @@ import java.util.stream.Collectors;
@Component("rybSubmitLinkDataInformationTaskImpl")
public class RybSubmitLinkDataInformationTaskImpl implements ITaskExcuteService {
@Value("${upload.AppKey}")
String AppKey;
@Autowired
private InformationService informationService;
@Autowired
private ArameterService arameterService;
@Autowired
private QueryInformationServiceImpl queryInformationService;
......@@ -55,14 +57,16 @@ public class RybSubmitLinkDataInformationTaskImpl implements ITaskExcuteService
return;
}
List<InformationEntity> collect = informationEntities.parallelStream().map(e -> {
ArameterEntity extCache = new ArameterEntity();
extCache.setSysCode(e.getSystemCode());
extCache = arameterService.find(extCache).get(0);
//组装参数
HashMap<String, Object> stringObjectHashMap = assemblyParametersLink(e);
Map<String, Object> params = new HashMap<>();
params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap));
String appKey = HttpUtil
.createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjhjgcsjts/zs").form(params)//蓉易办
// .createPost("http://192.168.0.222:17011/m/supplement/test").form(params)//测试
.header("AppKey", AppKey)
.createPost(extCache.getDecideAdress()).form(params)//蓉易办
.header("AppKey", extCache.getSysCode())
.header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
.execute()
.charset("utf-8")
......
......@@ -60,7 +60,7 @@
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>hotel@2020</profiles.redis.password>
<profiles.redis.database>2</profiles.redis.database>
<profiles.filepath>/mortals/data</profiles.filepath>
<profiles.filepath>D:/pic</profiles.filepath>
<profiles.log.level>INFO</profiles.log.level>
<profiles.log.path>/logs</profiles.log.path>
<profiles.data.path>/data</profiles.data.path>
......
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