Commit 1e57fc96 authored by shenxin's avatar shenxin

添加办件重新推送接口

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