Commit 1f5f3c6d authored by chenzhao's avatar chenzhao

服务修改

parent e9a6c3dd
......@@ -141,7 +141,7 @@ public class AcceptanceCheckController extends BaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "整改单下发", notes = "整改单下发")
@ApiOperation(httpMethod = "POST",value = "整改单下发", notes = "整改单下发")
@PostMapping(value = "/addRectification")
@Transactional
public ResponseModel addRectification( @RequestBody HygfRectificationOrder hygfReplenishment) {
......
......@@ -181,7 +181,8 @@ public class BasicGridAcceptanceController extends BaseController {
if (null != e.getBasicGridNode() && e.getBasicGridNode().contains(g) && (roleIds.contains(areaId) ||roleIds.contains(designId) || roleIds.contains(engineeringId))){
e.setIsAudit("0");
break;
}else {
}
else {
e.setIsAudit("1");
}
}
......
......@@ -228,7 +228,7 @@ public class HygfRectificationOrderController extends BaseController {
e.setIsAudit("0");
}else if (longs.contains(designId) && e.getRectificationSource().equals("bw-design")&& rectificationSource.contains(e.getRectificationSource())){
e.setIsAudit("0");
}else if (longs.contains(delerKfId)&& (e.getRectificationStatus().equals("待审核") || e.getRectificationStatus().equals("整改中"))){
}else if (longs.contains(delerKfId)&& (e.getRectificationStatus().equals("待整改") || e.getRectificationStatus().equals("整改中"))){
e.setIsAudit("0");
}else {
e.setIsAudit("1");
......
......@@ -362,8 +362,8 @@ public class WorkOrderController extends BaseController {
@PostMapping(value = "/addRectification")
public ResponseModel addRectification( @RequestBody HygfRectificationOrder hygfReplenishment) {
workOrderServiceImpl.addRectification(hygfReplenishment);
return ResponseHelper.buildResponse(null);
return ResponseHelper.buildResponse( workOrderServiceImpl.addRectification(hygfReplenishment));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -348,14 +348,30 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
if (hygfRectificationOrder.getAddorSubmit().equals("0") && Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
// if (hygfRectificationOrder.getAddorSubmit().equals("0") && !Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
// List<Object> rectificationIdea = hygfRectificationOrder.getRectificationIdea();
// for (Object item : rectificationIdea) {
// item.
// }
//
// return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
// }
if (hygfRectificationOrder.getAddorSubmit().equals("0") && !Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
List<Object> rectificationIdea = hygfRectificationOrder.getRectificationIdea();
for (Object item : rectificationIdea) {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(item));
Collection<Object> values = jsonObject.values();
if (values.size() < 2){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (jsonObject.containsKey("type")){
if (null == jsonObject.get("type")){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
if (jsonObject.containsKey("items")){
JSONArray item1 = jsonObject.getJSONArray("items");
for (Object o : item1) {
Collection<Object> values1 = JSON.parseObject(JSON.toJSONString(o)).values();
if (values1.size()<1){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
}
}
}
if (hygfRectificationOrder.getSequenceNbr() != null ){
LambdaQueryWrapper<HygfRectificationOrder> wr= new LambdaQueryWrapper<>();
wr.eq(HygfRectificationOrder::getPeasantHouseholeId,hygfRectificationOrder.getPeasantHouseholeId());
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -633,6 +636,32 @@ public class BasicGridAcceptanceServiceImpl
if (hygfRectificationOrder.getAddorSubmit().equals("0") && Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (hygfRectificationOrder.getAddorSubmit().equals("0") && !Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
List<Object> rectificationIdea = hygfRectificationOrder.getRectificationIdea();
for (Object item : rectificationIdea) {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(item));
Collection<Object> values = jsonObject.values();
if (values.size() < 2){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (jsonObject.containsKey("type")){
if (null == jsonObject.get("type")){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
if (jsonObject.containsKey("items")){
JSONArray item1 = jsonObject.getJSONArray("items");
for (Object o : item1) {
Collection<Object> values1 = JSON.parseObject(JSON.toJSONString(o)).values();
if (values1.size()<1){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
}
}
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (hygfRectificationOrder.getSequenceNbr() != null ){
LambdaQueryWrapper<HygfRectificationOrder> wr= new LambdaQueryWrapper<>();
wr.eq(HygfRectificationOrder::getPeasantHouseholeId,hygfRectificationOrder.getPeasantHouseholeId());
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -17,6 +19,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.*;
import com.yeejoin.amos.boot.module.hygf.api.service.IHygfWorkOrderStationAuditingService;
import com.yeejoin.amos.boot.module.hygf.api.service.IWorkOrderService;
import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils;
import com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil;
import com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil;
import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
......@@ -32,6 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
import java.util.stream.Collectors;
......@@ -1335,9 +1339,38 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
public void addRectification(HygfRectificationOrder hygfRectificationOrder) {
public ResponseModel addRectification(HygfRectificationOrder hygfRectificationOrder) {
rectificationOrderAuditingService.addRectification(hygfRectificationOrder);
String addorSubmit = hygfRectificationOrder.getAddorSubmit();
if (hygfRectificationOrder.getAddorSubmit().equals("0") && Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (hygfRectificationOrder.getAddorSubmit().equals("0") && !Objects.isNull(hygfRectificationOrder.getRectificationIdea())){
List<Object> rectificationIdea = hygfRectificationOrder.getRectificationIdea();
for (Object item : rectificationIdea) {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(item));
Collection<Object> values = jsonObject.values();
if (values.size() < 2){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
if (jsonObject.containsKey("type")){
if (null == jsonObject.get("type")){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
if (jsonObject.containsKey("items")){
JSONArray item1 = jsonObject.getJSONArray("items");
for (Object o : item1) {
Collection<Object> values1 = JSON.parseObject(JSON.toJSONString(o)).values();
if (values1.size()<1){
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
}
}
}
return CommonResponseNewUtil.failureMessage("整改类型及整改项不可为空");
}
//修改电站状态
if (addorSubmit.equals("0")){
LambdaUpdateWrapper<WorkOrderPowerStation> qu = new LambdaUpdateWrapper();
......@@ -1346,7 +1379,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
workOrderPowerStationMapper.update(null,qu);
}
return CommonResponseNewUtil.success();
}
......
......@@ -93,7 +93,7 @@ emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://47.92.234.253:1883
emqx.user-name=admin
emqx.password=public
emqx.password=Yeejoin@1234
emqx.max-inflight=1000
......
......@@ -249,6 +249,7 @@ spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.read-timeout=30000
## 聚富通工行 测试环境配置
## 聚富通工行 测试环境配置
hygf.icbc.callbackUrl=https://yth.yunqingtech.com/hygf/icbc/notify
hygf.icbc.appId=11000000000000009254
hygf.icbc.corpNo=10000000000000088011
......@@ -261,6 +262,7 @@ hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03
hygf.icbc.outVendorId=071301
hygf.icbc.projectId=PJ14001401B000160171
## 聚富通工行 生产环境配置
#hygf.icbc.appId=11000000000000028870
#hygf.icbc.corpNo=020240710000001169
......
spring.application.name=AMOS-HYGF-YY
spring.application.name=AMOS-HYGF-CZ
server.servlet.context-path=/hygf
server.port=33330
server.uri-encoding=UTF-8
......@@ -31,7 +31,7 @@ spring.liquibase.enabled=true
## eureka properties:
eureka.instance.prefer-ip-address=true
eureka.instance.ip-address=172.26.190.244
eureka.instance.ip-address=172.16.3.6
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.lease-expiration-duration-in-seconds=10
......@@ -83,7 +83,7 @@ admin.delerAdmin.roleId=1702512164058718210
admin.delerKaId.roleId=1702551022574006274
exception.debug=true
feign.okhttp.enabled= true
workflow.feign.name=AMOS-API-WORKFLOW
workflow.feign.name=AMOS-API-WORKFLOW-CZ
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