|
@@ -40,6 +40,7 @@ import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
|
import com.aliyun.tea.utils.StringUtils;
|
|
import com.aliyun.tea.utils.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -66,6 +67,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
|
|
+
|
|
|
|
|
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
@@ -100,186 +103,197 @@ public class IotOpeationFillController {
|
|
|
return success(iotOpeationFillService.createIotOpeationFill(createReqVO));
|
|
return success(iotOpeationFillService.createIotOpeationFill(createReqVO));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@PostMapping("/insertLog")
|
|
@PostMapping("/insertLog")
|
|
|
@Operation(summary = "创建运行记录填写信息")
|
|
@Operation(summary = "创建运行记录填写信息")
|
|
|
public CommonResult<Integer> insertLog(@Valid @RequestBody List<IotOpeationFillSaveReqVO>createReqVO) {
|
|
public CommonResult<Integer> insertLog(@Valid @RequestBody List<IotOpeationFillSaveReqVO>createReqVO) {
|
|
|
- List<IotOpeationFillSaveReqVO> fillList = createReqVO;
|
|
|
|
|
|
|
|
|
|
- for (IotOpeationFillSaveReqVO fill:fillList) {
|
|
|
|
|
|
|
+ try{
|
|
|
|
|
+
|
|
|
|
|
+ List<IotOpeationFillSaveReqVO> fillList = createReqVO;
|
|
|
|
|
+
|
|
|
|
|
+ for (IotOpeationFillSaveReqVO fill:fillList) {
|
|
|
|
|
|
|
|
- //累计并且设置了累计值,数据累加
|
|
|
|
|
- //累计并且设置了累计值,数据不累加
|
|
|
|
|
- if(fill.getIsSum()==1&&fill.getDefaultValue()!=""&&fill.getSumId()==1){
|
|
|
|
|
- for (IotOpeationFillSaveReqVO fill1:fillList) {
|
|
|
|
|
- if(Long.parseLong(fill.getDefaultValue())==fill1.getModelId()){
|
|
|
|
|
- fill.setTotalRunTime(fill.getTotalRunTime().add(new BigDecimal(fill1.getFillContent())));
|
|
|
|
|
|
|
+ //累计并且设置了累计值,数据累加
|
|
|
|
|
+ //累计并且设置了累计值,数据不累加
|
|
|
|
|
+ if(fill.getIsSum()==1&&fill.getDefaultValue()!=""&&fill.getSumId()==1){
|
|
|
|
|
+ for (IotOpeationFillSaveReqVO fill1:fillList) {
|
|
|
|
|
+ if(Long.parseLong(fill.getDefaultValue())==fill1.getModelId()){
|
|
|
|
|
+ fill.setTotalRunTime(fill.getTotalRunTime().add(new BigDecimal(fill1.getFillContent())));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }else if(fill.getIsSum()==1&&fill.getDefaultValue()!=""&&fill.getSumId()==0){
|
|
|
|
|
- for (IotOpeationFillSaveReqVO fill1:fillList) {
|
|
|
|
|
- if(Long.parseLong(fill.getDefaultValue())==fill1.getModelId()){
|
|
|
|
|
- fill.setTotalRunTime(new BigDecimal(fill1.getFillContent()));
|
|
|
|
|
|
|
+ }else if(fill.getIsSum()==1&&fill.getDefaultValue()!=""&&fill.getSumId()==0){
|
|
|
|
|
+ for (IotOpeationFillSaveReqVO fill1:fillList) {
|
|
|
|
|
+ if(Long.parseLong(fill.getDefaultValue())==fill1.getModelId()){
|
|
|
|
|
+ fill.setTotalRunTime(new BigDecimal(fill1.getFillContent()));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- List< IotDeviceRunLogDO > logDO = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
- for (IotOpeationFillSaveReqVO fill:fillList) {
|
|
|
|
|
|
|
+ List< IotDeviceRunLogDO > logDO = new ArrayList<>();
|
|
|
|
|
|
|
|
- LocalTime localTime = LocalTime.of(0,0);
|
|
|
|
|
|
|
+ for (IotOpeationFillSaveReqVO fill:fillList) {
|
|
|
|
|
|
|
|
- IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
|
|
|
|
|
|
|
+ LocalTime localTime = LocalTime.of(0,0);
|
|
|
|
|
|
|
|
- deviceRunLogDO.setDeviceId(fill.getDeviceId());
|
|
|
|
|
- deviceRunLogDO.setDeviceCode(fill.getDeviceCode());
|
|
|
|
|
- deviceRunLogDO.setFillContent(fill.getFillContent());
|
|
|
|
|
- deviceRunLogDO.setPointCode(fill.getModelAttr());
|
|
|
|
|
- deviceRunLogDO.setDeptId(fill.getDeptId());
|
|
|
|
|
- deviceRunLogDO.setCreateTime(LocalDateTime.of(fill.getCreateTime(),localTime));
|
|
|
|
|
- deviceRunLogDO.setPointName(fill.getPointName());
|
|
|
|
|
- deviceRunLogDO.setTotalRunTime(fill.getTotalRunTime());
|
|
|
|
|
- if(fill.getIsSum()==0){
|
|
|
|
|
- deviceRunLogDO.setIsSum(0);
|
|
|
|
|
- }else{
|
|
|
|
|
- deviceRunLogDO.setIsSum(1);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
|
|
|
|
|
|
|
|
- logDO.add(deviceRunLogDO);
|
|
|
|
|
- }
|
|
|
|
|
- iotOpeationFillService.updateFill(createReqVO.get(0));
|
|
|
|
|
|
|
+ deviceRunLogDO.setDeviceId(fill.getDeviceId());
|
|
|
|
|
+ deviceRunLogDO.setDeviceCode(fill.getDeviceCode());
|
|
|
|
|
+ deviceRunLogDO.setFillContent(fill.getFillContent());
|
|
|
|
|
+ deviceRunLogDO.setPointCode(fill.getModelAttr());
|
|
|
|
|
+ deviceRunLogDO.setDeptId(fill.getDeptId());
|
|
|
|
|
+ deviceRunLogDO.setCreateTime(LocalDateTime.of(fill.getCreateTime(),localTime));
|
|
|
|
|
+ deviceRunLogDO.setPointName(fill.getPointName());
|
|
|
|
|
+ deviceRunLogDO.setTotalRunTime(fill.getTotalRunTime());
|
|
|
|
|
+ if(fill.getIsSum()==0){
|
|
|
|
|
+ deviceRunLogDO.setIsSum(0);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ deviceRunLogDO.setIsSum(1);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 判断设备状态是否都为填写
|
|
|
|
|
- * 1、是 更新填写工单为已填写
|
|
|
|
|
- * 2、否 更新填写工单为待填写
|
|
|
|
|
- * 3、部分填写 更新填写工单为填写中
|
|
|
|
|
- */
|
|
|
|
|
- IotOpeationFillRespVO respVO = new IotOpeationFillRespVO();
|
|
|
|
|
- respVO.setUserId(createReqVO.get(0).getUserId());
|
|
|
|
|
- respVO.setCreateTime(createReqVO.get(0).getCreateTime());
|
|
|
|
|
- respVO.setOrderId(createReqVO.get(0).getId());
|
|
|
|
|
- List<IotOpeationFillRespVO> fillList1 = iotOpeationFillService.getFillList(respVO);
|
|
|
|
|
|
|
+ logDO.add(deviceRunLogDO);
|
|
|
|
|
+ }
|
|
|
|
|
+ iotOpeationFillService.updateFill(createReqVO.get(0));
|
|
|
|
|
|
|
|
- boolean result = fillList1.stream().allMatch(e->e.getIsFill()==1);
|
|
|
|
|
- boolean result1 = fillList1.stream().allMatch(e->e.getIsFill()==0);
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 判断设备状态是否都为填写
|
|
|
|
|
+ * 1、是 更新填写工单为已填写
|
|
|
|
|
+ * 2、否 更新填写工单为待填写
|
|
|
|
|
+ * 3、部分填写 更新填写工单为填写中
|
|
|
|
|
+ */
|
|
|
|
|
+ IotOpeationFillRespVO respVO = new IotOpeationFillRespVO();
|
|
|
|
|
+ respVO.setUserId(createReqVO.get(0).getUserId());
|
|
|
|
|
+ respVO.setCreateTime(createReqVO.get(0).getCreateTime());
|
|
|
|
|
+ respVO.setOrderId(createReqVO.get(0).getId());
|
|
|
|
|
+ List<IotOpeationFillRespVO> fillList1 = iotOpeationFillService.getFillList(respVO);
|
|
|
|
|
|
|
|
- IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
|
|
|
|
|
- deviceRunLogDO.setId(createReqVO.get(0).getId());
|
|
|
|
|
|
|
+ boolean result = fillList1.stream().allMatch(e->e.getIsFill()==1);
|
|
|
|
|
+ boolean result1 = fillList1.stream().allMatch(e->e.getIsFill()==0);
|
|
|
|
|
|
|
|
- IotOpeationFillDO fillDO = new IotOpeationFillDO();
|
|
|
|
|
- fillDO.setOrderId(createReqVO.get(0).getId());
|
|
|
|
|
-
|
|
|
|
|
- if(result){
|
|
|
|
|
- iotOpeationFillService.updateFillOrder(deviceRunLogDO);
|
|
|
|
|
-
|
|
|
|
|
- List<IotOpeationFillDO> devList = iotOpeationFillService.devList(fillDO);
|
|
|
|
|
- if(devList.size()==1){
|
|
|
|
|
- fillDO.setDeviceId(devList.get(0).getDeviceId());
|
|
|
|
|
- fillDO.setCreDate(createReqVO.get(0).getCreateTime());
|
|
|
|
|
- List<IotOpeationFillDO> orderList = iotOpeationFillService.orderList(fillDO);
|
|
|
|
|
- if(orderList.size()>0){
|
|
|
|
|
- for (IotOpeationFillDO order:orderList) {
|
|
|
|
|
- List<IotOpeationFillDO> delList = iotOpeationFillService.delList(order);
|
|
|
|
|
- if(delList.size()==1){
|
|
|
|
|
- iotOpeationFillService.delRepeat(delList.get(0));
|
|
|
|
|
- iotOpeationFillService.delRepeatOrder(order);
|
|
|
|
|
|
|
+ IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
|
|
|
|
|
+ deviceRunLogDO.setId(createReqVO.get(0).getId());
|
|
|
|
|
+
|
|
|
|
|
+ IotOpeationFillDO fillDO = new IotOpeationFillDO();
|
|
|
|
|
+ fillDO.setOrderId(createReqVO.get(0).getId());
|
|
|
|
|
+
|
|
|
|
|
+ if(result){
|
|
|
|
|
+ iotOpeationFillService.updateFillOrder(deviceRunLogDO);
|
|
|
|
|
+
|
|
|
|
|
+ List<IotOpeationFillDO> devList = iotOpeationFillService.devList(fillDO);
|
|
|
|
|
+ if(devList.size()==1){
|
|
|
|
|
+ fillDO.setDeviceId(devList.get(0).getDeviceId());
|
|
|
|
|
+ fillDO.setCreDate(createReqVO.get(0).getCreateTime());
|
|
|
|
|
+ List<IotOpeationFillDO> orderList = iotOpeationFillService.orderList(fillDO);
|
|
|
|
|
+ if(orderList.size()>0){
|
|
|
|
|
+ for (IotOpeationFillDO order:orderList) {
|
|
|
|
|
+ List<IotOpeationFillDO> delList = iotOpeationFillService.delList(order);
|
|
|
|
|
+ if(delList.size()==1){
|
|
|
|
|
+ iotOpeationFillService.delRepeat(delList.get(0));
|
|
|
|
|
+ iotOpeationFillService.delRepeatOrder(order);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }else if(result1){
|
|
|
|
|
- iotOpeationFillService.updateFillOrder1(deviceRunLogDO);
|
|
|
|
|
- }else{
|
|
|
|
|
- iotOpeationFillService.updateFillOrder2(deviceRunLogDO);
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- for (IotDeviceRunLogDO log:logDO) {
|
|
|
|
|
- //根据设备编码,属性名称和时间查询run_log表
|
|
|
|
|
- //有数据则更新,无数据则插入
|
|
|
|
|
- IotDeviceRunLogDO fillData = iotOpeationFillService.reportData(log);
|
|
|
|
|
- if(fillData == null){
|
|
|
|
|
- iotOpeationFillService.insertLog1(log);
|
|
|
|
|
|
|
+ }else if(result1){
|
|
|
|
|
+ iotOpeationFillService.updateFillOrder1(deviceRunLogDO);
|
|
|
}else{
|
|
}else{
|
|
|
- if(log.getIsSum() == 0){
|
|
|
|
|
- iotOpeationFillService.updateLog(log);
|
|
|
|
|
|
|
+ iotOpeationFillService.updateFillOrder2(deviceRunLogDO);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for (IotDeviceRunLogDO log:logDO) {
|
|
|
|
|
+ //根据设备编码,属性名称和时间查询run_log表
|
|
|
|
|
+ //有数据则更新,无数据则插入
|
|
|
|
|
+ IotDeviceRunLogDO fillData = iotOpeationFillService.reportData(log);
|
|
|
|
|
+ if(fillData == null){
|
|
|
|
|
+ iotOpeationFillService.insertLog1(log);
|
|
|
}else{
|
|
}else{
|
|
|
- iotOpeationFillService.updateSumLog(log);
|
|
|
|
|
|
|
+ if(log.getIsSum() == 0){
|
|
|
|
|
+ iotOpeationFillService.updateLog(log);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ iotOpeationFillService.updateSumLog(log);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- Set<Long> rhIdList = deptService.getChildDeptIdListFromCache(157L);
|
|
|
|
|
- rhIdList.add(157L);
|
|
|
|
|
|
|
+ Set<Long> rhIdList = deptService.getChildDeptIdListFromCache(157L);
|
|
|
|
|
+ rhIdList.add(157L);
|
|
|
|
|
|
|
|
|
|
|
|
|
- Set<Long> ryIdList = deptService.getChildDeptIdListFromCache(158L);
|
|
|
|
|
- ryIdList.add(158L);
|
|
|
|
|
|
|
+ Set<Long> ryIdList = deptService.getChildDeptIdListFromCache(158L);
|
|
|
|
|
+ ryIdList.add(158L);
|
|
|
|
|
|
|
|
|
|
|
|
|
- IotDeviceRunLogDO runDo = logDO.get(0);
|
|
|
|
|
- IotOpeationFillDO reportDO = new IotOpeationFillDO();
|
|
|
|
|
- reportDO.setDeviceId(runDo.getDeviceId());
|
|
|
|
|
- reportDO.setCreateTime(runDo.getCreateTime());
|
|
|
|
|
- IotOpeationFillDO fillDO1 = iotOpeationFillService.isReport(reportDO);
|
|
|
|
|
|
|
+ IotDeviceRunLogDO runDo = logDO.get(0);
|
|
|
|
|
+ IotOpeationFillDO reportDO = new IotOpeationFillDO();
|
|
|
|
|
+ reportDO.setDeviceId(runDo.getDeviceId());
|
|
|
|
|
+ reportDO.setCreateTime(runDo.getCreateTime());
|
|
|
|
|
+ IotOpeationFillDO fillDO1 = iotOpeationFillService.isReport(reportDO);
|
|
|
|
|
|
|
|
- //虚拟设备插入日报
|
|
|
|
|
- if(fillDO1.getIsReport()!=null && fillDO1.getIsReport()==1){
|
|
|
|
|
|
|
+ //虚拟设备插入日报
|
|
|
|
|
+ if(fillDO1.getIsReport()!=null && fillDO1.getIsReport()==1){
|
|
|
|
|
|
|
|
- IotRhDailyReportSaveReqVO saveReqVO = new IotRhDailyReportSaveReqVO();
|
|
|
|
|
- IotRyDailyReportSaveReqVO saveReqRyVO = new IotRyDailyReportSaveReqVO();
|
|
|
|
|
|
|
+ IotRhDailyReportSaveReqVO saveReqVO = new IotRhDailyReportSaveReqVO();
|
|
|
|
|
+ IotRyDailyReportSaveReqVO saveReqRyVO = new IotRyDailyReportSaveReqVO();
|
|
|
|
|
|
|
|
- Map<String,Object> stringRhObjectMap = BeanUtil.beanToMap(saveReqVO);
|
|
|
|
|
- Map<String,Object> stringRyObjectMap = BeanUtil.beanToMap(saveReqRyVO);
|
|
|
|
|
|
|
+ Map<String,Object> stringRhObjectMap = BeanUtil.beanToMap(saveReqVO);
|
|
|
|
|
+ Map<String,Object> stringRyObjectMap = BeanUtil.beanToMap(saveReqRyVO);
|
|
|
|
|
|
|
|
- if(rhIdList.contains(fillDO1.getDeptId())){
|
|
|
|
|
- for (IotDeviceRunLogDO logDO1:logDO) {
|
|
|
|
|
|
|
+ if(rhIdList.contains(fillDO1.getDeptId())){
|
|
|
|
|
+ for (IotDeviceRunLogDO logDO1:logDO) {
|
|
|
|
|
|
|
|
- IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(logDO1);
|
|
|
|
|
|
|
+ IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(logDO1);
|
|
|
|
|
|
|
|
- if(descDO!=null){
|
|
|
|
|
- stringRhObjectMap.forEach((k,v)->{
|
|
|
|
|
- if(k.equals(descDO.getPointName())){
|
|
|
|
|
- stringRhObjectMap.put(k,logDO1.getFillContent());
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if(descDO!=null){
|
|
|
|
|
+ stringRhObjectMap.forEach((k,v)->{
|
|
|
|
|
+ if(k.equals(descDO.getPointName())){
|
|
|
|
|
+ stringRhObjectMap.put(k,logDO1.getFillContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- IotRhDailyReportSaveReqVO saveReqVO1 = BeanUtil.mapToBean(stringRhObjectMap,IotRhDailyReportSaveReqVO.class,false);
|
|
|
|
|
- saveReqVO1.setDeptId(fillDO1.getDeptId());
|
|
|
|
|
- saveReqVO1.setFillOrderCreateTime(fillList.get(0).getCreateTime().atStartOfDay());
|
|
|
|
|
- iotRhDailyReportService.createIotRhDailyReport(saveReqVO1);
|
|
|
|
|
- }else if(ryIdList.contains(fillDO1.getDeptId())){
|
|
|
|
|
- for (IotDeviceRunLogDO logDO1:logDO) {
|
|
|
|
|
|
|
+ IotRhDailyReportSaveReqVO saveReqVO1 = BeanUtil.mapToBean(stringRhObjectMap,IotRhDailyReportSaveReqVO.class,false);
|
|
|
|
|
+ saveReqVO1.setDeptId(fillDO1.getDeptId());
|
|
|
|
|
+ saveReqVO1.setFillOrderCreateTime(fillList.get(0).getCreateTime().atStartOfDay());
|
|
|
|
|
+ iotRhDailyReportService.createIotRhDailyReport(saveReqVO1);
|
|
|
|
|
+ }else if(ryIdList.contains(fillDO1.getDeptId())){
|
|
|
|
|
+ for (IotDeviceRunLogDO logDO1:logDO) {
|
|
|
|
|
|
|
|
- IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(logDO1);
|
|
|
|
|
|
|
+ IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(logDO1);
|
|
|
|
|
|
|
|
- if(descDO!=null){
|
|
|
|
|
- stringRyObjectMap.forEach((k,v)->{
|
|
|
|
|
- if(k.equals(descDO.getPointName())){
|
|
|
|
|
- stringRyObjectMap.put(k,logDO1.getFillContent());
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if(descDO!=null){
|
|
|
|
|
+ stringRyObjectMap.forEach((k,v)->{
|
|
|
|
|
+ if(k.equals(descDO.getPointName())){
|
|
|
|
|
+ stringRyObjectMap.put(k,logDO1.getFillContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- IotRyDailyReportSaveReqVO saveReqVO1 = BeanUtil.mapToBean(stringRyObjectMap, IotRyDailyReportSaveReqVO.class,false);
|
|
|
|
|
- saveReqVO1.setDeptId(fillDO1.getDeptId());
|
|
|
|
|
- saveReqVO1.setFillOrderCreateTime(fillList.get(0).getCreateTime().atStartOfDay());
|
|
|
|
|
- if(fillDO1.getDeviceCategoryId()==228){
|
|
|
|
|
- saveReqVO1.setProjectClassification("2");
|
|
|
|
|
|
|
+ IotRyDailyReportSaveReqVO saveReqVO1 = BeanUtil.mapToBean(stringRyObjectMap, IotRyDailyReportSaveReqVO.class,false);
|
|
|
|
|
+ saveReqVO1.setDeptId(fillDO1.getDeptId());
|
|
|
|
|
+ saveReqVO1.setFillOrderCreateTime(fillList.get(0).getCreateTime().atStartOfDay());
|
|
|
|
|
+ if(fillDO1.getDeviceCategoryId()==228){
|
|
|
|
|
+ saveReqVO1.setProjectClassification("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ iotRyDailyReportService.createIotRyDailyReport(saveReqVO1);
|
|
|
}
|
|
}
|
|
|
- iotRyDailyReportService.createIotRyDailyReport(saveReqVO1);
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ return success(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ return error(1,"插入device_run_log失败");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return success(1);
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PutMapping("/update")
|
|
@PutMapping("/update")
|