Commit 375ea4d5 authored by caotao's avatar caotao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 94a897c6 d22562cd
...@@ -11,8 +11,8 @@ import lombok.Getter; ...@@ -11,8 +11,8 @@ import lombok.Getter;
@AllArgsConstructor @AllArgsConstructor
public enum PowerStationProcessStateEnum { public enum PowerStationProcessStateEnum {
进行中("进行中", "0", "progress"), 进行中("进行中", "0", "progress"),
通过("通过", "1", "yes"), 通过("通过", "1", "0"),
不通过("不通过", "2", "no"), 不通过("不通过", "2", "1"),
完成("完成", "3", "complete"), 完成("完成", "3", "complete"),
作废("作废", "4", "reject"); 作废("作废", "4", "reject");
......
package com.yeejoin.amos.boot.module.hygf.api.entity; package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
...@@ -27,157 +28,157 @@ public class DesignInformation extends BaseEntity { ...@@ -27,157 +28,157 @@ public class DesignInformation extends BaseEntity {
/** /**
* 典型设计图信息 * 典型设计图信息
*/ */
@TableField(value = "typical_diagram",typeHandler = FastjsonTypeHandler.class) @TableField(value = "typical_diagram",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> typicalDiagram; private List<Object> typicalDiagram;
/** /**
* 组件排布图 * 组件排布图
*/ */
@TableField(value = "component_layout",typeHandler = FastjsonTypeHandler.class) @TableField(value = "component_layout",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> componentLayout; private List<Object> componentLayout;
/** /**
* 组件支架图 * 组件支架图
*/ */
@TableField(value = "component_bracket",typeHandler = FastjsonTypeHandler.class) @TableField(value = "component_bracket",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> componentBracket; private List<Object> componentBracket;
/** /**
* 组串接线图 * 组串接线图
*/ */
@TableField(value = "connection_line",typeHandler = FastjsonTypeHandler.class) @TableField(value = "connection_line",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> connectionLine; private List<Object> connectionLine;
/** /**
* 一次接线图 * 一次接线图
*/ */
@TableField(value = "once_line",typeHandler = FastjsonTypeHandler.class) @TableField(value = "once_line",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> onceLine; private List<Object> onceLine;
/** /**
* 组件 * 组件
*/ */
@TableField(value = "assembly",typeHandler = FastjsonTypeHandler.class) @TableField(value = "assembly",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> assembly; private List<Object> assembly;
/** /**
* 逆变器 * 逆变器
*/ */
@TableField(value = "inverter",typeHandler = FastjsonTypeHandler.class) @TableField(value = "inverter",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> inverter; private List<Object> inverter;
/** /**
* 电表箱 * 电表箱
*/ */
@TableField(value = "electricity_meter",typeHandler = FastjsonTypeHandler.class) @TableField(value = "electricity_meter",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> electricityMeter; private List<Object> electricityMeter;
/** /**
* 支架 * 支架
*/ */
@TableField(value = "support",typeHandler = FastjsonTypeHandler.class) @TableField(value = "support",typeHandler = FastjsonTypeHandler.class,updateStrategy = FieldStrategy.IGNORED)
private List<Object> support; private List<Object> support;
/** /**
* 防滑雪措施 * 防滑雪措施
*/ */
@TableField("anti_skiing") @TableField(value = "anti_skiing",updateStrategy = FieldStrategy.IGNORED)
private String antiSkiing; private String antiSkiing;
/** /**
* 防滑雪措施备注 * 防滑雪措施备注
*/ */
@TableField("anti_skiing_notes") @TableField(value = "anti_skiing_notes",updateStrategy = FieldStrategy.IGNORED)
private String antiSkiingNotes; private String antiSkiingNotes;
/** /**
* 抽检 * 抽检
*/ */
@TableField("spot_check") @TableField(value = "spot_check",updateStrategy = FieldStrategy.IGNORED)
private String spotCheck; private String spotCheck;
/** /**
* 抽检意见 * 抽检意见
*/ */
@TableField("spot_check_opinion") @TableField(value = "spot_check_opinion",updateStrategy = FieldStrategy.IGNORED)
private String spotCheckOpinion; private String spotCheckOpinion;
/** /**
* 是否定制 * 是否定制
*/ */
@TableField("isok_customized") @TableField(value = "isok_customized",updateStrategy = FieldStrategy.IGNORED)
private String isokCustomized; private String isokCustomized;
/** /**
* 是否加固 * 是否加固
*/ */
@TableField("wind_resistant") @TableField(value = "wind_resistant",updateStrategy = FieldStrategy.IGNORED)
private String windResistant; private String windResistant;
/** /**
* 试点方案 * 试点方案
*/ */
@TableField("pilot_program") @TableField(value = "pilot_program",updateStrategy = FieldStrategy.IGNORED)
private String pilotProgram; private String pilotProgram;
/** /**
* s试点物料 * s试点物料
*/ */
@TableField("pilot_materials") @TableField(value = "pilot_materials",updateStrategy = FieldStrategy.IGNORED)
private String pilotMaterials; private String pilotMaterials;
/** /**
* 方位角 * 方位角
*/ */
@TableField("azimuth") @TableField(value = "azimuth",updateStrategy = FieldStrategy.IGNORED)
private String azimuth; private String azimuth;
/** /**
* 倾角 * 倾角
*/ */
@TableField("dip_angle") @TableField(value = "dip_angle",updateStrategy = FieldStrategy.IGNORED)
private String dipAngle; private String dipAngle;
/** /**
* 应用场景 * 应用场景
*/ */
@TableField("application_scenario") @TableField(value = "application_scenario",updateStrategy = FieldStrategy.IGNORED)
private String applicationScenario; private String applicationScenario;
/** /**
* 应用场景数量 * 应用场景数量
*/ */
@TableField("application_scenario_num") @TableField(value = "application_scenario_num",updateStrategy = FieldStrategy.IGNORED)
private Integer applicationScenarioNum; private Integer applicationScenarioNum;
/** /**
* 支架方案 * 支架方案
*/ */
@TableField("support_scheme") @TableField(value = "support_scheme",updateStrategy = FieldStrategy.IGNORED)
private String supportScheme; private String supportScheme;
/** /**
* 支架方案数量 * 支架方案数量
*/ */
@TableField("support_scheme_num") @TableField(value = "support_scheme_num",updateStrategy = FieldStrategy.IGNORED)
private Integer supportSchemeNum; private Integer supportSchemeNum;
/** /**
* 特殊方案 * 特殊方案
*/ */
@TableField("special_plan") @TableField(value = "special_plan",updateStrategy = FieldStrategy.IGNORED)
private String specialPlan; private String specialPlan;
/** /**
* 特殊方案数量 * 特殊方案数量
*/ */
@TableField("special_plan_num") @TableField(value = "special_plan_num",updateStrategy = FieldStrategy.IGNORED)
private Integer specialPlanNum; private Integer specialPlanNum;
/** /**
* 农户id * 农户id
*/ */
@TableField("peasant_household_id") @TableField(value = "peasant_household_id",updateStrategy = FieldStrategy.IGNORED)
private String peasantHouseholdId; private String peasantHouseholdId;
} }
...@@ -2,8 +2,13 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl; ...@@ -2,8 +2,13 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum; import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum; import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto; import com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto;
...@@ -17,6 +22,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.PeasantHouseholdMapper; ...@@ -17,6 +22,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.PeasantHouseholdMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationMapper; import com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationService; import com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationService;
import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient; import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
import com.yeejoin.amos.boot.module.jxiop.api.service.IDesignInformationService;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.cglib.beans.BeanMap; import net.sf.cglib.beans.BeanMap;
...@@ -29,6 +35,7 @@ import org.springframework.stereotype.Service; ...@@ -29,6 +35,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import springfox.documentation.service.ApiListing; import springfox.documentation.service.ApiListing;
import java.util.Date;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -51,11 +58,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -51,11 +58,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
IPowerStationService powerStationService; IPowerStationService powerStationService;
@Autowired @Autowired
DesignInformationMapper designInformationMapper; DesignInformationMapper designInformationMapper;
@Autowired
DesignInformationServiceImpl designInformationService;
private static final String IDX_REQUEST_STATE="200"; private static final String IDX_REQUEST_STATE="200";
private static final String VERIFY_RESULT_YES="yes"; private static final String VERIFY_RESULT_YES="0";
private static final String VERIFY_RESULT_NO="no"; private static final String VERIFY_RESULT_NO="1";
@Autowired @Autowired
WorkflowFeignClient workflowFeignClient; WorkflowFeignClient workflowFeignClient;
...@@ -111,7 +119,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -111,7 +119,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
if (PowerStationNodeEnum.设计上传图纸.getCode().equals(nodeCode)||PowerStationNodeEnum.经销商上传图纸.getCode().equals(nodeCode)) { if (PowerStationNodeEnum.设计上传图纸.getCode().equals(nodeCode)||PowerStationNodeEnum.经销商上传图纸.getCode().equals(nodeCode)) {
this.updateSeve(powerStation.getPeasantHouseholdId(),kv); this.updateSeve(powerStation.getPeasantHouseholdId(),kv);
} else { } else {
String result = String.valueOf(kv.get("VERIFY_RESULT")); String result = String.valueOf(kv.get("approvalStatue"));
if (VERIFY_RESULT_NO.equals(result)) { if (VERIFY_RESULT_NO.equals(result)) {
powerStation.setProcessStatus(PowerStationProcessStateEnum.不通过.getName()); powerStation.setProcessStatus(PowerStationProcessStateEnum.不通过.getName());
} }
...@@ -226,10 +234,15 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){ ...@@ -226,10 +234,15 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){
designInformationnew.setTypicalDiagram(designInformation.getTypicalDiagram()); designInformationnew.setTypicalDiagram(designInformation.getTypicalDiagram());
designInformationnew.setPeasantHouseholdId(peasantHouseholdId); designInformationnew.setPeasantHouseholdId(peasantHouseholdId);
designInformationnew.setSequenceNbr(designInformation.getSequenceNbr()); designInformationnew.setSequenceNbr(designInformation.getSequenceNbr());
designInformationnew.setRecDate(designInformation.getRecDate());
designInformationnew.setRecUserId(designInformation.getRecUserId());
designInformationnew.setRecUserName(designInformation.getRecUserName());
designInformationnew.setIsDelete(designInformation.getIsDelete());
designInformationMapper.updateById(designInformationnew); designInformationMapper.updateById(designInformationnew);
}else{ }else{
DesignInformation designInformationnew=this.mapToBean(kv,DesignInformation.class); DesignInformation designInformationnew=new DesignInformation();
designInformationnew.setTypicalDiagram((List<Object>)kv.get("typicalDiagram")) ;
designInformationnew.setPeasantHouseholdId(peasantHouseholdId); designInformationnew.setPeasantHouseholdId(peasantHouseholdId);
designInformationMapper.insert(designInformationnew); designInformationMapper.insert(designInformationnew);
...@@ -239,11 +252,12 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){ ...@@ -239,11 +252,12 @@ public void updateSeve(String peasantHouseholdId, Map<String, Object> kv ){
public <T> T mapToBean(Map<String, Object> map, Class<T> clazz) { public <T> T mapToBean(Map<String, Object> map, Class<T> clazz) {
ObjectMapper objectMapper= new ObjectMapper();
T bean =null; T bean =null;
try { try {
bean = clazz.newInstance(); bean = clazz.newInstance();
BeanMap beanMap = BeanMap.create(bean); bean = objectMapper.convertValue(map,clazz);
beanMap.putAll(map);
}catch (Exception e){ }catch (Exception e){
throw new BaseException(" 数据转化异常!","400","数据转化异常!"); throw new BaseException(" 数据转化异常!","400","数据转化异常!");
......
...@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiOperation;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -411,7 +412,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -411,7 +412,7 @@ public class MonitorFanIdxController extends BaseController {
return ResponseHelper.buildResponse(resultsData); return ResponseHelper.buildResponse(resultsData);
} }
// @Scheduled(cron = "0/10 * * * * ? ") @Scheduled(cron = "0/15 * * * * ? ")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "模拟量列表消息") @ApiOperation(value = "模拟量列表消息")
@GetMapping("/getAnalogQuantityInfo") @GetMapping("/getAnalogQuantityInfo")
...@@ -425,7 +426,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -425,7 +426,7 @@ public class MonitorFanIdxController extends BaseController {
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
// @Scheduled(cron = "0/10 * * * * ? ") @Scheduled(cron = "0/15 * * * * ? ")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "升压站主屏消息接口") @ApiOperation(value = "升压站主屏消息接口")
@GetMapping("/getMajorAnalogQuantityByPage") @GetMapping("/getMajorAnalogQuantityByPage")
......
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