Browse Source

硬度数据、变电所数据模块

master
daikun1@bosssoft.com.cn 1 year ago
parent
commit
cb7d80bc1d
  1. 1
      pom.xml
  2. 23
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/AsyncLabController.java
  3. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/ImpController.java
  4. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/PScaleController.java
  5. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandController.java
  6. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandQxController.java
  7. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandnewController.java
  8. 33
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThreeHundredContrller.java
  9. 22
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SpectController.java
  10. 33
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/TTestController.java
  11. 2
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/job/LabStretchThreeJob.java
  12. 93
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/ImpactScheduleServie.java
  13. 66
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/PlatScaleScheduleService.java
  14. 10
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/SpectrumScheduleService.java
  15. 2
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThousandScheduleService.java
  16. 51
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThousandnewScheduleService.java
  17. 57
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThreeScheduleService.java
  18. 6
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/asynclab/AsyncLabService.java
  19. 59
      win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/asynclab/AsyncLabServiceImpl.java
  20. 12
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/asyncoprlog/AsyncOprLogApi.java
  21. 27
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/asyncoprlog/dto/AsyncOprLogDTO.java
  22. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/impact/ImpactApi.java
  23. 6
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/platscale/PlatScaleApi.java
  24. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/spectrum/SpectrumApi.java
  25. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthousandnew/StretchThousandnewApi.java
  26. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthousandqx/StretchThousandQxApi.java
  27. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthreeHundred/StretchThreeHundredApi.java
  28. 2
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthreeHundredqx/StretchThreeHundredQxApi.java
  29. 37
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/BusTypeEnum.java
  30. 14
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/ErrorCodeEnum.java
  31. 33
      win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/OprTypeEnum.java
  32. 36
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/asyncoprlog/AsyncOprLogApiImpl.java
  33. 8
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/impact/ImpactApiImpl.java
  34. 22
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/platscale/PlatScaleApiImpl.java
  35. 6
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/spectrum/SpectrumApiImpl.java
  36. 6
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthousandnew/StretchThousandnewApiImpl.java
  37. 6
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthousandqx/StretchThousandQxApiImpl.java
  38. 13
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthreeHundred/StretchThreeHundredApiImpl.java
  39. 6
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthreeHundredqx/StretchThreeHundredQxApiImpl.java
  40. 123
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/AsyncOprLogController.java
  41. 34
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogBaseVO.java
  42. 12
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogCreateReqVO.java
  43. 39
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogExcelVO.java
  44. 37
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogExportReqVO.java
  45. 39
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogPageReqVO.java
  46. 19
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogRespVO.java
  47. 17
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogUpdateReqVO.java
  48. 125
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/HardnessThreeController.java
  49. 48
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeBaseVO.java
  50. 12
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeCreateReqVO.java
  51. 58
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeExcelVO.java
  52. 54
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeExportReqVO.java
  53. 57
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreePageReqVO.java
  54. 19
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeRespVO.java
  55. 17
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeUpdateReqVO.java
  56. 125
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/HardnessTwoController.java
  57. 52
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoBaseVO.java
  58. 12
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoCreateReqVO.java
  59. 60
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoExcelVO.java
  60. 57
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoExportReqVO.java
  61. 60
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoPageReqVO.java
  62. 19
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoRespVO.java
  63. 17
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoUpdateReqVO.java
  64. 37
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/asyncoprlog/AsyncOprLogConvert.java
  65. 34
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/hardnessthree/HardnessThreeConvert.java
  66. 34
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/hardnesstwo/HardnessTwoConvert.java
  67. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/platscale/PlatscaleConvert.java
  68. 49
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/asyncoprlog/AsyncOprLogDO.java
  69. 74
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/hardnessthree/HardnessThreeDO.java
  70. 78
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/hardnesstwo/HardnessTwoDO.java
  71. 42
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/asyncoprlog/AsyncOprLogMapper.java
  72. 56
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/hardnessthree/HardnessThreeMapper.java
  73. 58
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/hardnesstwo/HardnessTwoMapper.java
  74. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/impact/ImpactMapper.java
  75. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/platscale/PlatscaleMapper.java
  76. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/spectrum/SpectrumMapper.java
  77. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthousandnew/StretchThousandnewMapper.java
  78. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthousandqx/StretchThousandQxMapper.java
  79. 2
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthreehundred/StretchThreeHundredMapper.java
  80. 1
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthreehundredqx/StretchThreeHundredQxMapper.java
  81. 79
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/asyncoprlog/AsyncOprLogService.java
  82. 107
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/asyncoprlog/AsyncOprLogServiceImpl.java
  83. 79
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnessthree/HardnessThreeService.java
  84. 106
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnessthree/HardnessThreeServiceImpl.java
  85. 79
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnesstwo/HardnessTwoService.java
  86. 107
      win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnesstwo/HardnessTwoServiceImpl.java
  87. 12
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/asyncoprlog/AsyncOprLogMapper.xml
  88. 12
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/hardnessthree/HardnessThreeMapper.xml
  89. 12
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/hardnesstwo/HardnessTwoMapper.xml
  90. 4
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/impact/ImpactMapper.xml
  91. 9
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/platscale/PlatscaleMapper.xml
  92. 4
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/spectrum/SpectrumMapper.xml
  93. 4
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthousandnew/StretchThousandnewMapper.xml
  94. 9
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthousandqx/StretchThousandQxMapper.xml
  95. 4
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthreehundred/StretchThreeHundredMapper.xml
  96. 4
      win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthreehundred/StretchThreeHundredQxMapper.xml
  97. 18
      win-module-pszc/pom.xml
  98. 29
      win-module-pszc/win-module-pszc-api/pom.xml
  99. 41
      win-module-pszc/win-module-pszc-api/src/main/java/com/win/module/pszc/enums/PszcErrorCode.java
  100. 96
      win-module-pszc/win-module-pszc-biz/pom.xml

1
pom.xml

@ -20,6 +20,7 @@
<module>win-module-basedata</module> <module>win-module-basedata</module>
<module>win-module-dataacqu</module> <module>win-module-dataacqu</module>
<module>win-module-lab</module> <module>win-module-lab</module>
<module>win-module-pszc</module>
</modules> </modules>
<name>${project.artifactId}</name> <name>${project.artifactId}</name>

23
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/AsyncLabController.java

@ -0,0 +1,23 @@
package com.win.module.dataacqu.controller;
import com.win.framework.common.pojo.CommonResult;
import com.win.module.dataacqu.service.asynclab.AsyncLabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/asynclab/")
public class AsyncLabController {
@Autowired
private AsyncLabService asyncLabService;
// @GetMapping("/asyncLab")
// public CommonResult<Boolean> asyncLab(String busDate , String busType) {
//
// }
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/ImpController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.ImpactScheduleServie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/impact")
public class ImpController {
@Autowired
private ImpactScheduleServie impactScheduleServie;
@GetMapping("/syncImpactInfos")
public String syncImpactInfos() {
impactScheduleServie.syncImpactInfos();
return "SUCCESS";
}
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/PScaleController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.PlatScaleScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/pscale")
public class PScaleController {
@Autowired
private PlatScaleScheduleService slatScaleScheduleService;
@GetMapping("/syncPlatScaleDatas")
public String syncPlatScaleDatas() throws Exception{
slatScaleScheduleService.syncPlatScaleDatas();
return "SUCCESS";
}
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.StretchThousandScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/stretchthousand")
public class SThousandController {
@Autowired
private StretchThousandScheduleService stretchThousandScheduleService;
@GetMapping("/syncThousandData")
public String syncThousandData() throws Exception{
stretchThousandScheduleService.syncThousandData();
return "SUCCESS";
}
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandQxController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.StretchThousandQxScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/sthousandqx")
public class SThousandQxController {
@Autowired
private StretchThousandQxScheduleService stretchThousandQxScheduleService;
@GetMapping("/syncQxInfos")
public String syncQxInfos() {
stretchThousandQxScheduleService.syncQxInfos();
return "SUCCESS";
}
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThousandnewController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.StretchThousandnewScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/sthousandnew")
public class SThousandnewController {
@Autowired
private StretchThousandnewScheduleService sScheduleService;
@GetMapping("/syncThousandData")
public String syncThousandData() throws Exception{
sScheduleService.syncThousandData();
return "success";
}
}

33
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SThreeHundredContrller.java

@ -1,33 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.StretchThreeQxScheduleService;
import com.win.module.dataacqu.service.StretchThreeScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/stretch")
public class SThreeHundredContrller {
@Autowired
private StretchThreeScheduleService stretchThreeScheduleService;
@Autowired
private StretchThreeQxScheduleService stretchThreeQxScheduleService;
@GetMapping(value = "/syncThreeHundredData")
public String syncThreeHundredData() throws Exception{
stretchThreeScheduleService.syncThreeHundredData();
return "SUCCESS";
}
@GetMapping(value = "/syncQxInfos")
public String syncQxInfos() throws Exception{
stretchThreeQxScheduleService.syncQxInfos();
return "SUCCESS";
}
}

22
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/SpectController.java

@ -1,22 +0,0 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.SpectrumScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/spect")
public class SpectController {
@Autowired
private SpectrumScheduleService spectrumScheduleService;
@GetMapping("/syncSpectrumInfos")
public String syncSpectrumInfos() {
spectrumScheduleService.syncSpectrumInfos();
return "SUCCESS";
}
}

33
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/controller/TTestController.java

@ -0,0 +1,33 @@
package com.win.module.dataacqu.controller;
import com.win.module.dataacqu.service.PlatScaleScheduleService;
import com.win.module.dataacqu.service.StretchThousandnewScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/ttest")
public class TTestController {
@Autowired
private PlatScaleScheduleService platScaleScheduleService;
@Autowired
private StretchThousandnewScheduleService stretchThousandnewScheduleService;
@GetMapping("/test1")
public String test1(String date) {
platScaleScheduleService.syncPlatScaleDatas(date);
return "SUCCESS";
}
@GetMapping("/test2")
public String test2(String date) throws Exception{
stretchThousandnewScheduleService.syncThousandData(date);
return "SUCCESS";
}
}

2
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/job/LabStretchThreeJob.java

@ -18,7 +18,7 @@ public class LabStretchThreeJob implements JobHandler {
@Override @Override
public String execute(String param) throws Exception { public String execute(String param) throws Exception {
stretchThreeScheduleService.syncThreeHundredData(); // stretchThreeScheduleService.syncThreeHundredData();
return null; return null;
} }
} }

93
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/ImpactScheduleServie.java

@ -1,8 +1,11 @@
package com.win.module.dataacqu.service; package com.win.module.dataacqu.service;
import com.win.framework.common.util.date.DateUtils; import com.win.framework.common.util.date.DateUtils;
import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi;
import com.win.module.lab.api.impact.ImpactApi; import com.win.module.lab.api.impact.ImpactApi;
import com.win.module.lab.api.impact.dto.ImpactDTO; import com.win.module.lab.api.impact.dto.ImpactDTO;
import com.win.module.lab.enums.BusTypeEnum;
import com.win.module.lab.enums.OprTypeEnum;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.Element; import org.dom4j.Element;
@ -10,8 +13,10 @@ import org.dom4j.io.SAXReader;
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.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.io.File; import java.io.File;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -23,27 +28,91 @@ public class ImpactScheduleServie {
@Value("${win.impact.url}") @Value("${win.impact.url}")
private String impactUrl; private String impactUrl;
@Value("${win.impact.isSyncAll}")
private boolean isSyncAll;
@Autowired @Autowired
private ImpactApi impactApi; private ImpactApi impactApi;
@Autowired
private AsyncOprLogApi asyncOprLogApi;
// busDate 2023-11-24
public void syncImpactInfos(String busDate) {
List<ImpactDTO> impList = new ArrayList<>();
String date = "";
String delDate = "";
String oprType = "";
String oprResult= "成功";
String oprMsg = "";
try {
if (StringUtils.isEmpty(busDate)) {
date = DateUtils.getDateStr(new Date() , "yyyyMMdd");
delDate = DateUtils.getDateStr(new Date() , "yyyy-MM-dd");
oprType = OprTypeEnum.OprType_1.getCode();
} else {
date = busDate.replaceAll("-" , "");
delDate = busDate;
oprType = OprTypeEnum.OprType_2.getCode();
}
toParseDatas(date , impList);
public void syncImpactInfos() { if (impList != null && impList.size() > 0) {
String path = impactUrl + "/" + DateUtils.getDateStr(new Date() , "yyyyMMdd"); toSaveDats(impList , delDate);
}
isSyncAll = false;
} catch (Exception e) {
e.printStackTrace();
oprResult = "失败";
oprMsg = e.getMessage();
} finally {
asyncOprLogApi.saveAsyncOprLog(BusTypeEnum.BusType_2.getCode() , oprType , oprResult , oprMsg , LocalDate.parse(delDate));
}
}
File file = new File(path); @Transactional
if (file.isDirectory()) { public void toSaveDats(List<ImpactDTO> impList , String date) {
File[] files = file.listFiles(); if (!isSyncAll) {
if (files != null && files.length > 0) { impactApi.deleteDatasByBusDate(date);
for (File f : files) { }
readFile(f); impactApi.saveImpacts(impList);
}
public void toParseDatas(String date , List<ImpactDTO> impList) {
File file = null;
if (isSyncAll) {
file = new File(impactUrl);
if (file.isDirectory()) {
File[] files = file.listFiles();
if (files != null && files.length > 0) {
for (File fs : files) {
if (fs.isDirectory()) {
File[] _fss = fs.listFiles();
if (_fss != null && _fss.length > 0) {
for (File _f : _fss) {
readFile(_f , impList);
}
}
}
}
}
}
} else {
file = new File(impactUrl + "/" + date);
if (file.isDirectory()) {
File[] files = file.listFiles();
if (files != null && files.length > 0) {
for (File f : files) {
readFile(f , impList);
}
} }
} }
} }
} }
private void readFile(File f) { private void readFile(File f , List<ImpactDTO> impList) {
try { try {
List<ImpactDTO> impList = new ArrayList<>();
if (f != null && f.isFile()) { if (f != null && f.isFile()) {
String fileName = f.getName().split("\\.")[0]; String fileName = f.getName().split("\\.")[0];
SAXReader reader = new SAXReader(); SAXReader reader = new SAXReader();
@ -58,10 +127,6 @@ public class ImpactScheduleServie {
impList.add(idto); impList.add(idto);
} }
} }
if (impList != null && impList.size() > 0) {
impactApi.saveImpacts(impList);
}
} }
}catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

66
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/PlatScaleScheduleService.java

@ -1,20 +1,27 @@
package com.win.module.dataacqu.service; package com.win.module.dataacqu.service;
import cn.hutool.core.io.CharsetDetector;
import com.healthmarketscience.jackcess.Database; import com.healthmarketscience.jackcess.Database;
import com.healthmarketscience.jackcess.DatabaseBuilder; import com.healthmarketscience.jackcess.DatabaseBuilder;
import com.healthmarketscience.jackcess.Row; import com.healthmarketscience.jackcess.Row;
import com.healthmarketscience.jackcess.Table; import com.healthmarketscience.jackcess.Table;
import com.win.framework.common.util.date.DateUtils; import com.win.framework.common.util.date.DateUtils;
import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi;
import com.win.module.lab.api.platscale.PlatScaleApi; import com.win.module.lab.api.platscale.PlatScaleApi;
import com.win.module.lab.api.platscale.dto.PlatScaleDTO; import com.win.module.lab.api.platscale.dto.PlatScaleDTO;
import com.win.module.lab.enums.BusTypeEnum;
import com.win.module.lab.enums.OprTypeEnum;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
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.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.io.File; import java.io.File;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
@ -32,15 +39,53 @@ public class PlatScaleScheduleService {
@Autowired @Autowired
private PlatScaleApi platScaleApi; private PlatScaleApi platScaleApi;
@Autowired
private AsyncOprLogApi asyncOprLogApi;
public void syncPlatScaleDatas() throws Exception{
String curDate = DateUtils.getDateStr(new Date() , "yyyy-MM-dd"); // busDate 2023-11-24
public void syncPlatScaleDatas(String busDate) {
List<PlatScaleDTO> dtos = new ArrayList<>();
String _busDate = "";
String oprType = "";
String oprResult= "成功";
String oprMsg = "";
try {
if (StringUtils.isEmpty(busDate)) {
_busDate = DateUtils.getDateStr(new Date() , "yyyy-MM-dd");
oprType = OprTypeEnum.OprType_1.getCode();
} else {
_busDate = busDate;
oprType = OprTypeEnum.OprType_2.getCode();
}
toReadDatas(_busDate , dtos);
if (dtos != null && dtos.size() > 0) {
toSaveDats(_busDate , dtos);
}
isSyncAll = false;
}catch (Exception e) {
e.printStackTrace();
oprResult = "失败";
oprMsg = e.getMessage();
} finally {
asyncOprLogApi.saveAsyncOprLog(BusTypeEnum.BusType_1.getCode() , oprType , oprResult , oprMsg , LocalDate.parse(_busDate));
}
}
@Transactional
public void toSaveDats (String busDate , List<PlatScaleDTO> dtos) {
if (isSyncAll) {
platScaleApi.saveDatas(dtos);
} else {
platScaleApi.deleteDatasByBusDate(busDate);
platScaleApi.saveDatas(dtos);
}
}
public void toReadDatas(String busDate , List<PlatScaleDTO> dtos) throws Exception {
DatabaseBuilder databaseBuilder = null; DatabaseBuilder databaseBuilder = null;
Database db = null; Database db = null;
try { try {
File file = new File(platScaleUrl); File file = new File(platScaleUrl);
databaseBuilder = new DatabaseBuilder(file); databaseBuilder = new DatabaseBuilder(file);
databaseBuilder.setCharset(Charset.forName("gb2312")); databaseBuilder.setCharset(Charset.forName("gb2312"));
@ -50,11 +95,10 @@ public class PlatScaleScheduleService {
for(Row row : myTable) { for(Row row : myTable) {
String date = row.getString("日期"); String date = row.getString("日期");
if (isSyncAll) { // 全量同步 if (isSyncAll) { // 全量同步
toSaveData(row); toParseDatas(row , dtos);
} else if (curDate.equals(date)){ } else if (busDate.equals(date)){
toSaveData(row); toParseDatas(row , dtos);
} }
// System.out.println("车号:" + row.getString("车号") + "|| 日期:" + row.getString("日期") + "|| 抽样时间:" + row.getString("抽样时间"));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -65,7 +109,7 @@ public class PlatScaleScheduleService {
} }
} }
private void toSaveData(Row row) { private void toParseDatas(Row row , List<PlatScaleDTO> dtos) {
if (row != null) { if (row != null) {
PlatScaleDTO pdto = new PlatScaleDTO(); PlatScaleDTO pdto = new PlatScaleDTO();
if (StringUtils.isNotBlank(row.getString("车号"))) { if (StringUtils.isNotBlank(row.getString("车号"))) {
@ -134,7 +178,7 @@ public class PlatScaleScheduleService {
if (row.getBoolean("是否抽检") != null) { if (row.getBoolean("是否抽检") != null) {
pdto.setSfcj(row.getBoolean("是否抽检") + ""); pdto.setSfcj(row.getBoolean("是否抽检") + "");
} }
platScaleApi.saveDatas(pdto); dtos.add(pdto);
} }
} }
} }

10
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/SpectrumScheduleService.java

@ -13,19 +13,25 @@ import org.springframework.stereotype.Service;
import java.io.File; import java.io.File;
import java.util.Date; import java.util.Date;
/**
* 同步光谱数据
*/
@Service @Service
public class SpectrumScheduleService { public class SpectrumScheduleService {
@Value("${win.spectrum.url}") @Value("${win.spectrum.url}")
private String spectrumUrl; private String spectrumUrl;
@Value("${win.spectrum.isSyncAll}")
private boolean isSyncAll;
@Autowired @Autowired
private SpectrumApi spectrumApi; private SpectrumApi spectrumApi;
public void syncSpectrumInfos() { // busDate 2023-11-24
public void syncSpectrumInfos(String busDate) {
String path = spectrumUrl + "/" + DateUtils.getDateStr(new Date() , "yyyyMMdd"); String path = spectrumUrl + "/" + DateUtils.getDateStr(new Date() , "yyyyMMdd");
File file = new File(path); File file = new File(path);
if (file.isDirectory()) { if (file.isDirectory()) {
File[] files = file.listFiles(); File[] files = file.listFiles();

2
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThousandScheduleService.java

@ -15,7 +15,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 拉伸1000 access数据 * 拉伸1000 access数据 已经废弃
*/ */
@Component @Component
public class StretchThousandScheduleService { public class StretchThousandScheduleService {

51
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThousandnewScheduleService.java

@ -1,9 +1,12 @@
package com.win.module.dataacqu.service; package com.win.module.dataacqu.service;
import com.win.framework.common.util.date.DateUtils;
import com.win.module.dataacqu.utils.AccessConnectionUtil; import com.win.module.dataacqu.utils.AccessConnectionUtil;
import com.win.module.lab.api.stretchthousand.dto.StretchThousandDTO; import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi;
import com.win.module.lab.api.stretchthousandnew.StretchThousandnewApi; import com.win.module.lab.api.stretchthousandnew.StretchThousandnewApi;
import com.win.module.lab.api.stretchthousandnew.dto.StretchThousandnewDto; import com.win.module.lab.api.stretchthousandnew.dto.StretchThousandnewDto;
import com.win.module.lab.enums.BusTypeEnum;
import com.win.module.lab.enums.OprTypeEnum;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
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;
@ -12,7 +15,9 @@ import org.springframework.stereotype.Component;
import java.sql.Connection; import java.sql.Connection;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Statement; import java.sql.Statement;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@ -34,28 +39,50 @@ public class StretchThousandnewScheduleService {
@Value("${win.stretch.thousand.isSyncAll}") @Value("${win.stretch.thousand.isSyncAll}")
private boolean isSyncAll; private boolean isSyncAll;
@Autowired
private AsyncOprLogApi asyncOprLogApi;
public void syncThousandData() throws Exception{ // busDate 2023-11-24
public void syncThousandData(String busDate) throws Exception{
String _busDate = "";
Statement st = null; Statement st = null;
ResultSet rs = null; ResultSet rs = null;
String oprType = "";
String oprResult= "成功";
String oprMsg = "";
List<StretchThousandnewDto> dtos = new ArrayList<>();
Connection con = AccessConnectionUtil.getCon(stretchThreeAccessUrl , username , password); Connection con = AccessConnectionUtil.getCon(stretchThreeAccessUrl , username , password);
try { try {
if (StringUtils.isEmpty(busDate)) {
_busDate = DateUtils.getDateStr(new Date() , "yyyy-MM-dd");
oprType = OprTypeEnum.OprType_1.getCode();
} else {
_busDate = busDate;
oprType = OprTypeEnum.OprType_2.getCode();
}
String sql = ""; String sql = "";
if (isSyncAll) { // 全量同步 if (isSyncAll) { // 全量同步
sql = "select * from NewTension"; sql = "select * from NewTension";
isSyncAll = false;
} else { // 获取实验日期为当天的数据 } else { // 获取实验日期为当天的数据
sql = "select * from NewTension where 试验日期 = Format(now() , 'yyyy-MM-dd')"; sql = "select * from NewTension where Format(cdate(试验日期) , 'yyyy-MM-dd') = '" + _busDate + "'";
} }
if (con != null) { if (con != null) {
st = con.createStatement(); st = con.createStatement();
rs = st.executeQuery(sql); rs = st.executeQuery(sql);
if (rs != null) { if (rs != null) {
saveData(rs); toParseData(rs , dtos);
} }
} }
if (dtos != null && dtos.size() > 0) {
toSaveDatas(dtos , _busDate);
}
isSyncAll = false;
}catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
oprResult = "失败";
oprMsg = e.getMessage();
} finally { } finally {
if (rs != null) { if (rs != null) {
rs.close(); rs.close();
@ -66,11 +93,18 @@ public class StretchThousandnewScheduleService {
if (con != null) { if (con != null) {
con.close(); con.close();
} }
asyncOprLogApi.saveAsyncOprLog(BusTypeEnum.BusType_5.getCode() , oprType , oprResult , oprMsg , LocalDate.parse(_busDate));
} }
} }
private void saveData(ResultSet rs) throws Exception{ public void toSaveDatas (List<StretchThousandnewDto> dtos , String busDate) {
List<StretchThousandnewDto> dtos = new ArrayList<>(); if (!isSyncAll) {
stretchThousandnewApi.deleteDatasByBusDate(busDate);
}
stretchThousandnewApi.saveDatas(dtos);
}
private void toParseData(ResultSet rs , List<StretchThousandnewDto> dtos) throws Exception{
while (rs.next()) { while (rs.next()) {
StretchThousandnewDto dto = new StretchThousandnewDto(); StretchThousandnewDto dto = new StretchThousandnewDto();
if (StringUtils.isNotBlank(rs.getString("曲线ID"))) { if (StringUtils.isNotBlank(rs.getString("曲线ID"))) {
@ -213,8 +247,5 @@ public class StretchThousandnewScheduleService {
} }
dtos.add(dto); dtos.add(dto);
} }
if (dtos != null && dtos.size() > 0) {
stretchThousandnewApi.saveDatas(dtos);
}
} }
} }

57
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/StretchThreeScheduleService.java

@ -1,17 +1,24 @@
package com.win.module.dataacqu.service; package com.win.module.dataacqu.service;
import com.win.framework.common.util.date.DateUtils;
import com.win.module.dataacqu.utils.AccessConnectionUtil; import com.win.module.dataacqu.utils.AccessConnectionUtil;
import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi;
import com.win.module.lab.api.stretchthreeHundred.StretchThreeHundredApi; import com.win.module.lab.api.stretchthreeHundred.StretchThreeHundredApi;
import com.win.module.lab.api.stretchthreeHundred.dto.StretchThreeHundredDTO; import com.win.module.lab.api.stretchthreeHundred.dto.StretchThreeHundredDTO;
import com.win.module.lab.enums.BusTypeEnum;
import com.win.module.lab.enums.OprTypeEnum;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
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.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.sql.Connection; import java.sql.Connection;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Statement; import java.sql.Statement;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -32,31 +39,52 @@ public class StretchThreeScheduleService {
@Value("${win.stretch.three.isSyncAll}") @Value("${win.stretch.three.isSyncAll}")
private boolean isSyncAll; private boolean isSyncAll;
@Autowired
private AsyncOprLogApi asyncOprLogApi;
@Autowired @Autowired
private StretchThreeHundredApi stretchThreeHundredApi; private StretchThreeHundredApi stretchThreeHundredApi;
public void syncThreeHundredData() throws Exception{ // busDate 2023-11-24
Statement st = null; public void syncThreeHundredData(String busDate) throws Exception{
ResultSet rs = null; Statement st = null;
ResultSet rs = null;
String _busDate = "";
String oprType = "";
String sql = "";
String oprResult= "成功";
String oprMsg = "";
List<StretchThreeHundredDTO> dtos = new ArrayList<>();
Connection con = AccessConnectionUtil.getCon(stretchThreeAccessUrl , username , password); Connection con = AccessConnectionUtil.getCon(stretchThreeAccessUrl , username , password);
try { try {
String sql = ""; if (StringUtils.isEmpty(busDate)) {
_busDate = DateUtils.getDateStr(new Date() , "yyyy-MM-dd");
oprType = OprTypeEnum.OprType_1.getCode();
} else {
_busDate = busDate;
oprType = OprTypeEnum.OprType_2.getCode();
}
if (isSyncAll) { // 全量同步 if (isSyncAll) { // 全量同步
sql = "select * from js_ls"; sql = "select * from js_ls";
isSyncAll = false;
} else { // 获取实验日期为当天的数据 } else { // 获取实验日期为当天的数据
sql = "select * from js_ls where Format(TestDate , 'yyyy-MM-dd') = Format(now() , 'yyyy-MM-dd')"; sql = "select * from js_ls where Format(TestDate , 'yyyy-MM-dd') = " + _busDate;
} }
if (con != null) { if (con != null) {
st = con.createStatement(); st = con.createStatement();
rs = st.executeQuery(sql); rs = st.executeQuery(sql);
if (rs != null) { if (rs != null) {
saveData(rs); toParseData(rs , dtos);
} }
} }
if (dtos != null && dtos.size() > 0) {
toSaveDatas(dtos , _busDate);
}
isSyncAll = false;
}catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
oprResult = "失败";
oprMsg = e.getMessage();
} finally { } finally {
if (rs != null) { if (rs != null) {
rs.close(); rs.close();
@ -67,11 +95,19 @@ public class StretchThreeScheduleService {
if (con != null) { if (con != null) {
con.close(); con.close();
} }
asyncOprLogApi.saveAsyncOprLog(BusTypeEnum.BusType_4.getCode() , oprType , oprResult , oprMsg , LocalDate.parse(_busDate));
} }
} }
private void saveData(ResultSet rs) throws Exception{ @Transactional
List<StretchThreeHundredDTO> dtos = new ArrayList<>(); public void toSaveDatas(List<StretchThreeHundredDTO> dtos , String busDate) {
if (!isSyncAll) {
stretchThreeHundredApi.deleteDatasByBusDate(busDate);
}
stretchThreeHundredApi.saveStretchThreeHundreds(dtos);
}
private void toParseData(ResultSet rs , List<StretchThreeHundredDTO> dtos) throws Exception{
while (rs.next()) { while (rs.next()) {
StretchThreeHundredDTO dto = new StretchThreeHundredDTO(); StretchThreeHundredDTO dto = new StretchThreeHundredDTO();
if (StringUtils.isNotBlank(rs.getString("SYID"))) { if (StringUtils.isNotBlank(rs.getString("SYID"))) {
@ -280,8 +316,5 @@ public class StretchThreeScheduleService {
} }
dtos.add(dto); dtos.add(dto);
} }
if (dtos != null && dtos.size() > 0) {
stretchThreeHundredApi.saveStretchThreeHundreds(dtos);
}
} }
} }

6
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/asynclab/AsyncLabService.java

@ -0,0 +1,6 @@
package com.win.module.dataacqu.service.asynclab;
public interface AsyncLabService {
public String asyncLab(String busDate , String busType) throws Exception ;
}

59
win-module-dataacqu/win-module-dataacqu-biz/src/main/java/com/win/module/dataacqu/service/asynclab/AsyncLabServiceImpl.java

@ -0,0 +1,59 @@
package com.win.module.dataacqu.service.asynclab;
import com.win.module.dataacqu.service.*;
import com.win.module.lab.api.asyncoprlog.AsyncOprLogApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AsyncLabServiceImpl implements AsyncLabService{
@Autowired
private ImpactScheduleServie impactScheduleServie;
@Autowired
private PlatScaleScheduleService platScaleScheduleService;
@Autowired
private SpectrumScheduleService spectrumScheduleService;
@Autowired
private StretchThousandnewScheduleService sScheduleService;
@Autowired
private StretchThousandQxScheduleService sQxScheduleService;
@Autowired
private StretchThreeScheduleService stretchThreeScheduleService;
@Autowired
private StretchThreeQxScheduleService stretchThreeQxScheduleService;
@Override
public String asyncLab(String busDate , String busType) throws Exception {
switch (busType) {
case "1" : // 地衡
platScaleScheduleService.syncPlatScaleDatas(busDate);
break;
case "2": // 冲击
impactScheduleServie.syncImpactInfos(busDate);
break;
case "3": // 光谱
// spectrumScheduleService.syncSpectrumInfos(busDate);
break;
case "4": // 拉伸300
stretchThreeScheduleService.syncThreeHundredData(busDate);
// stretchThreeQxScheduleService.syncQxInfos();
break;
case "5": // 拉伸1000
sScheduleService.syncThousandData(busDate);
// sQxScheduleService.syncQxInfos();
break;
default:
break;
}
return null;
}
}

12
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/asyncoprlog/AsyncOprLogApi.java

@ -0,0 +1,12 @@
package com.win.module.lab.api.asyncoprlog;
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO;
import java.time.LocalDate;
public interface AsyncOprLogApi {
public boolean saveAsyncOprLog(AsyncOprLogDTO dto);
public boolean saveAsyncOprLog(String busType , String oprType , String oprResult , String oprMsg , LocalDate busDate);
}

27
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/asyncoprlog/dto/AsyncOprLogDTO.java

@ -0,0 +1,27 @@
package com.win.module.lab.api.asyncoprlog.dto;
import java.time.LocalDate;
public class AsyncOprLogDTO {
/**
* 业务类型
*/
private String busType;
/**
* 操作类型
*/
private String oprType;
/**
* 操作结果
*/
private String oprResult;
/**
* 描述
*/
private String oprMsg;
/**
* 业务日期
*/
private LocalDate busDate;
}

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/impact/ImpactApi.java

@ -7,4 +7,6 @@ import java.util.List;
public interface ImpactApi { public interface ImpactApi {
public String saveImpacts(List<ImpactDTO> list); public String saveImpacts(List<ImpactDTO> list);
public boolean deleteDatasByBusDate(String busDate);
} }

6
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/platscale/PlatScaleApi.java

@ -2,8 +2,12 @@ package com.win.module.lab.api.platscale;
import com.win.module.lab.api.platscale.dto.PlatScaleDTO; import com.win.module.lab.api.platscale.dto.PlatScaleDTO;
import java.util.List;
public interface PlatScaleApi { public interface PlatScaleApi {
public String saveDatas(PlatScaleDTO pdto); public String saveDatas(List<PlatScaleDTO> pdtos);
public boolean deleteDatasByBusDate(String busDate);
} }

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/spectrum/SpectrumApi.java

@ -7,4 +7,6 @@ public interface SpectrumApi {
public String saveData(SpectrumDTO dto); public String saveData(SpectrumDTO dto);
public boolean checkBatchNo(String batchNo); public boolean checkBatchNo(String batchNo);
public boolean deleteDatasByBusDate(String busDate);
} }

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthousandnew/StretchThousandnewApi.java

@ -7,4 +7,6 @@ import java.util.List;
public interface StretchThousandnewApi { public interface StretchThousandnewApi {
public boolean saveDatas(List<StretchThousandnewDto> list); public boolean saveDatas(List<StretchThousandnewDto> list);
public boolean deleteDatasByBusDate(String busDate);
} }

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthousandqx/StretchThousandQxApi.java

@ -7,4 +7,6 @@ import java.util.List;
public interface StretchThousandQxApi { public interface StretchThousandQxApi {
public String saveData(StretchThousandQxDTO dto); public String saveData(StretchThousandQxDTO dto);
public boolean deleteDatasByBusDate(String busDate);
} }

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthreeHundred/StretchThreeHundredApi.java

@ -12,4 +12,6 @@ public interface StretchThreeHundredApi {
* @return * @return
*/ */
public String saveStretchThreeHundreds(List<StretchThreeHundredDTO> list); public String saveStretchThreeHundreds(List<StretchThreeHundredDTO> list);
public boolean deleteDatasByBusDate(String busDate);
} }

2
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/api/stretchthreeHundredqx/StretchThreeHundredQxApi.java

@ -7,4 +7,6 @@ import com.win.module.lab.api.stretchthreeHundredqx.dto.StretchThreeHundredQxDTO
public interface StretchThreeHundredQxApi { public interface StretchThreeHundredQxApi {
public String saveStretchThreeHundredQxs(StretchThreeHundredQxDTO dto); public String saveStretchThreeHundredQxs(StretchThreeHundredQxDTO dto);
public boolean deleteDatasByBusDate(String busDate);
} }

37
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/BusTypeEnum.java

@ -0,0 +1,37 @@
package com.win.module.lab.enums;
public enum BusTypeEnum {
BusType_1("1" , "地衡"),
BusType_2("2" , "冲击"),
BusType_3("3" , "光谱"),
BusType_4("4" , "拉伸300"),
BusType_5("5" , "拉伸1000"),
BusType_6("6" , "拉伸300曲线"),
BusType_7("7" , "拉伸1000曲线");
private String code;
private String label;
BusTypeEnum(String code , String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

14
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/ErrorCodeEnum.java

@ -32,7 +32,19 @@ public enum ErrorCodeEnum {
PLATSCALE_NOT_EXISTS(5015, "地衡数据不存在"), PLATSCALE_NOT_EXISTS(5015, "地衡数据不存在"),
PLATSCALE_IMPORT_LIST_IS_EMPTY(5016, "地衡文档数据不能为空"); PLATSCALE_IMPORT_LIST_IS_EMPTY(5016, "地衡文档数据不能为空"),
HARDNESS_TWO_NOT_EXISTS(5017, "韦氏硬度2数据不存在"),
HARDNESS_TWO_IMPORT_LIST_IS_EMPTY(5018 , "导入韦氏硬度2数据不存在"),
HARDNESS_THREE_NOT_EXISTS(5019 , "布氏硬度数据不存在"),
HARDNESS_THREE_IMPORT_LIST_IS_EMPTY(5020 , "导入布氏硬度数据不存在"),
ASYNC_OPR_LOG_NOT_EXISTS(5021 , "实验室业务同步操作日志不存在"),
ASYNC_OPR_LOG_IMPORT_LIST_IS_EMPTY(5022 , "导入实验室同步操作日志不存在");
private Integer code; private Integer code;

33
win-module-lab/win-module-lab-api/src/main/java/com/win/module/lab/enums/OprTypeEnum.java

@ -0,0 +1,33 @@
package com.win.module.lab.enums;
public enum OprTypeEnum {
OprType_1("1" , "自动同步"),
OprType_2("2" , "手动同步");
private String code;
private String label;
OprTypeEnum (String code , String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

36
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/asyncoprlog/AsyncOprLogApiImpl.java

@ -0,0 +1,36 @@
package com.win.module.lab.api.asyncoprlog;
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO;
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
import com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
@Service
public class AsyncOprLogApiImpl implements AsyncOprLogApi{
@Autowired
private AsyncOprLogMapper asyncOprLogMapper;
@Override
public boolean saveAsyncOprLog(AsyncOprLogDTO dto) {
asyncOprLogMapper.insert(AsyncOprLogConvert.INSTANCE.convert(dto));
return true;
}
@Override
public boolean saveAsyncOprLog(String busType, String oprType, String oprResult, String oprMsg, LocalDate busDate) {
AsyncOprLogDO ado = new AsyncOprLogDO();
ado.setBusType(busType);
ado.setOprType(oprType);
ado.setOprResult(oprResult);
ado.setOprMsg(oprMsg);
ado.setBusDate(busDate);
asyncOprLogMapper.insert(ado);
return true;
}
}

8
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/impact/ImpactApiImpl.java

@ -6,10 +6,12 @@ import com.win.module.lab.dal.dataobject.impact.ImpactDO;
import com.win.module.lab.dal.mysql.impact.ImpactMapper; import com.win.module.lab.dal.mysql.impact.ImpactMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@Service @Service
@Transactional
public class ImpactApiImpl implements ImpactApi{ public class ImpactApiImpl implements ImpactApi{
@Autowired @Autowired
@ -28,4 +30,10 @@ public class ImpactApiImpl implements ImpactApi{
} }
return null; return null;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
impactMapper.deleteByBusDate(busDate);
return true;
}
} }

22
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/platscale/PlatScaleApiImpl.java

@ -6,9 +6,13 @@ import com.win.module.lab.dal.dataobject.platscale.PlatscaleDO;
import com.win.module.lab.dal.mysql.platscale.PlatscaleMapper; import com.win.module.lab.dal.mysql.platscale.PlatscaleMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service @Service
@Transactional
public class PlatScaleApiImpl implements PlatScaleApi{ public class PlatScaleApiImpl implements PlatScaleApi{
@Autowired @Autowired
@ -16,11 +20,19 @@ public class PlatScaleApiImpl implements PlatScaleApi{
@Override @Override
public String saveDatas(PlatScaleDTO pdto) { public String saveDatas(List<PlatScaleDTO> pdtos) {
PlatscaleDO pdo = PlatscaleConvert.INSTANCE.convert(pdto); for (PlatScaleDTO pdto : pdtos) {
pdo.setCreator("1"); PlatscaleDO pdo = PlatscaleConvert.INSTANCE.convert(pdto);
pdo.setUpdater("1"); pdo.setCreator("1");
platscaleMapper.insert(pdo); pdo.setUpdater("1");
platscaleMapper.insert(pdo);
}
return null; return null;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
platscaleMapper.deleteByBusDate(busDate);
return true;
}
} }

6
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/spectrum/SpectrumApiImpl.java

@ -36,4 +36,10 @@ public class SpectrumApiImpl implements SpectrumApi{
} }
return true; return true;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
spectrumMapper.deleteByBusDate(busDate);
return true;
}
} }

6
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthousandnew/StretchThousandnewApiImpl.java

@ -26,4 +26,10 @@ public class StretchThousandnewApiImpl implements StretchThousandnewApi{
} }
return true; return true;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
stretchThousandnewMapper.deleteByBusDate(busDate);
return true;
}
} }

6
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthousandqx/StretchThousandQxApiImpl.java

@ -23,4 +23,10 @@ public class StretchThousandQxApiImpl implements StretchThousandQxApi{
stretchThousandQxMapper.insert(sdo); stretchThousandQxMapper.insert(sdo);
return null; return null;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
stretchThousandQxMapper.deleteByBusDate(busDate);
return true;
}
} }

13
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthreeHundred/StretchThreeHundredApiImpl.java

@ -5,12 +5,13 @@ import com.win.module.lab.convert.stretchthreeHundred.StretchThreeHundredConvert
import com.win.module.lab.dal.dataobject.stretchthreehundred.StretchThreeHundredDO; import com.win.module.lab.dal.dataobject.stretchthreehundred.StretchThreeHundredDO;
import com.win.module.lab.dal.mysql.stretchthreehundred.StretchThreeHundredMapper; import com.win.module.lab.dal.mysql.stretchthreehundred.StretchThreeHundredMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
@Transactional
public class StretchThreeHundredApiImpl implements StretchThreeHundredApi{ public class StretchThreeHundredApiImpl implements StretchThreeHundredApi{
@Resource @Resource
@ -19,9 +20,6 @@ public class StretchThreeHundredApiImpl implements StretchThreeHundredApi{
@Override @Override
public String saveStretchThreeHundreds(List<StretchThreeHundredDTO> list) { public String saveStretchThreeHundreds(List<StretchThreeHundredDTO> list) {
// Date curDate = new Date();
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
for (StretchThreeHundredDTO sdto : list) { for (StretchThreeHundredDTO sdto : list) {
StretchThreeHundredDO sdo = StretchThreeHundredConvert.INSTANCE.convert(sdto); StretchThreeHundredDO sdo = StretchThreeHundredConvert.INSTANCE.convert(sdto);
@ -32,7 +30,12 @@ public class StretchThreeHundredApiImpl implements StretchThreeHundredApi{
} }
} }
} }
return null; return null;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
stretchThreeHundredMapper.deleteByBusDate(busDate);
return true;
}
} }

6
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/api/stretchthreeHundredqx/StretchThreeHundredQxApiImpl.java

@ -23,4 +23,10 @@ public class StretchThreeHundredQxApiImpl implements StretchThreeHundredQxApi{
} }
return null; return null;
} }
@Override
public boolean deleteDatasByBusDate(String busDate) {
stretchThreeHundredQxMapper.deleteByBusDate(busDate);
return true;
}
} }

123
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/AsyncOprLogController.java

@ -0,0 +1,123 @@
package com.win.module.lab.controller.asyncoprlog;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
import java.io.IOException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.common.pojo.CommonResult;
import static com.win.framework.common.pojo.CommonResult.success;
import com.win.framework.excel.core.util.ExcelUtils;
import com.win.framework.operatelog.core.annotations.OperateLog;
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.win.module.lab.controller.asyncoprlog.vo.*;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert;
import com.win.module.lab.service.asyncoprlog.AsyncOprLogService;
import org.springframework.web.multipart.MultipartFile;
@Tag(name = "管理后台 - 实验室-主动同步日志")
@RestController
@RequestMapping("/lab/asyncoprlog")
@Validated
public class AsyncOprLogController {
@Resource
private AsyncOprLogService asyncOprLogService;
@PostMapping("/create")
@Operation(summary = "创建实验室-主动同步日志")
public CommonResult<Long> createAsyncOprLog(@Valid @RequestBody AsyncOprLogCreateReqVO createReqVO) {
return success(asyncOprLogService.createAsyncOprLog(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新实验室-主动同步日志")
public CommonResult<Boolean> updateAsyncOprLog(@Valid @RequestBody AsyncOprLogUpdateReqVO updateReqVO) {
asyncOprLogService.updateAsyncOprLog(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除实验室-主动同步日志")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteAsyncOprLog(@RequestParam("id") Long id) {
asyncOprLogService.deleteAsyncOprLog(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得实验室-主动同步日志")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<AsyncOprLogRespVO> getAsyncOprLog(@RequestParam("id") Long id) {
AsyncOprLogDO asyncOprLog = asyncOprLogService.getAsyncOprLog(id);
return success(AsyncOprLogConvert.INSTANCE.convert(asyncOprLog));
}
@GetMapping("/page")
@Operation(summary = "获得实验室-主动同步日志分页")
public CommonResult<PageResult<AsyncOprLogRespVO>> getAsyncOprLogPage(@Valid AsyncOprLogPageReqVO pageVO) {
PageResult<AsyncOprLogDO> pageResult = asyncOprLogService.getAsyncOprLogPage(pageVO);
return success(AsyncOprLogConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出实验室-主动同步日志 Excel")
@OperateLog(type = EXPORT)
public void exportAsyncOprLogExcel(@Valid AsyncOprLogExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<AsyncOprLogDO> list = asyncOprLogService.getAsyncOprLogList(exportReqVO);
// 导出 Excel
List<AsyncOprLogExcelVO> datas = AsyncOprLogConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "实验室-主动同步日志.xls", "数据", AsyncOprLogExcelVO.class, datas);
}
@GetMapping("/get-import-template")
@Operation(summary = "获得导入实验室-主动同步日志模板")
public void importTemplate(HttpServletResponse response) throws IOException {
List<AsyncOprLogExcelVO> list = Arrays.asList();
// 输出
ExcelUtils.write(response, "实验室-主动同步日志基本信息导入模板.xls", "实验室-主动同步日志基本信息列表", AsyncOprLogExcelVO.class, list);
}
@PostMapping("/import")
@Operation(summary = "导入实验室-主动同步日志基本信息")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"),
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true")
})
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response,
@RequestParam("file") MultipartFile file,
@RequestParam(value = "mode") Integer mode,
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception {
List<AsyncOprLogExcelVO> list = ExcelUtils.read(file, AsyncOprLogExcelVO.class);
List<AsyncOprLogExcelVO> errorList = asyncOprLogService.importAsyncOprLogList(list, mode, updatePart);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("errorCount", errorList.size());
if(!errorList.isEmpty()) {
String url = ExcelUtils.writeLocalFile("实验室-主动同步日志基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList);
returnMap.put("errorFile", url);
}
return success(returnMap);
}
}

34
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogBaseVO.java

@ -0,0 +1,34 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
/**
* 实验室-主动同步日志 Base VO提供给添加修改详细的子 VO 使用
* 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成
*/
@Data
public class AsyncOprLogBaseVO {
@Schema(description = "业务类型", example = "2")
private String busType;
@Schema(description = "操作类型", example = "1")
private String oprType;
@Schema(description = "操作结果")
private String oprResult;
@Schema(description = "描述")
private String oprMsg;
@Schema(description = "业务日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private LocalDate busDate;
}

12
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogCreateReqVO.java

@ -0,0 +1,12 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "管理后台 - 实验室-主动同步日志创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AsyncOprLogCreateReqVO extends AsyncOprLogBaseVO {
}

39
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogExcelVO.java

@ -0,0 +1,39 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import lombok.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* 实验室-主动同步日志 Excel VO
*
* @author 超级管理员
*/
@Data
public class AsyncOprLogExcelVO {
@ExcelProperty("主键、自增")
private Long id;
@ExcelProperty("业务类型")
private String busType;
@ExcelProperty("操作类型")
private String oprType;
@ExcelProperty("操作结果")
private String oprResult;
@ExcelProperty("描述")
private String oprMsg;
@ExcelProperty("业务日期")
private LocalDate busDate;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

37
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogExportReqVO.java

@ -0,0 +1,37 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import lombok.*;
import java.time.LocalDate;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
@Schema(description = "管理后台 - 实验室-主动同步日志 Excel 导出 Request VO,参数和 AsyncOprLogPageReqVO 是一致的")
@Data
public class AsyncOprLogExportReqVO {
@Schema(description = "业务类型", example = "2")
private String busType;
@Schema(description = "操作类型", example = "1")
private String oprType;
@Schema(description = "操作结果")
private String oprResult;
@Schema(description = "描述")
private String oprMsg;
@Schema(description = "业务日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
private LocalDate[] busDate;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

39
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogPageReqVO.java

@ -0,0 +1,39 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import lombok.*;
import java.time.LocalDate;
import io.swagger.v3.oas.annotations.media.Schema;
import com.win.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 实验室-主动同步日志分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AsyncOprLogPageReqVO extends PageParam {
@Schema(description = "业务类型", example = "2")
private String busType;
@Schema(description = "操作类型", example = "1")
private String oprType;
@Schema(description = "操作结果")
private String oprResult;
@Schema(description = "描述")
private String oprMsg;
@Schema(description = "业务日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate[] busDate;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

19
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogRespVO.java

@ -0,0 +1,19 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 实验室-主动同步日志 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AsyncOprLogRespVO extends AsyncOprLogBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "17285")
private Long id;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

17
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/asyncoprlog/vo/AsyncOprLogUpdateReqVO.java

@ -0,0 +1,17 @@
package com.win.module.lab.controller.asyncoprlog.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 实验室-主动同步日志更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AsyncOprLogUpdateReqVO extends AsyncOprLogBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "17285")
@NotNull(message = "主键、自增不能为空")
private Long id;
}

125
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/HardnessThreeController.java

@ -0,0 +1,125 @@
package com.win.module.lab.controller.hardnessthree;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
import java.io.IOException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.common.pojo.CommonResult;
import static com.win.framework.common.pojo.CommonResult.success;
import com.win.framework.excel.core.util.ExcelUtils;
import com.win.framework.operatelog.core.annotations.OperateLog;
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.win.module.lab.controller.hardnessthree.vo.*;
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO;
import com.win.module.lab.convert.hardnessthree.HardnessThreeConvert;
import com.win.module.lab.service.hardnessthree.HardnessThreeService;
import org.springframework.web.multipart.MultipartFile;
@Tag(name = "管理后台 - 实验室-布氏硬度")
@RestController
@RequestMapping("/lab/hardnessthree")
@Validated
public class HardnessThreeController {
@Resource
private HardnessThreeService hardnessThreeService;
@PostMapping("/create")
@Operation(summary = "创建实验室-布氏硬度")
public CommonResult<Long> createHardnessThree(@Valid @RequestBody HardnessThreeCreateReqVO createReqVO) {
return success(hardnessThreeService.createHardnessThree(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新实验室-布氏硬度")
public CommonResult<Boolean> updateHardnessThree(@Valid @RequestBody HardnessThreeUpdateReqVO updateReqVO) {
hardnessThreeService.updateHardnessThree(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除实验室-布氏硬度")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteHardnessThree(@RequestParam("id") Long id) {
hardnessThreeService.deleteHardnessThree(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得实验室-布氏硬度")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<HardnessThreeRespVO> getHardnessThree(@RequestParam("id") Long id) {
HardnessThreeDO hardnessThree = hardnessThreeService.getHardnessThree(id);
return success(HardnessThreeConvert.INSTANCE.convert(hardnessThree));
}
@GetMapping("/page")
@Operation(summary = "获得实验室-布氏硬度分页")
public CommonResult<PageResult<HardnessThreeRespVO>> getHardnessThreePage(@Valid HardnessThreePageReqVO pageVO) {
PageResult<HardnessThreeDO> pageResult = hardnessThreeService.getHardnessThreePage(pageVO);
return success(HardnessThreeConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出实验室-布氏硬度 Excel")
@OperateLog(type = EXPORT)
public void exportHardnessThreeExcel(@Valid HardnessThreeExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<HardnessThreeDO> list = hardnessThreeService.getHardnessThreeList(exportReqVO);
// 导出 Excel
List<HardnessThreeExcelVO> datas = HardnessThreeConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "实验室-布氏硬度.xls", "数据", HardnessThreeExcelVO.class, datas);
}
@GetMapping("/get-import-template")
@Operation(summary = "获得导入实验室-布氏硬度模板")
public void importTemplate(HttpServletResponse response) throws IOException {
List<HardnessThreeExcelVO> list = Arrays.asList();
// 输出
ExcelUtils.write(response, "实验室-布氏硬度基本信息导入模板.xls", "实验室-布氏硬度基本信息列表", HardnessThreeExcelVO.class, list);
}
@PostMapping("/import")
@Operation(summary = "导入实验室-布氏硬度基本信息")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"),
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true")
})
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response,
@RequestParam("file") MultipartFile file,
@RequestParam(value = "mode") Integer mode,
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception {
List<HardnessThreeExcelVO> list = ExcelUtils.read(file, HardnessThreeExcelVO.class);
List<HardnessThreeExcelVO> errorList = hardnessThreeService.importHardnessThreeList(list, mode, updatePart);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("errorCount", errorList.size());
if(!errorList.isEmpty()) {
String url = ExcelUtils.writeLocalFile("实验室-布氏硬度基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList);
returnMap.put("errorFile", url);
}
return success(returnMap);
}
}

48
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeBaseVO.java

@ -0,0 +1,48 @@
package com.win.module.lab.controller.hardnessthree.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
* 实验室-布氏硬度 Base VO提供给添加修改详细的子 VO 使用
* 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成
*/
@Data
public class HardnessThreeBaseVO {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "硬度")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
private String testDate;
@Schema(description = "实验力(KN)")
private String syl;
@Schema(description = "压头尺寸(mm)")
private String ytcc;
@Schema(description = "压痕直径(mm)")
private String yhzj;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "审核状态")
private String auditStatus;
}

12
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeCreateReqVO.java

@ -0,0 +1,12 @@
package com.win.module.lab.controller.hardnessthree.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "管理后台 - 实验室-布氏硬度创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessThreeCreateReqVO extends HardnessThreeBaseVO {
}

58
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeExcelVO.java

@ -0,0 +1,58 @@
package com.win.module.lab.controller.hardnessthree.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* 实验室-布氏硬度 Excel VO
*
* @author 超级管理员
*/
@Data
public class HardnessThreeExcelVO {
@ExcelProperty("主键、自增")
private Long id;
@ExcelProperty("批次号")
private String batchNo;
@ExcelProperty("送样单位")
private String sydw;
@ExcelProperty("硬度")
private String standard;
@ExcelProperty("材质")
private String cz;
@ExcelProperty("规格")
private String guig;
@ExcelProperty("实验人")
private String testUser;
@ExcelProperty("实验日期")
private String testDate;
@ExcelProperty("实验力(KN)")
private String syl;
@ExcelProperty("压头尺寸(mm)")
private String ytcc;
@ExcelProperty("压痕直径(mm)")
private String yhzj;
@ExcelProperty("硬度")
private String testYd;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("审核状态")
private String auditStatus;
}

54
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeExportReqVO.java

@ -0,0 +1,54 @@
package com.win.module.lab.controller.hardnessthree.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 实验室-布氏硬度 Excel 导出 Request VO,参数和 HardnessThreePageReqVO 是一致的")
@Data
public class HardnessThreeExportReqVO {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "硬度")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] testDate;
@Schema(description = "实验力(KN)")
private String syl;
@Schema(description = "压头尺寸(mm)")
private String ytcc;
@Schema(description = "压痕直径(mm)")
private String yhzj;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "审核状态")
private String auditStatus;
}

57
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreePageReqVO.java

@ -0,0 +1,57 @@
package com.win.module.lab.controller.hardnessthree.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.win.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 实验室-布氏硬度分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessThreePageReqVO extends PageParam {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "硬度")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] testDate;
@Schema(description = "实验力(KN)")
private String syl;
@Schema(description = "压头尺寸(mm)")
private String ytcc;
@Schema(description = "压痕直径(mm)")
private String yhzj;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "审核状态")
private String auditStatus;
}

19
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeRespVO.java

@ -0,0 +1,19 @@
package com.win.module.lab.controller.hardnessthree.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 实验室-布氏硬度 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessThreeRespVO extends HardnessThreeBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "28090")
private Long id;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

17
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnessthree/vo/HardnessThreeUpdateReqVO.java

@ -0,0 +1,17 @@
package com.win.module.lab.controller.hardnessthree.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 实验室-布氏硬度更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessThreeUpdateReqVO extends HardnessThreeBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "28090")
@NotNull(message = "主键、自增不能为空")
private Long id;
}

125
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/HardnessTwoController.java

@ -0,0 +1,125 @@
package com.win.module.lab.controller.hardnesstwo;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
import java.io.IOException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.common.pojo.CommonResult;
import static com.win.framework.common.pojo.CommonResult.success;
import com.win.framework.excel.core.util.ExcelUtils;
import com.win.framework.operatelog.core.annotations.OperateLog;
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.win.module.lab.controller.hardnesstwo.vo.*;
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO;
import com.win.module.lab.convert.hardnesstwo.HardnessTwoConvert;
import com.win.module.lab.service.hardnesstwo.HardnessTwoService;
import org.springframework.web.multipart.MultipartFile;
@Tag(name = "管理后台 - 实验室-韦氏硬度2")
@RestController
@RequestMapping("/lab/hardnesstwo")
@Validated
public class HardnessTwoController {
@Resource
private HardnessTwoService hardnessTwoService;
@PostMapping("/create")
@Operation(summary = "创建实验室-韦氏硬度2")
public CommonResult<Long> createHardnessTwo(@Valid @RequestBody HardnessTwoCreateReqVO createReqVO) {
return success(hardnessTwoService.createHardnessTwo(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新实验室-韦氏硬度2")
public CommonResult<Boolean> updateHardnessTwo(@Valid @RequestBody HardnessTwoUpdateReqVO updateReqVO) {
hardnessTwoService.updateHardnessTwo(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除实验室-韦氏硬度2")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteHardnessTwo(@RequestParam("id") Long id) {
hardnessTwoService.deleteHardnessTwo(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得实验室-韦氏硬度2")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<HardnessTwoRespVO> getHardnessTwo(@RequestParam("id") Long id) {
HardnessTwoDO hardnessTwo = hardnessTwoService.getHardnessTwo(id);
return success(HardnessTwoConvert.INSTANCE.convert(hardnessTwo));
}
@GetMapping("/page")
@Operation(summary = "获得实验室-韦氏硬度2分页")
public CommonResult<PageResult<HardnessTwoRespVO>> getHardnessTwoPage(@Valid HardnessTwoPageReqVO pageVO) {
PageResult<HardnessTwoDO> pageResult = hardnessTwoService.getHardnessTwoPage(pageVO);
return success(HardnessTwoConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出实验室-韦氏硬度2 Excel")
@OperateLog(type = EXPORT)
public void exportHardnessTwoExcel(@Valid HardnessTwoExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<HardnessTwoDO> list = hardnessTwoService.getHardnessTwoList(exportReqVO);
// 导出 Excel
List<HardnessTwoExcelVO> datas = HardnessTwoConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "实验室-韦氏硬度2.xls", "数据", HardnessTwoExcelVO.class, datas);
}
@GetMapping("/get-import-template")
@Operation(summary = "获得导入实验室-韦氏硬度2模板")
public void importTemplate(HttpServletResponse response) throws IOException {
List<HardnessTwoExcelVO> list = Arrays.asList();
// 输出
ExcelUtils.write(response, "实验室-韦氏硬度2基本信息导入模板.xls", "实验室-韦氏硬度2基本信息列表", HardnessTwoExcelVO.class, list);
}
@PostMapping("/import")
@Operation(summary = "导入实验室-韦氏硬度2基本信息")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"),
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true")
})
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response,
@RequestParam("file") MultipartFile file,
@RequestParam(value = "mode") Integer mode,
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception {
List<HardnessTwoExcelVO> list = ExcelUtils.read(file, HardnessTwoExcelVO.class);
List<HardnessTwoExcelVO> errorList = hardnessTwoService.importHardnessTwoList(list, mode, updatePart);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("errorCount", errorList.size());
if(!errorList.isEmpty()) {
String url = ExcelUtils.writeLocalFile("实验室-韦氏硬度2基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList);
returnMap.put("errorFile", url);
}
return success(returnMap);
}
}

52
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoBaseVO.java

@ -0,0 +1,52 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
* 实验室-韦氏硬度2 Base VO提供给添加修改详细的子 VO 使用
* 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成
*/
@Data
public class HardnessTwoBaseVO {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "标准")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
private String testDate;
@Schema(description = "类别", example = "2")
private String testType;
@Schema(description = "d1(um)")
private String dfirst;
@Schema(description = "d2(um)")
private String dtwo;
@Schema(description = "平均(um)")
private String davg;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "审核状态")
private String auditStatus;
}

12
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoCreateReqVO.java

@ -0,0 +1,12 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "管理后台 - 实验室-韦氏硬度2创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessTwoCreateReqVO extends HardnessTwoBaseVO {
}

60
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoExcelVO.java

@ -0,0 +1,60 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* 实验室-韦氏硬度2 Excel VO
*
* @author 超级管理员
*/
@Data
public class HardnessTwoExcelVO {
@ExcelProperty("主键、自增")
private Long id;
@ExcelProperty("批次号")
private String batchNo;
@ExcelProperty("送样单位")
private String sydw;
@ExcelProperty("标准")
private String standard;
@ExcelProperty("材质")
private String cz;
@ExcelProperty("规格")
private String guig;
@ExcelProperty("实验人")
private String testUser;
@ExcelProperty("实验日期")
private String testDate;
@ExcelProperty("类别")
private String testType;
@ExcelProperty("d1(um)")
private String dfirst;
@ExcelProperty("d2(um)")
private String dtwo;
@ExcelProperty("平均(um)")
private String davg;
@ExcelProperty("硬度")
private String testYd;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("审核状态")
private String auditStatus;
}

57
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoExportReqVO.java

@ -0,0 +1,57 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 实验室-韦氏硬度2 Excel 导出 Request VO,参数和 HardnessTwoPageReqVO 是一致的")
@Data
public class HardnessTwoExportReqVO {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "标准")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] testDate;
@Schema(description = "类别", example = "2")
private String testType;
@Schema(description = "d1(um)")
private String dfirst;
@Schema(description = "d2(um)")
private String dtwo;
@Schema(description = "平均(um)")
private String davg;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "审核状态")
private String auditStatus;
}

60
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoPageReqVO.java

@ -0,0 +1,60 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.win.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 实验室-韦氏硬度2分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessTwoPageReqVO extends PageParam {
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "送样单位")
private String sydw;
@Schema(description = "标准")
private String standard;
@Schema(description = "材质")
private String cz;
@Schema(description = "规格")
private String guig;
@Schema(description = "实验人")
private String testUser;
@Schema(description = "实验日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] testDate;
@Schema(description = "类别", example = "2")
private String testType;
@Schema(description = "d1(um)")
private String dfirst;
@Schema(description = "d2(um)")
private String dtwo;
@Schema(description = "平均(um)")
private String davg;
@Schema(description = "硬度")
private String testYd;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "审核状态")
private String auditStatus;
}

19
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoRespVO.java

@ -0,0 +1,19 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 实验室-韦氏硬度2 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessTwoRespVO extends HardnessTwoBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "1589")
private Long id;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

17
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/controller/hardnesstwo/vo/HardnessTwoUpdateReqVO.java

@ -0,0 +1,17 @@
package com.win.module.lab.controller.hardnesstwo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 实验室-韦氏硬度2更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class HardnessTwoUpdateReqVO extends HardnessTwoBaseVO {
@Schema(description = "主键、自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "1589")
@NotNull(message = "主键、自增不能为空")
private Long id;
}

37
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/asyncoprlog/AsyncOprLogConvert.java

@ -0,0 +1,37 @@
package com.win.module.lab.convert.asyncoprlog;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.module.lab.api.asyncoprlog.dto.AsyncOprLogDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.win.module.lab.controller.asyncoprlog.vo.*;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
/**
* 实验室-主动同步日志 Convert
*
* @author 超级管理员
*/
@Mapper
public interface AsyncOprLogConvert {
AsyncOprLogConvert INSTANCE = Mappers.getMapper(AsyncOprLogConvert.class);
AsyncOprLogDO convert(AsyncOprLogCreateReqVO bean);
AsyncOprLogDO convert(AsyncOprLogUpdateReqVO bean);
AsyncOprLogDO convert(AsyncOprLogDTO bean);
AsyncOprLogRespVO convert(AsyncOprLogDO bean);
List<AsyncOprLogRespVO> convertList(List<AsyncOprLogDO> list);
PageResult<AsyncOprLogRespVO> convertPage(PageResult<AsyncOprLogDO> page);
List<AsyncOprLogExcelVO> convertList02(List<AsyncOprLogDO> list);
}

34
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/hardnessthree/HardnessThreeConvert.java

@ -0,0 +1,34 @@
package com.win.module.lab.convert.hardnessthree;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.win.module.lab.controller.hardnessthree.vo.*;
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO;
/**
* 实验室-布氏硬度 Convert
*
* @author 超级管理员
*/
@Mapper
public interface HardnessThreeConvert {
HardnessThreeConvert INSTANCE = Mappers.getMapper(HardnessThreeConvert.class);
HardnessThreeDO convert(HardnessThreeCreateReqVO bean);
HardnessThreeDO convert(HardnessThreeUpdateReqVO bean);
HardnessThreeRespVO convert(HardnessThreeDO bean);
List<HardnessThreeRespVO> convertList(List<HardnessThreeDO> list);
PageResult<HardnessThreeRespVO> convertPage(PageResult<HardnessThreeDO> page);
List<HardnessThreeExcelVO> convertList02(List<HardnessThreeDO> list);
}

34
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/hardnesstwo/HardnessTwoConvert.java

@ -0,0 +1,34 @@
package com.win.module.lab.convert.hardnesstwo;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.win.module.lab.controller.hardnesstwo.vo.*;
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO;
/**
* 实验室-韦氏硬度2 Convert
*
* @author 超级管理员
*/
@Mapper
public interface HardnessTwoConvert {
HardnessTwoConvert INSTANCE = Mappers.getMapper(HardnessTwoConvert.class);
HardnessTwoDO convert(HardnessTwoCreateReqVO bean);
HardnessTwoDO convert(HardnessTwoUpdateReqVO bean);
HardnessTwoRespVO convert(HardnessTwoDO bean);
List<HardnessTwoRespVO> convertList(List<HardnessTwoDO> list);
PageResult<HardnessTwoRespVO> convertPage(PageResult<HardnessTwoDO> page);
List<HardnessTwoExcelVO> convertList02(List<HardnessTwoDO> list);
}

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/convert/platscale/PlatscaleConvert.java

@ -30,6 +30,8 @@ public interface PlatscaleConvert {
List<PlatscaleRespVO> convertList(List<PlatscaleDO> list); List<PlatscaleRespVO> convertList(List<PlatscaleDO> list);
List<PlatscaleDO> convertList2(List<PlatScaleDTO> list);
PageResult<PlatscaleRespVO> convertPage(PageResult<PlatscaleDO> page); PageResult<PlatscaleRespVO> convertPage(PageResult<PlatscaleDO> page);
List<PlatscaleExcelVO> convertList02(List<PlatscaleDO> list); List<PlatscaleExcelVO> convertList02(List<PlatscaleDO> list);

49
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/asyncoprlog/AsyncOprLogDO.java

@ -0,0 +1,49 @@
package com.win.module.lab.dal.dataobject.asyncoprlog;
import lombok.*;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.*;
import com.win.framework.mybatis.core.dataobject.BaseDO;
/**
* 实验室-主动同步日志 DO
*
* @author 超级管理员
*/
@TableName("lab_async_opr_log")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AsyncOprLogDO extends BaseDO {
/**
* 主键自增
*/
@TableId
private Long id;
/**
* 业务类型
*/
private String busType;
/**
* 操作类型
*/
private String oprType;
/**
* 操作结果
*/
private String oprResult;
/**
* 描述
*/
private String oprMsg;
/**
* 业务日期
*/
private LocalDate busDate;
}

74
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/hardnessthree/HardnessThreeDO.java

@ -0,0 +1,74 @@
package com.win.module.lab.dal.dataobject.hardnessthree;
import lombok.*;
import com.baomidou.mybatisplus.annotation.*;
import com.win.framework.mybatis.core.dataobject.BaseDO;
/**
* 实验室-布氏硬度 DO
*
* @author 超级管理员
*/
@TableName("lab_hardness_three")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HardnessThreeDO extends BaseDO {
/**
* 主键自增
*/
@TableId
private Long id;
/**
* 批次号
*/
private String batchNo;
/**
* 送样单位
*/
private String sydw;
/**
* 硬度
*/
private String standard;
/**
* 材质
*/
private String cz;
/**
* 规格
*/
private String guig;
/**
* 实验人
*/
private String testUser;
/**
* 实验日期
*/
private String testDate;
/**
* 实验力(KN)
*/
private String syl;
/**
* 压头尺寸(mm)
*/
private String ytcc;
/**
* 压痕直径(mm)
*/
private String yhzj;
/**
* 硬度
*/
private String testYd;
/**
* 审核状态
*/
private String auditStatus;
}

78
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/dataobject/hardnesstwo/HardnessTwoDO.java

@ -0,0 +1,78 @@
package com.win.module.lab.dal.dataobject.hardnesstwo;
import lombok.*;
import com.baomidou.mybatisplus.annotation.*;
import com.win.framework.mybatis.core.dataobject.BaseDO;
/**
* 实验室-韦氏硬度2 DO
*
* @author 超级管理员
*/
@TableName("lab_hardness_two")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HardnessTwoDO extends BaseDO {
/**
* 主键自增
*/
@TableId
private Long id;
/**
* 批次号
*/
private String batchNo;
/**
* 送样单位
*/
private String sydw;
/**
* 标准
*/
private String standard;
/**
* 材质
*/
private String cz;
/**
* 规格
*/
private String guig;
/**
* 实验人
*/
private String testUser;
/**
* 实验日期
*/
private String testDate;
/**
* 类别
*/
private String testType;
/**
* d1(um)
*/
private String dfirst;
/**
* d2(um)
*/
private String dtwo;
/**
* 平均(um)
*/
private String davg;
/**
* 硬度
*/
private String testYd;
/**
* 审核状态
*/
private String auditStatus;
}

42
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/asyncoprlog/AsyncOprLogMapper.java

@ -0,0 +1,42 @@
package com.win.module.lab.dal.mysql.asyncoprlog;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
import org.apache.ibatis.annotations.Mapper;
import com.win.module.lab.controller.asyncoprlog.vo.*;
/**
* 实验室-主动同步日志 Mapper
*
* @author 超级管理员
*/
@Mapper
public interface AsyncOprLogMapper extends BaseMapperX<AsyncOprLogDO> {
default PageResult<AsyncOprLogDO> selectPage(AsyncOprLogPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AsyncOprLogDO>()
.eqIfPresent(AsyncOprLogDO::getBusType, reqVO.getBusType())
.eqIfPresent(AsyncOprLogDO::getOprType, reqVO.getOprType())
.eqIfPresent(AsyncOprLogDO::getOprResult, reqVO.getOprResult())
.eqIfPresent(AsyncOprLogDO::getOprMsg, reqVO.getOprMsg())
.betweenIfPresent(AsyncOprLogDO::getBusDate, reqVO.getBusDate())
.betweenIfPresent(AsyncOprLogDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AsyncOprLogDO::getId));
}
default List<AsyncOprLogDO> selectList(AsyncOprLogExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<AsyncOprLogDO>()
.eqIfPresent(AsyncOprLogDO::getBusType, reqVO.getBusType())
.eqIfPresent(AsyncOprLogDO::getOprType, reqVO.getOprType())
.eqIfPresent(AsyncOprLogDO::getOprResult, reqVO.getOprResult())
.eqIfPresent(AsyncOprLogDO::getOprMsg, reqVO.getOprMsg())
.betweenIfPresent(AsyncOprLogDO::getBusDate, reqVO.getBusDate())
.betweenIfPresent(AsyncOprLogDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AsyncOprLogDO::getId));
}
}

56
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/hardnessthree/HardnessThreeMapper.java

@ -0,0 +1,56 @@
package com.win.module.lab.dal.mysql.hardnessthree;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO;
import org.apache.ibatis.annotations.Mapper;
import com.win.module.lab.controller.hardnessthree.vo.*;
/**
* 实验室-布氏硬度 Mapper
*
* @author 超级管理员
*/
@Mapper
public interface HardnessThreeMapper extends BaseMapperX<HardnessThreeDO> {
default PageResult<HardnessThreeDO> selectPage(HardnessThreePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<HardnessThreeDO>()
.eqIfPresent(HardnessThreeDO::getBatchNo, reqVO.getBatchNo())
.eqIfPresent(HardnessThreeDO::getSydw, reqVO.getSydw())
.eqIfPresent(HardnessThreeDO::getStandard, reqVO.getStandard())
.eqIfPresent(HardnessThreeDO::getCz, reqVO.getCz())
.eqIfPresent(HardnessThreeDO::getGuig, reqVO.getGuig())
.eqIfPresent(HardnessThreeDO::getTestUser, reqVO.getTestUser())
.betweenIfPresent(HardnessThreeDO::getTestDate, reqVO.getTestDate())
.eqIfPresent(HardnessThreeDO::getSyl, reqVO.getSyl())
.eqIfPresent(HardnessThreeDO::getYtcc, reqVO.getYtcc())
.eqIfPresent(HardnessThreeDO::getYhzj, reqVO.getYhzj())
.eqIfPresent(HardnessThreeDO::getTestYd, reqVO.getTestYd())
.betweenIfPresent(HardnessThreeDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(HardnessThreeDO::getAuditStatus, reqVO.getAuditStatus())
.orderByDesc(HardnessThreeDO::getId));
}
default List<HardnessThreeDO> selectList(HardnessThreeExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<HardnessThreeDO>()
.eqIfPresent(HardnessThreeDO::getBatchNo, reqVO.getBatchNo())
.eqIfPresent(HardnessThreeDO::getSydw, reqVO.getSydw())
.eqIfPresent(HardnessThreeDO::getStandard, reqVO.getStandard())
.eqIfPresent(HardnessThreeDO::getCz, reqVO.getCz())
.eqIfPresent(HardnessThreeDO::getGuig, reqVO.getGuig())
.eqIfPresent(HardnessThreeDO::getTestUser, reqVO.getTestUser())
.betweenIfPresent(HardnessThreeDO::getTestDate, reqVO.getTestDate())
.eqIfPresent(HardnessThreeDO::getSyl, reqVO.getSyl())
.eqIfPresent(HardnessThreeDO::getYtcc, reqVO.getYtcc())
.eqIfPresent(HardnessThreeDO::getYhzj, reqVO.getYhzj())
.eqIfPresent(HardnessThreeDO::getTestYd, reqVO.getTestYd())
.betweenIfPresent(HardnessThreeDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(HardnessThreeDO::getAuditStatus, reqVO.getAuditStatus())
.orderByDesc(HardnessThreeDO::getId));
}
}

58
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/hardnesstwo/HardnessTwoMapper.java

@ -0,0 +1,58 @@
package com.win.module.lab.dal.mysql.hardnesstwo;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO;
import org.apache.ibatis.annotations.Mapper;
import com.win.module.lab.controller.hardnesstwo.vo.*;
/**
* 实验室-韦氏硬度2 Mapper
*
* @author 超级管理员
*/
@Mapper
public interface HardnessTwoMapper extends BaseMapperX<HardnessTwoDO> {
default PageResult<HardnessTwoDO> selectPage(HardnessTwoPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<HardnessTwoDO>()
.eqIfPresent(HardnessTwoDO::getBatchNo, reqVO.getBatchNo())
.eqIfPresent(HardnessTwoDO::getSydw, reqVO.getSydw())
.eqIfPresent(HardnessTwoDO::getStandard, reqVO.getStandard())
.eqIfPresent(HardnessTwoDO::getCz, reqVO.getCz())
.eqIfPresent(HardnessTwoDO::getGuig, reqVO.getGuig())
.eqIfPresent(HardnessTwoDO::getTestUser, reqVO.getTestUser())
.betweenIfPresent(HardnessTwoDO::getTestDate, reqVO.getTestDate())
.eqIfPresent(HardnessTwoDO::getTestType, reqVO.getTestType())
.eqIfPresent(HardnessTwoDO::getDfirst, reqVO.getDfirst())
.eqIfPresent(HardnessTwoDO::getDtwo, reqVO.getDtwo())
.eqIfPresent(HardnessTwoDO::getDavg, reqVO.getDavg())
.eqIfPresent(HardnessTwoDO::getTestYd, reqVO.getTestYd())
.betweenIfPresent(HardnessTwoDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(HardnessTwoDO::getAuditStatus, reqVO.getAuditStatus())
.orderByDesc(HardnessTwoDO::getId));
}
default List<HardnessTwoDO> selectList(HardnessTwoExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<HardnessTwoDO>()
.eqIfPresent(HardnessTwoDO::getBatchNo, reqVO.getBatchNo())
.eqIfPresent(HardnessTwoDO::getSydw, reqVO.getSydw())
.eqIfPresent(HardnessTwoDO::getStandard, reqVO.getStandard())
.eqIfPresent(HardnessTwoDO::getCz, reqVO.getCz())
.eqIfPresent(HardnessTwoDO::getGuig, reqVO.getGuig())
.eqIfPresent(HardnessTwoDO::getTestUser, reqVO.getTestUser())
.betweenIfPresent(HardnessTwoDO::getTestDate, reqVO.getTestDate())
.eqIfPresent(HardnessTwoDO::getTestType, reqVO.getTestType())
.eqIfPresent(HardnessTwoDO::getDfirst, reqVO.getDfirst())
.eqIfPresent(HardnessTwoDO::getDtwo, reqVO.getDtwo())
.eqIfPresent(HardnessTwoDO::getDavg, reqVO.getDavg())
.eqIfPresent(HardnessTwoDO::getTestYd, reqVO.getTestYd())
.betweenIfPresent(HardnessTwoDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(HardnessTwoDO::getAuditStatus, reqVO.getAuditStatus())
.orderByDesc(HardnessTwoDO::getId));
}
}

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/impact/ImpactMapper.java

@ -17,6 +17,8 @@ import com.win.module.lab.controller.impact.vo.*;
@Mapper @Mapper
public interface ImpactMapper extends BaseMapperX<ImpactDO> { public interface ImpactMapper extends BaseMapperX<ImpactDO> {
public void deleteByBusDate(String busDate);
default PageResult<ImpactDO> selectPage(ImpactPageReqVO reqVO) { default PageResult<ImpactDO> selectPage(ImpactPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ImpactDO>() return selectPage(reqVO, new LambdaQueryWrapperX<ImpactDO>()
.eqIfPresent(ImpactDO::getDataId, reqVO.getDataId()) .eqIfPresent(ImpactDO::getDataId, reqVO.getDataId())

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/platscale/PlatscaleMapper.java

@ -17,6 +17,8 @@ import com.win.module.lab.controller.platscale.vo.*;
@Mapper @Mapper
public interface PlatscaleMapper extends BaseMapperX<PlatscaleDO> { public interface PlatscaleMapper extends BaseMapperX<PlatscaleDO> {
public void deleteByBusDate(String busDate);
default PageResult<PlatscaleDO> selectPage(PlatscalePageReqVO reqVO) { default PageResult<PlatscaleDO> selectPage(PlatscalePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<PlatscaleDO>() return selectPage(reqVO, new LambdaQueryWrapperX<PlatscaleDO>()
.eqIfPresent(PlatscaleDO::getCh, reqVO.getCh()) .eqIfPresent(PlatscaleDO::getCh, reqVO.getCh())

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/spectrum/SpectrumMapper.java

@ -16,6 +16,8 @@ import com.win.module.lab.controller.spectrum.vo.*;
@Mapper @Mapper
public interface SpectrumMapper extends BaseMapperX<SpectrumDO>{ public interface SpectrumMapper extends BaseMapperX<SpectrumDO>{
public void deleteByBusDate(String busDate);
default PageResult<SpectrumDO> selectPage(SpectrumPageReqVO reqVO) { default PageResult<SpectrumDO> selectPage(SpectrumPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<SpectrumDO>() return selectPage(reqVO, new LambdaQueryWrapperX<SpectrumDO>()
.eqIfPresent(SpectrumDO::getBatchNo, reqVO.getBatchNo()) .eqIfPresent(SpectrumDO::getBatchNo, reqVO.getBatchNo())

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthousandnew/StretchThousandnewMapper.java

@ -17,6 +17,8 @@ import com.win.module.lab.controller.stretchthousandnew.vo.*;
@Mapper @Mapper
public interface StretchThousandnewMapper extends BaseMapperX<StretchThousandnewDO> { public interface StretchThousandnewMapper extends BaseMapperX<StretchThousandnewDO> {
public void deleteByBusDate(String busDate);
default PageResult<StretchThousandnewDO> selectPage(StretchThousandnewPageReqVO reqVO) { default PageResult<StretchThousandnewDO> selectPage(StretchThousandnewPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<StretchThousandnewDO>() return selectPage(reqVO, new LambdaQueryWrapperX<StretchThousandnewDO>()
.eqIfPresent(StretchThousandnewDO::getQxId, reqVO.getQxId()) .eqIfPresent(StretchThousandnewDO::getQxId, reqVO.getQxId())

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthousandqx/StretchThousandQxMapper.java

@ -17,6 +17,8 @@ import com.win.module.lab.controller.stretchthousandqx.vo.*;
@Mapper @Mapper
public interface StretchThousandQxMapper extends BaseMapperX<StretchThousandQxDO>{ public interface StretchThousandQxMapper extends BaseMapperX<StretchThousandQxDO>{
public void deleteByBusDate(String busDate);
default PageResult<StretchThousandQxDO> selectPage(StretchThousandQxPageReqVO reqVO) { default PageResult<StretchThousandQxDO> selectPage(StretchThousandQxPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<StretchThousandQxDO>() return selectPage(reqVO, new LambdaQueryWrapperX<StretchThousandQxDO>()
.eqIfPresent(StretchThousandQxDO::getQxId, reqVO.getQxId()) .eqIfPresent(StretchThousandQxDO::getQxId, reqVO.getQxId())

2
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthreehundred/StretchThreeHundredMapper.java

@ -18,6 +18,8 @@ import java.util.List;
@Mapper @Mapper
public interface StretchThreeHundredMapper extends BaseMapperX<StretchThreeHundredDO> { public interface StretchThreeHundredMapper extends BaseMapperX<StretchThreeHundredDO> {
public void deleteByBusDate(String busDate);
default PageResult<StretchThreeHundredDO> selectPage(StretchThreeHundredPageReqVO reqVO) { default PageResult<StretchThreeHundredDO> selectPage(StretchThreeHundredPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<StretchThreeHundredDO>() return selectPage(reqVO, new LambdaQueryWrapperX<StretchThreeHundredDO>()
.eqIfPresent(StretchThreeHundredDO::getSyid, reqVO.getSyid()) .eqIfPresent(StretchThreeHundredDO::getSyid, reqVO.getSyid())

1
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/dal/mysql/stretchthreehundredqx/StretchThreeHundredQxMapper.java

@ -15,6 +15,7 @@ public interface StretchThreeHundredQxMapper extends BaseMapperX<StretchThreeHun
public List<StretchThreeHundredQxDO> selectListForQx(String syzbh); public List<StretchThreeHundredQxDO> selectListForQx(String syzbh);
public void deleteByBusDate(String busDate);
default PageResult<StretchThreeHundredQxDO> selectPage(StretchThreeHundredQxPageReqVO reqVO) { default PageResult<StretchThreeHundredQxDO> selectPage(StretchThreeHundredQxPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<StretchThreeHundredQxDO>() return selectPage(reqVO, new LambdaQueryWrapperX<StretchThreeHundredQxDO>()

79
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/asyncoprlog/AsyncOprLogService.java

@ -0,0 +1,79 @@
package com.win.module.lab.service.asyncoprlog;
import java.util.*;
import javax.validation.*;
import com.win.module.lab.controller.asyncoprlog.vo.*;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
import com.win.framework.common.pojo.PageResult;
/**
* 实验室-主动同步日志 Service 接口
*
* @author 超级管理员
*/
public interface AsyncOprLogService {
/**
* 创建实验室-主动同步日志
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createAsyncOprLog(@Valid AsyncOprLogCreateReqVO createReqVO);
/**
* 更新实验室-主动同步日志
*
* @param updateReqVO 更新信息
*/
void updateAsyncOprLog(@Valid AsyncOprLogUpdateReqVO updateReqVO);
/**
* 删除实验室-主动同步日志
*
* @param id 编号
*/
void deleteAsyncOprLog(Long id);
/**
* 获得实验室-主动同步日志
*
* @param id 编号
* @return 实验室-主动同步日志
*/
AsyncOprLogDO getAsyncOprLog(Long id);
/**
* 获得实验室-主动同步日志列表
*
* @param ids 编号
* @return 实验室-主动同步日志列表
*/
List<AsyncOprLogDO> getAsyncOprLogList(Collection<Long> ids);
/**
* 获得实验室-主动同步日志分页
*
* @param pageReqVO 分页查询
* @return 实验室-主动同步日志分页
*/
PageResult<AsyncOprLogDO> getAsyncOprLogPage(AsyncOprLogPageReqVO pageReqVO);
/**
* 获得实验室-主动同步日志列表, 用于 Excel 导出
*
* @param exportReqVO 查询条件
* @return 实验室-主动同步日志列表
*/
List<AsyncOprLogDO> getAsyncOprLogList(AsyncOprLogExportReqVO exportReqVO);
/**
* 导入实验室-主动同步日志主信息
*
* @param datas 导入实验室-主动同步日志主信息列表
* @param mode 导入模式1更新2追加3覆盖
* @param updatePart 是否支持更新
* @return 导入结果
*/
public List<AsyncOprLogExcelVO> importAsyncOprLogList(List<AsyncOprLogExcelVO> datas, Integer mode, boolean updatePart);
}

107
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/asyncoprlog/AsyncOprLogServiceImpl.java

@ -0,0 +1,107 @@
package com.win.module.lab.service.asyncoprlog;
import com.win.module.lab.enums.ErrorCodeEnum;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.module.lab.controller.asyncoprlog.vo.*;
import com.win.module.lab.dal.dataobject.asyncoprlog.AsyncOprLogDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.lab.convert.asyncoprlog.AsyncOprLogConvert;
import com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 实验室-主动同步日志 Service 实现类
*
* @author 超级管理员
*/
@Service
@Validated
public class AsyncOprLogServiceImpl implements AsyncOprLogService {
@Resource
private AsyncOprLogMapper asyncOprLogMapper;
@Override
public Long createAsyncOprLog(AsyncOprLogCreateReqVO createReqVO) {
// 插入
AsyncOprLogDO asyncOprLog = AsyncOprLogConvert.INSTANCE.convert(createReqVO);
asyncOprLogMapper.insert(asyncOprLog);
// 返回
return asyncOprLog.getId();
}
@Override
public void updateAsyncOprLog(AsyncOprLogUpdateReqVO updateReqVO) {
// 校验存在
validateAsyncOprLogExists(updateReqVO.getId());
// 更新
AsyncOprLogDO updateObj = AsyncOprLogConvert.INSTANCE.convert(updateReqVO);
asyncOprLogMapper.updateById(updateObj);
}
@Override
public void deleteAsyncOprLog(Long id) {
// 校验存在
validateAsyncOprLogExists(id);
// 删除
asyncOprLogMapper.deleteById(id);
}
private void validateAsyncOprLogExists(Long id) {
if (asyncOprLogMapper.selectById(id) == null) {
throw exception(ErrorCodeEnum.ASYNC_OPR_LOG_NOT_EXISTS.getCode() , ErrorCodeEnum.ASYNC_OPR_LOG_NOT_EXISTS.getLabel());
}
}
@Override
public AsyncOprLogDO getAsyncOprLog(Long id) {
return asyncOprLogMapper.selectById(id);
}
@Override
public List<AsyncOprLogDO> getAsyncOprLogList(Collection<Long> ids) {
return asyncOprLogMapper.selectBatchIds(ids);
}
@Override
public PageResult<AsyncOprLogDO> getAsyncOprLogPage(AsyncOprLogPageReqVO pageReqVO) {
return asyncOprLogMapper.selectPage(pageReqVO);
}
@Override
public List<AsyncOprLogDO> getAsyncOprLogList(AsyncOprLogExportReqVO exportReqVO) {
return asyncOprLogMapper.selectList(exportReqVO);
}
@Override
public List<AsyncOprLogExcelVO> importAsyncOprLogList(List<AsyncOprLogExcelVO> datas, Integer mode, boolean updatePart) {
// if (CollUtil.isEmpty(datas)) {
// throw exception(ASYNC_OPR_LOG_IMPORT_LIST_IS_EMPTY);
// }
List<AsyncOprLogExcelVO> errorList = new ArrayList<>();
// datas.forEach(item -> {
// if(errorList == null){
// // 判断如果不存在,在进行插入
// AsyncOprLogDO obj = asyncOprLogMapper.selectByCode(item.getCode());
// if (obj == null&& mode != 3) {
// asyncOprLogMapper.insert(AsyncOprLogConvert.INSTANCE.convert(item));
// }
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
// AsyncOprLogDO asyncOprLogDO = AsyncOprLogConvert.INSTANCE.convert(item);
// asyncOprLogDO.setId(obj.getId());
// asyncOprLogMapper.updateById(obj);
// }
// }
// });
return errorList;
}
}

79
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnessthree/HardnessThreeService.java

@ -0,0 +1,79 @@
package com.win.module.lab.service.hardnessthree;
import java.util.*;
import javax.validation.*;
import com.win.module.lab.controller.hardnessthree.vo.*;
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO;
import com.win.framework.common.pojo.PageResult;
/**
* 实验室-布氏硬度 Service 接口
*
* @author 超级管理员
*/
public interface HardnessThreeService {
/**
* 创建实验室-布氏硬度
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createHardnessThree(@Valid HardnessThreeCreateReqVO createReqVO);
/**
* 更新实验室-布氏硬度
*
* @param updateReqVO 更新信息
*/
void updateHardnessThree(@Valid HardnessThreeUpdateReqVO updateReqVO);
/**
* 删除实验室-布氏硬度
*
* @param id 编号
*/
void deleteHardnessThree(Long id);
/**
* 获得实验室-布氏硬度
*
* @param id 编号
* @return 实验室-布氏硬度
*/
HardnessThreeDO getHardnessThree(Long id);
/**
* 获得实验室-布氏硬度列表
*
* @param ids 编号
* @return 实验室-布氏硬度列表
*/
List<HardnessThreeDO> getHardnessThreeList(Collection<Long> ids);
/**
* 获得实验室-布氏硬度分页
*
* @param pageReqVO 分页查询
* @return 实验室-布氏硬度分页
*/
PageResult<HardnessThreeDO> getHardnessThreePage(HardnessThreePageReqVO pageReqVO);
/**
* 获得实验室-布氏硬度列表, 用于 Excel 导出
*
* @param exportReqVO 查询条件
* @return 实验室-布氏硬度列表
*/
List<HardnessThreeDO> getHardnessThreeList(HardnessThreeExportReqVO exportReqVO);
/**
* 导入实验室-布氏硬度主信息
*
* @param datas 导入实验室-布氏硬度主信息列表
* @param mode 导入模式1更新2追加3覆盖
* @param updatePart 是否支持更新
* @return 导入结果
*/
public List<HardnessThreeExcelVO> importHardnessThreeList(List<HardnessThreeExcelVO> datas, Integer mode, boolean updatePart);
}

106
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnessthree/HardnessThreeServiceImpl.java

@ -0,0 +1,106 @@
package com.win.module.lab.service.hardnessthree;
import com.win.module.lab.enums.ErrorCodeEnum;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.module.lab.controller.hardnessthree.vo.*;
import com.win.module.lab.dal.dataobject.hardnessthree.HardnessThreeDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.lab.convert.hardnessthree.HardnessThreeConvert;
import com.win.module.lab.dal.mysql.hardnessthree.HardnessThreeMapper;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 实验室-布氏硬度 Service 实现类
*
* @author 超级管理员
*/
@Service
@Validated
public class HardnessThreeServiceImpl implements HardnessThreeService {
@Resource
private HardnessThreeMapper hardnessThreeMapper;
@Override
public Long createHardnessThree(HardnessThreeCreateReqVO createReqVO) {
// 插入
HardnessThreeDO hardnessThree = HardnessThreeConvert.INSTANCE.convert(createReqVO);
hardnessThreeMapper.insert(hardnessThree);
// 返回
return hardnessThree.getId();
}
@Override
public void updateHardnessThree(HardnessThreeUpdateReqVO updateReqVO) {
// 校验存在
validateHardnessThreeExists(updateReqVO.getId());
// 更新
HardnessThreeDO updateObj = HardnessThreeConvert.INSTANCE.convert(updateReqVO);
hardnessThreeMapper.updateById(updateObj);
}
@Override
public void deleteHardnessThree(Long id) {
// 校验存在
validateHardnessThreeExists(id);
// 删除
hardnessThreeMapper.deleteById(id);
}
private void validateHardnessThreeExists(Long id) {
if (hardnessThreeMapper.selectById(id) == null) {
throw exception(ErrorCodeEnum.HARDNESS_THREE_NOT_EXISTS.getCode() , ErrorCodeEnum.HARDNESS_THREE_NOT_EXISTS.getLabel());
}
}
@Override
public HardnessThreeDO getHardnessThree(Long id) {
return hardnessThreeMapper.selectById(id);
}
@Override
public List<HardnessThreeDO> getHardnessThreeList(Collection<Long> ids) {
return hardnessThreeMapper.selectBatchIds(ids);
}
@Override
public PageResult<HardnessThreeDO> getHardnessThreePage(HardnessThreePageReqVO pageReqVO) {
return hardnessThreeMapper.selectPage(pageReqVO);
}
@Override
public List<HardnessThreeDO> getHardnessThreeList(HardnessThreeExportReqVO exportReqVO) {
return hardnessThreeMapper.selectList(exportReqVO);
}
@Override
public List<HardnessThreeExcelVO> importHardnessThreeList(List<HardnessThreeExcelVO> datas, Integer mode, boolean updatePart) {
// if (CollUtil.isEmpty(datas)) {
// throw exception(HARDNESS_THREE_IMPORT_LIST_IS_EMPTY);
// }
List<HardnessThreeExcelVO> errorList = new ArrayList<>();
// datas.forEach(item -> {
// if(errorList == null){
// // 判断如果不存在,在进行插入
// HardnessThreeDO obj = hardnessThreeMapper.selectByCode(item.getCode());
// if (obj == null&& mode != 3) {
// hardnessThreeMapper.insert(HardnessThreeConvert.INSTANCE.convert(item));
// }
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
// HardnessThreeDO hardnessThreeDO = HardnessThreeConvert.INSTANCE.convert(item);
// hardnessThreeDO.setId(obj.getId());
// hardnessThreeMapper.updateById(obj);
// }
// }
// });
return errorList;
}
}

79
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnesstwo/HardnessTwoService.java

@ -0,0 +1,79 @@
package com.win.module.lab.service.hardnesstwo;
import java.util.*;
import javax.validation.*;
import com.win.module.lab.controller.hardnesstwo.vo.*;
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO;
import com.win.framework.common.pojo.PageResult;
/**
* 实验室-韦氏硬度2 Service 接口
*
* @author 超级管理员
*/
public interface HardnessTwoService {
/**
* 创建实验室-韦氏硬度2
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createHardnessTwo(@Valid HardnessTwoCreateReqVO createReqVO);
/**
* 更新实验室-韦氏硬度2
*
* @param updateReqVO 更新信息
*/
void updateHardnessTwo(@Valid HardnessTwoUpdateReqVO updateReqVO);
/**
* 删除实验室-韦氏硬度2
*
* @param id 编号
*/
void deleteHardnessTwo(Long id);
/**
* 获得实验室-韦氏硬度2
*
* @param id 编号
* @return 实验室-韦氏硬度2
*/
HardnessTwoDO getHardnessTwo(Long id);
/**
* 获得实验室-韦氏硬度2列表
*
* @param ids 编号
* @return 实验室-韦氏硬度2列表
*/
List<HardnessTwoDO> getHardnessTwoList(Collection<Long> ids);
/**
* 获得实验室-韦氏硬度2分页
*
* @param pageReqVO 分页查询
* @return 实验室-韦氏硬度2分页
*/
PageResult<HardnessTwoDO> getHardnessTwoPage(HardnessTwoPageReqVO pageReqVO);
/**
* 获得实验室-韦氏硬度2列表, 用于 Excel 导出
*
* @param exportReqVO 查询条件
* @return 实验室-韦氏硬度2列表
*/
List<HardnessTwoDO> getHardnessTwoList(HardnessTwoExportReqVO exportReqVO);
/**
* 导入实验室-韦氏硬度2主信息
*
* @param datas 导入实验室-韦氏硬度2主信息列表
* @param mode 导入模式1更新2追加3覆盖
* @param updatePart 是否支持更新
* @return 导入结果
*/
public List<HardnessTwoExcelVO> importHardnessTwoList(List<HardnessTwoExcelVO> datas, Integer mode, boolean updatePart);
}

107
win-module-lab/win-module-lab-biz/src/main/java/com/win/module/lab/service/hardnesstwo/HardnessTwoServiceImpl.java

@ -0,0 +1,107 @@
package com.win.module.lab.service.hardnesstwo;
import com.win.module.lab.enums.ErrorCodeEnum;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.module.lab.controller.hardnesstwo.vo.*;
import com.win.module.lab.dal.dataobject.hardnesstwo.HardnessTwoDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.lab.convert.hardnesstwo.HardnessTwoConvert;
import com.win.module.lab.dal.mysql.hardnesstwo.HardnessTwoMapper;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 实验室-韦氏硬度2 Service 实现类
*
* @author 超级管理员
*/
@Service
@Validated
public class HardnessTwoServiceImpl implements HardnessTwoService {
@Resource
private HardnessTwoMapper hardnessTwoMapper;
@Override
public Long createHardnessTwo(HardnessTwoCreateReqVO createReqVO) {
// 插入
HardnessTwoDO hardnessTwo = HardnessTwoConvert.INSTANCE.convert(createReqVO);
hardnessTwoMapper.insert(hardnessTwo);
// 返回
return hardnessTwo.getId();
}
@Override
public void updateHardnessTwo(HardnessTwoUpdateReqVO updateReqVO) {
// 校验存在
validateHardnessTwoExists(updateReqVO.getId());
// 更新
HardnessTwoDO updateObj = HardnessTwoConvert.INSTANCE.convert(updateReqVO);
hardnessTwoMapper.updateById(updateObj);
}
@Override
public void deleteHardnessTwo(Long id) {
// 校验存在
validateHardnessTwoExists(id);
// 删除
hardnessTwoMapper.deleteById(id);
}
private void validateHardnessTwoExists(Long id) {
if (hardnessTwoMapper.selectById(id) == null) {
throw exception(ErrorCodeEnum.HARDNESS_TWO_NOT_EXISTS.getCode() , ErrorCodeEnum.HARDNESS_TWO_NOT_EXISTS.getLabel());
}
}
@Override
public HardnessTwoDO getHardnessTwo(Long id) {
return hardnessTwoMapper.selectById(id);
}
@Override
public List<HardnessTwoDO> getHardnessTwoList(Collection<Long> ids) {
return hardnessTwoMapper.selectBatchIds(ids);
}
@Override
public PageResult<HardnessTwoDO> getHardnessTwoPage(HardnessTwoPageReqVO pageReqVO) {
return hardnessTwoMapper.selectPage(pageReqVO);
}
@Override
public List<HardnessTwoDO> getHardnessTwoList(HardnessTwoExportReqVO exportReqVO) {
return hardnessTwoMapper.selectList(exportReqVO);
}
@Override
public List<HardnessTwoExcelVO> importHardnessTwoList(List<HardnessTwoExcelVO> datas, Integer mode, boolean updatePart) {
// if (CollUtil.isEmpty(datas)) {
// throw exception(HARDNESS_TWO_IMPORT_LIST_IS_EMPTY);
// }
List<HardnessTwoExcelVO> errorList = new ArrayList<>();
// datas.forEach(item -> {
// if(errorList == null){
// // 判断如果不存在,在进行插入
// HardnessTwoDO obj = hardnessTwoMapper.selectByCode(item.getCode());
// if (obj == null&& mode != 3) {
// hardnessTwoMapper.insert(HardnessTwoConvert.INSTANCE.convert(item));
// }
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
// HardnessTwoDO hardnessTwoDO = HardnessTwoConvert.INSTANCE.convert(item);
// hardnessTwoDO.setId(obj.getId());
// hardnessTwoMapper.updateById(obj);
// }
// }
// });
return errorList;
}
}

12
win-module-lab/win-module-lab-biz/src/main/resources/mapper/asyncoprlog/AsyncOprLogMapper.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.asyncoprlog.AsyncOprLogMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

12
win-module-lab/win-module-lab-biz/src/main/resources/mapper/hardnessthree/HardnessThreeMapper.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.hardnessthree.HardnessThreeMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

12
win-module-lab/win-module-lab-biz/src/main/resources/mapper/hardnesstwo/HardnessTwoMapper.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.hardnesstwo.HardnessTwoMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

4
win-module-lab/win-module-lab-biz/src/main/resources/mapper/impact/ImpactMapper.xml

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.impact.ImpactMapper"> <mapper namespace="com.win.module.lab.dal.mysql.impact.ImpactMapper">
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_impact where DATE_FORMAT(create_time , '%Y%m%d') = #{busDate}
</delete>
</mapper> </mapper>

9
win-module-lab/win-module-lab-biz/src/main/resources/mapper/platscale/PlatscaleMapper.xml

@ -2,11 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.platscale.PlatscaleMapper"> <mapper namespace="com.win.module.lab.dal.mysql.platscale.PlatscaleMapper">
<!-- <delete id="deleteByBusDate" parameterType="java.lang.String">
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 delete from lab_platscale where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 </delete>
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper> </mapper>

4
win-module-lab/win-module-lab-biz/src/main/resources/mapper/spectrum/SpectrumMapper.xml

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.spectrum.SpectrumMapper"> <mapper namespace="com.win.module.lab.dal.mysql.spectrum.SpectrumMapper">
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_spectrum where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
</delete>
</mapper> </mapper>

4
win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthousandnew/StretchThousandnewMapper.xml

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.stretchthousandnew.StretchThousandnewMapper"> <mapper namespace="com.win.module.lab.dal.mysql.stretchthousandnew.StretchThousandnewMapper">
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_stretch_thousandnew where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
</delete>
</mapper> </mapper>

9
win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthousandqx/StretchThousandQxMapper.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.stretchthousandqx.StretchThousandQxMapper">
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_stretch_1000_qx where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
</delete>
</mapper>

4
win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthreehundred/StretchThreeHundredMapper.xml

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.win.module.lab.dal.mysql.stretchthreehundred.StretchThreeHundredMapper"> <mapper namespace="com.win.module.lab.dal.mysql.stretchthreehundred.StretchThreeHundredMapper">
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_stretch_300 where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
</delete>
</mapper> </mapper>

4
win-module-lab/win-module-lab-biz/src/main/resources/mapper/stretchthreehundred/StretchThreeHundredQxMapper.xml

@ -14,4 +14,8 @@
order by t.id order by t.id
</select> </select>
<delete id="deleteByBusDate" parameterType="java.lang.String">
delete from lab_stretch_300_qx where DATE_FORMAT(create_time , '%Y-%m-%d') = #{busDate}
</delete>
</mapper> </mapper>

18
win-module-pszc/pom.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>win</artifactId>
<groupId>com.win</groupId>
<version>3.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>win-module-pszc</artifactId>
<packaging>pom</packaging>
<modules>
<module>win-module-pszc-api</module>
<module>win-module-pszc-biz</module>
</modules>
</project>

29
win-module-pszc/win-module-pszc-api/pom.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>win-module-pszc</artifactId>
<groupId>com.win</groupId>
<version>3.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>win-module-pszc-api</artifactId>
<dependencies>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-common</artifactId>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

41
win-module-pszc/win-module-pszc-api/src/main/java/com/win/module/pszc/enums/PszcErrorCode.java

@ -0,0 +1,41 @@
package com.win.module.pszc.enums;
public enum PszcErrorCode {
PS_ELECTRICDATA_NOT_EXISTS(5001 , "智能电表数据不存在"),
PS_ELECTRICDATA_IMPORT_LIST_IS_EMPTY(5002 , "导入智能电表数据不存在"),
PS_IREALDATA_NOT_EXISTS(5003 , "一次主表数据不存在"),
PS_IREALDATA_IMPORT_LIST_IS_EMPTY(5004 , "导入一次主表数据不存在"),
PS_PUMPDATA_NOT_EXISTS(5005 , "泵站数据不存在"),
PS_PUMPDATA_IMPORT_LIST_IS_EMPTY(5006 , "导入泵站数据不存在");
private Integer code;
private String label;
PszcErrorCode(Integer code , String label) {
this.code = code;
this.label = label;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

96
win-module-pszc/win-module-pszc-biz/pom.xml

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>win-module-pszc</artifactId>
<groupId>com.win</groupId>
<version>3.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>win-module-pszc-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-module-pszc-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-biz-operatelog</artifactId>
</dependency>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-biz-dict</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-redis</artifactId>
</dependency>
<!-- Job 定时任务相关 -->
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-job</artifactId>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-captcha</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>com.win</groupId>
<artifactId>win-spring-boot-starter-job</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies>
</project>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save