فهرست منبع

Merge branch 'master' of https://git.steerinfo.com/XTEMS/xt-ems-api

# Conflicts:
#	src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.xml
#	src/main/java/com/steerinfo/ems/dzmaterialsf/model/DzMaterialSf.java
#	src/main/java/com/steerinfo/ems/dzmaterialsf/service/impl/DzMaterialSfServiceImpl.java
#	src/main/java/com/steerinfo/ems/emsscqklg/service/EmsLgReportService.java
#	src/main/java/com/steerinfo/ems/emsscqklg/service/impl/EmsScqkLgServiceImpl.java
#	src/main/java/com/steerinfo/ems/rttable/service/impl/RttableServiceImpl.java
QuietShadow 3 سال پیش
والد
کامیت
fb98340d87
56فایلهای تغییر یافته به همراه4889 افزوده شده و 1842 حذف شده
  1. 2 2
      pom.xml
  2. 103 103
      src/main/java/com/steerinfo/ems/dzmaterialsf/controller/DzMaterialSfController.java
  3. 12 12
      src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.java
  4. 21 21
      src/main/java/com/steerinfo/ems/dzmaterialsf/service/DzMaterialSFDBServer.java
  5. 23 23
      src/main/java/com/steerinfo/ems/dzmaterialsf/service/IDzMaterialSfService.java
  6. 115 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/controller/EmsCalorificValueController.java
  7. 17 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/mapper/EmsCalorificValueMapper.java
  8. 589 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/mapper/EmsCalorificValueMapper.xml
  9. 317 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/model/EmsCalorificValue.java
  10. 28 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/service/IEmsCalorificValueService.java
  11. 50 0
      src/main/java/com/steerinfo/ems/emscalorificvalue/service/impl/EmsCalorificValueServiceImpl.java
  12. 5 1
      src/main/java/com/steerinfo/ems/emsgmpcjh/controller/EmsGmPcJhController.java
  13. 24 16
      src/main/java/com/steerinfo/ems/emsgmpcjh/mapper/EmsGmPcJhMapper.xml
  14. 3 0
      src/main/java/com/steerinfo/ems/emsgmpcjh/service/IEmsGmPcJhService.java
  15. 53 0
      src/main/java/com/steerinfo/ems/emsgmpcjh/service/impl/EmsGmPcJhServiceImpl.java
  16. 110 0
      src/main/java/com/steerinfo/ems/emslog/controller/EmsLogController.java
  17. 10 0
      src/main/java/com/steerinfo/ems/emslog/mapper/EmsLogMapper.java
  18. 212 0
      src/main/java/com/steerinfo/ems/emslog/mapper/EmsLogMapper.xml
  19. 97 0
      src/main/java/com/steerinfo/ems/emslog/model/EmsLog.java
  20. 23 0
      src/main/java/com/steerinfo/ems/emslog/service/IEmsLogService.java
  21. 36 0
      src/main/java/com/steerinfo/ems/emslog/service/impl/EmsLogServiceImpl.java
  22. 0 1
      src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.java
  23. 1 0
      src/main/java/com/steerinfo/ems/emsprodplanmonth/service/IEmsProdplanMonthService.java
  24. 47 15
      src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java
  25. 2 0
      src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.java
  26. 11 4
      src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.xml
  27. 11 1
      src/main/java/com/steerinfo/ems/emsprodplanround/model/EmsProdplanRound.java
  28. 2 0
      src/main/java/com/steerinfo/ems/emsprodplanround/service/IEmsProdplanRoundService.java
  29. 5 0
      src/main/java/com/steerinfo/ems/emsprodplanround/service/impl/EmsProdplanRoundServiceImpl.java
  30. 107 107
      src/main/java/com/steerinfo/ems/emsscqklg/controller/EmsScqkLgController.java
  31. 10 10
      src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.java
  32. 594 594
      src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.xml
  33. 333 333
      src/main/java/com/steerinfo/ems/emsscqklg/model/EmsScqkLg.java
  34. 23 23
      src/main/java/com/steerinfo/ems/emsscqklg/service/IEmsScqkLgService.java
  35. 131 0
      src/main/java/com/steerinfo/ems/foldthevalues/controller/FoldTheValuesController.java
  36. 20 0
      src/main/java/com/steerinfo/ems/foldthevalues/mapper/FoldTheValuesMapper.java
  37. 356 0
      src/main/java/com/steerinfo/ems/foldthevalues/mapper/FoldTheValuesMapper.xml
  38. 181 0
      src/main/java/com/steerinfo/ems/foldthevalues/model/FoldTheValues.java
  39. 32 0
      src/main/java/com/steerinfo/ems/foldthevalues/service/IFoldTheValuesService.java
  40. 114 0
      src/main/java/com/steerinfo/ems/foldthevalues/service/impl/FoldTheValuesServiceImpl.java
  41. 110 0
      src/main/java/com/steerinfo/ems/njformula/controller/NjFormulaController.java
  42. 13 0
      src/main/java/com/steerinfo/ems/njformula/mapper/NjFormulaMapper.java
  43. 192 0
      src/main/java/com/steerinfo/ems/njformula/mapper/NjFormulaMapper.xml
  44. 81 0
      src/main/java/com/steerinfo/ems/njformula/model/NjFormula.java
  45. 26 0
      src/main/java/com/steerinfo/ems/njformula/service/INjFormulaService.java
  46. 41 0
      src/main/java/com/steerinfo/ems/njformula/service/impl/NjFormulaServiceImpl.java
  47. 108 108
      src/main/java/com/steerinfo/ems/rttable/controller/RttableController.java
  48. 18 18
      src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.java
  49. 283 283
      src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.xml
  50. 127 127
      src/main/java/com/steerinfo/ems/rttable/model/Rttable.java
  51. 26 26
      src/main/java/com/steerinfo/ems/rttable/service/IRttableService.java
  52. 5 2
      src/main/java/com/steerinfo/ems/tcm0316/mapper/TCm0316Mapper.xml
  53. 7 0
      src/main/java/com/steerinfo/ems/trmcalpoint/controller/TRmCalpointController.java
  54. 2 2
      src/main/java/com/steerinfo/ems/trmcalpoint/mapper/TRmCalpointMapper.xml
  55. 1 1
      src/main/java/com/steerinfo/ems/trmenergy/controller/TRmEnergyController.java
  56. 19 9
      src/main/java/com/steerinfo/task/SpringCronTask.java

+ 2 - 2
pom.xml

@@ -214,9 +214,9 @@
 <!--						DEDICATED) (SERVICE_NAME = zngk) ))</connUrl>-->
 <!--				  <user>ems</user>-->
 <!--				  <password>123456</password>-->
-<!--				  <targetPackage>com.steerinfo.ems</targetPackage>-->
+<!--				  <targetPackage>com.steerinfo.job</targetPackage>-->
 <!--				  <tables>-->
-<!--					<param>ZB_VALUE</param>-->
+<!--					<param>ems_job</param>-->
 <!--				  </tables>-->
 <!--				</configuration>-->
 <!--				<executions>-->

+ 103 - 103
src/main/java/com/steerinfo/ems/dzmaterialsf/controller/DzMaterialSfController.java

@@ -1,104 +1,104 @@
-package com.steerinfo.ems.dzmaterialsf.controller;
-
-import com.steerinfo.framework.controller.BaseRESTfulController;
-import com.steerinfo.framework.controller.RESTfulResult;
-import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
-import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
-import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.math.BigDecimal;
-
-/**
- * DzMaterialSf RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-16 08:57
- * 类描述
- * 修订历史:
- * 日期:2021-10-16
- * 作者:generator
- * 参考:
- * 描述:DzMaterialSf RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-@RestController
-@RequestMapping("/${api.version}/dzmaterialsfs")
-public class DzMaterialSfController extends BaseRESTfulController {
-
-    @Autowired
-    IDzMaterialSfService dzMaterialSfService;
-
-    @ApiOperation(value="获取列表", notes="分页查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("dzmaterialsf:view")
-    @GetMapping(value = "/")
-    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<DzMaterialSf> list = dzMaterialSfService.queryForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-
-    @ApiOperation(value="获取列表", notes="分页模糊查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("dzmaterialsf:view")
-    @GetMapping(value = "/like/")
-    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<DzMaterialSf> list = dzMaterialSfService.queryLikeForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-    
-    @ApiOperation(value="创建", notes="根据DzMaterialSf对象创建")
-    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
-    //@RequiresPermissions("dzmaterialsf:create")
-    @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute DzMaterialSf model){
-        DzMaterialSf dzMaterialSf = dzMaterialSfService.add(model);
-        return success(dzMaterialSf);
-    }
-
-    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
-    @ApiImplicitParam(name = "model", value = "详细实体dzMaterialSf的id值", required = true, dataType = "DzMaterialSf")
-    //@RequiresPermissions("dzmaterialsf:view")
-    @GetMapping(value = "/getById")
-    public RESTfulResult get(@ModelAttribute DzMaterialSf model){
-        DzMaterialSf dzMaterialSf = dzMaterialSfService.getById(model);
-        return success(dzMaterialSf);
-    }
-
-    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dzMaterialSf信息来更新详细信息")
-    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
-    //@RequiresPermissions("dzmaterialsf:update")
-    @PutMapping(value = "/", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult update(@RequestBody DzMaterialSf model){
-        DzMaterialSf dzMaterialSf = dzMaterialSfService.modify(model);
-        return success(dzMaterialSf);
-    }
-
-    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
-    @ApiImplicitParam(name = "models", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
-    //@RequiresPermissions("dzmaterialsf:delete")
-    @DeleteMapping(value = "/")//DzMaterialSf
-    public RESTfulResult delete(@RequestBody List<DzMaterialSf> models){
-    	if(ListUtils.isNotEmpty(models)) {
-			  dzMaterialSfService.delete(models);
-    	}
-      return success();
-    }
+package com.steerinfo.ems.dzmaterialsf.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * DzMaterialSf RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-16 08:57
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-16
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dzmaterialsfs")
+public class DzMaterialSfController extends BaseRESTfulController {
+
+    @Autowired
+    IDzMaterialSfService dzMaterialSfService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dzmaterialsf:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DzMaterialSf> list = dzMaterialSfService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dzmaterialsf:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DzMaterialSf> list = dzMaterialSfService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DzMaterialSf对象创建")
+    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.add(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(name = "model", value = "详细实体dzMaterialSf的id值", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:view")
+    @GetMapping(value = "/getById")
+    public RESTfulResult get(@ModelAttribute DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.getById(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dzMaterialSf信息来更新详细信息")
+    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:update")
+    @PutMapping(value = "/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@RequestBody DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.modify(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(name = "models", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:delete")
+    @DeleteMapping(value = "/")//DzMaterialSf
+    public RESTfulResult delete(@RequestBody List<DzMaterialSf> models){
+    	if(ListUtils.isNotEmpty(models)) {
+			  dzMaterialSfService.delete(models);
+    	}
+      return success();
+    }
 }

+ 12 - 12
src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.java

@@ -1,13 +1,13 @@
-package com.steerinfo.ems.dzmaterialsf.mapper;
-
-import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
-import com.steerinfo.framework.mapper.ICBaseMapper;
-import java.math.*;
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface DzMaterialSfMapper extends ICBaseMapper<DzMaterialSf, String> {
-    List<DzMaterialSf> getDzMaterialSf(String gbsj);
+package com.steerinfo.ems.dzmaterialsf.mapper;
+
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.framework.mapper.ICBaseMapper;
+import java.math.*;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DzMaterialSfMapper extends ICBaseMapper<DzMaterialSf, String> {
+    List<DzMaterialSf> getDzMaterialSf(String gbsj);
 }

+ 21 - 21
src/main/java/com/steerinfo/ems/dzmaterialsf/service/DzMaterialSFDBServer.java

@@ -1,21 +1,21 @@
-package com.steerinfo.ems.dzmaterialsf.service;
-
-import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import java.util.List;
-
-/**
- * @author Shadow
- * @create 2021-10-15 18:11
- * @project xt-ems-api-new
- */
-@FeignClient(value = "xt-ems-datasource")
-@Component
-public interface DzMaterialSFDBServer {
-
-    @GetMapping("v1/dematerialSfDb/getDzMaterialSf")
-    public List<DzMaterialSf> getDzMaterialSf();
-}
+package com.steerinfo.ems.dzmaterialsf.service;
+
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+
+import java.util.List;
+
+/**
+ * @author Shadow
+ * @create 2021-10-15 18:11
+ * @project xt-ems-api-new
+ */
+@FeignClient(value = "xt-ems-datasource")
+@Component
+public interface DzMaterialSFDBServer {
+
+    @GetMapping("v1/dematerialSfDb/getDzMaterialSf")
+    public List<DzMaterialSf> getDzMaterialSf();
+}

+ 23 - 23
src/main/java/com/steerinfo/ems/dzmaterialsf/service/IDzMaterialSfService.java

@@ -1,24 +1,24 @@
-package com.steerinfo.ems.dzmaterialsf.service;
-
-import com.steerinfo.framework.service.ICBaseService;
-import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
-import java.util.Date;
-import java.math.BigDecimal;
-
-/**
- * DzMaterialSf服务接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-16 08:57
- * 类描述
- * 修订历史:
- * 日期:2021-10-16
- * 作者:generator
- * 参考:
- * 描述:DzMaterialSf服务接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-public interface IDzMaterialSfService extends ICBaseService<DzMaterialSf, String>{
-
-    int dataGeneration();
+package com.steerinfo.ems.dzmaterialsf.service;
+
+import com.steerinfo.framework.service.ICBaseService;
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DzMaterialSf服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-16 08:57
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-16
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDzMaterialSfService extends ICBaseService<DzMaterialSf, String>{
+
+    int dataGeneration();
 }

+ 115 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/controller/EmsCalorificValueController.java

@@ -0,0 +1,115 @@
+package com.steerinfo.ems.emscalorificvalue.controller;
+
+import com.steerinfo.ems.emscalorificvalue.mapper.EmsCalorificValueMapper;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue;
+import com.steerinfo.ems.emscalorificvalue.service.IEmsCalorificValueService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * EmsCalorificValue RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 08:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:EmsCalorificValue RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emscalorificvalues")
+public class EmsCalorificValueController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsCalorificValueService emsCalorificValueService;
+    @Autowired
+    EmsCalorificValueMapper emsCalorificValueMapper;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emscalorificvalue:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsCalorificValue> list = emsCalorificValueService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emscalorificvalue:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsCalorificValue> list = emsCalorificValueService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsCalorificValue对象创建")
+    @ApiImplicitParam(name = "emsCalorificValue", value = "详细实体emsCalorificValue", required = true, dataType = "EmsCalorificValue")
+    //@RequiresPermissions("emscalorificvalue:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody EmsCalorificValue[] model){
+        for (EmsCalorificValue emsCalorificValue : model) {
+            emsCalorificValueMapper.insert(emsCalorificValue);
+        }
+         return success();
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emscalorificvalue:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        EmsCalorificValue emsCalorificValue = emsCalorificValueService.getById(id);
+        return success(emsCalorificValue);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsCalorificValue信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "emsCalorificValue", value = "详细实体emsCalorificValue", required = true, dataType = "EmsCalorificValue")
+    })
+    //@RequiresPermissions("emscalorificvalue:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody EmsCalorificValue model){
+        model.setId(id);
+        EmsCalorificValue emsCalorificValue = emsCalorificValueService.modify(model);
+        return success(emsCalorificValue);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emscalorificvalue:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  emsCalorificValueService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 17 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/mapper/EmsCalorificValueMapper.java

@@ -0,0 +1,17 @@
+package com.steerinfo.ems.emscalorificvalue.mapper;
+
+import com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EmsCalorificValueMapper extends IBaseMapper<EmsCalorificValue, String> {
+    public List<EmsCalorificValue> getNewDate();
+    //获取每个能介的检验值
+    public String getValue(HashMap<String,Object> hashMap);
+}

+ 589 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/mapper/EmsCalorificValueMapper.xml

@@ -0,0 +1,589 @@
+<?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.steerinfo.ems.emscalorificvalue.mapper.EmsCalorificValueMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
+    <id column="WTBH" jdbcType="VARCHAR" property="wtbh" />
+    <result column="SAMPLETYPE" jdbcType="VARCHAR" property="sampletype" />
+    <result column="MATERIALNO" jdbcType="VARCHAR" property="materialno" />
+    <result column="MATERIALNAME" jdbcType="VARCHAR" property="materialname" />
+    <result column="MATERIALSOURCE" jdbcType="VARCHAR" property="materialsource" />
+    <result column="SAMPLETIME" jdbcType="TIMESTAMP" property="sampletime" />
+    <result column="SAMPLEPERSON" jdbcType="VARCHAR" property="sampleperson" />
+    <result column="SENDTIME" jdbcType="TIMESTAMP" property="sendtime" />
+    <result column="SENDER" jdbcType="VARCHAR" property="sender" />
+    <result column="JUDGERESULT" jdbcType="VARCHAR" property="judgeresult" />
+    <result column="JUDGETIME" jdbcType="TIMESTAMP" property="judgetime" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="SAMPLENO" jdbcType="VARCHAR" property="sampleno" />
+    <result column="ITEMCODE" jdbcType="VARCHAR" property="itemcode" />
+    <result column="ITEM" jdbcType="VARCHAR" property="item" />
+    <result column="TESTRESULT" jdbcType="VARCHAR" property="testresult" />
+    <result column="ITEMJUDGERESULT" jdbcType="VARCHAR" property="itemjudgeresult" />
+    <result column="RECORDER" jdbcType="VARCHAR" property="recorder" />
+    <result column="INPUTTIME" jdbcType="TIMESTAMP" property="inputtime" />
+  </resultMap>
+  <sql id="columns">
+    WTBH, SAMPLETYPE, MATERIALNO, MATERIALNAME, MATERIALSOURCE, SAMPLETIME, SAMPLEPERSON, 
+    SENDTIME, SENDER, JUDGERESULT, JUDGETIME, MEMO, SAMPLENO, ITEMCODE, ITEM, TESTRESULT, 
+    ITEMJUDGERESULT, RECORDER, INPUTTIME
+  </sql>
+  <sql id="columns_alias">
+    t.WTBH, t.SAMPLETYPE, t.MATERIALNO, t.MATERIALNAME, t.MATERIALSOURCE, t.SAMPLETIME, 
+    t.SAMPLEPERSON, t.SENDTIME, t.SENDER, t.JUDGERESULT, t.JUDGETIME, t.MEMO, t.SAMPLENO, 
+    t.ITEMCODE, t.ITEM, t.TESTRESULT, t.ITEMJUDGERESULT, t.RECORDER, t.INPUTTIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_CALORIFIC_VALUE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_CALORIFIC_VALUE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="wtbh != null and wtbh != ''">
+        and WTBH = #{wtbh}
+      </if>
+      <if test="sampletype != null and sampletype != ''">
+        and SAMPLETYPE = #{sampletype}
+      </if>
+      <if test="materialno != null and materialno != ''">
+        and MATERIALNO = #{materialno}
+      </if>
+      <if test="materialname != null and materialname != ''">
+        and MATERIALNAME = #{materialname}
+      </if>
+      <if test="materialsource != null and materialsource != ''">
+        and MATERIALSOURCE = #{materialsource}
+      </if>
+      <if test="sampletime != null">
+        and TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = #{sampletime}
+      </if>
+      <if test="sampleperson != null and sampleperson != ''">
+        and SAMPLEPERSON = #{sampleperson}
+      </if>
+      <if test="sendtime != null">
+        and TO_CHAR(SENDTIME,'yyyy-MM-dd') = #{sendtime}
+      </if>
+      <if test="sender != null and sender != ''">
+        and SENDER = #{sender}
+      </if>
+      <if test="judgeresult != null and judgeresult != ''">
+        and JUDGERESULT = #{judgeresult}
+      </if>
+      <if test="judgetime != null">
+        and TO_CHAR(JUDGETIME,'yyyy-MM-dd') = #{judgetime}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="sampleno != null and sampleno != ''">
+        and SAMPLENO = #{sampleno}
+      </if>
+      <if test="itemcode != null and itemcode != ''">
+        and ITEMCODE = #{itemcode}
+      </if>
+      <if test="item != null and item != ''">
+        and ITEM = #{item}
+      </if>
+      <if test="testresult != null and testresult != ''">
+        and TESTRESULT = #{testresult}
+      </if>
+      <if test="itemjudgeresult != null and itemjudgeresult != ''">
+        and ITEMJUDGERESULT = #{itemjudgeresult}
+      </if>
+      <if test="recorder != null and recorder != ''">
+        and RECORDER = #{recorder}
+      </if>
+      <if test="inputtime != null">
+        and TO_CHAR(INPUTTIME,'yyyy-MM-dd') = #{inputtime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="wtbh != null and wtbh != ''">
+        and WTBH LIKE '%${wtbh}%'
+      </if>
+      <if test="sampletype != null and sampletype != ''">
+        and SAMPLETYPE LIKE '%${sampletype}%'
+      </if>
+      <if test="materialno != null and materialno != ''">
+        and MATERIALNO LIKE '%${materialno}%'
+      </if>
+      <if test="materialname != null and materialname != ''">
+        and MATERIALNAME LIKE '%${materialname}%'
+      </if>
+      <if test="materialsource != null and materialsource != ''">
+        and MATERIALSOURCE LIKE '%${materialsource}%'
+      </if>
+      <if test="sampletime != null">
+        and TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = #{sampletime}
+      </if>
+      <if test="sampleperson != null and sampleperson != ''">
+        and SAMPLEPERSON LIKE '%${sampleperson}%'
+      </if>
+      <if test="sendtime != null">
+        and TO_CHAR(SENDTIME,'yyyy-MM-dd') = #{sendtime}
+      </if>
+      <if test="sender != null and sender != ''">
+        and SENDER LIKE '%${sender}%'
+      </if>
+      <if test="judgeresult != null and judgeresult != ''">
+        and JUDGERESULT LIKE '%${judgeresult}%'
+      </if>
+      <if test="judgetime != null">
+        and TO_CHAR(JUDGETIME,'yyyy-MM-dd') = #{judgetime}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="sampleno != null and sampleno != ''">
+        and SAMPLENO LIKE '%${sampleno}%'
+      </if>
+      <if test="itemcode != null and itemcode != ''">
+        and ITEMCODE LIKE '%${itemcode}%'
+      </if>
+      <if test="item != null and item != ''">
+        and ITEM LIKE '%${item}%'
+      </if>
+      <if test="testresult != null and testresult != ''">
+        and TESTRESULT LIKE '%${testresult}%'
+      </if>
+      <if test="itemjudgeresult != null and itemjudgeresult != ''">
+        and ITEMJUDGERESULT LIKE '%${itemjudgeresult}%'
+      </if>
+      <if test="recorder != null and recorder != ''">
+        and RECORDER LIKE '%${recorder}%'
+      </if>
+      <if test="inputtime != null">
+        and TO_CHAR(INPUTTIME,'yyyy-MM-dd') = #{inputtime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from EMS_CALORIFIC_VALUE
+    where WTBH = #{wtbh,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_CALORIFIC_VALUE
+    where 1!=1 
+      <if test="sampletype != null and sampletype != ''">
+        or SAMPLETYPE = #{sampletype}
+      </if>
+      <if test="materialno != null and materialno != ''">
+        or MATERIALNO = #{materialno}
+      </if>
+      <if test="materialname != null and materialname != ''">
+        or MATERIALNAME = #{materialname}
+      </if>
+      <if test="materialsource != null and materialsource != ''">
+        or MATERIALSOURCE = #{materialsource}
+      </if>
+      <if test="sampletime != null">
+        or TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = '#{sampletime}'
+      </if>
+      <if test="sampleperson != null and sampleperson != ''">
+        or SAMPLEPERSON = #{sampleperson}
+      </if>
+      <if test="sendtime != null">
+        or TO_CHAR(SENDTIME,'yyyy-MM-dd') = '#{sendtime}'
+      </if>
+      <if test="sender != null and sender != ''">
+        or SENDER = #{sender}
+      </if>
+      <if test="judgeresult != null and judgeresult != ''">
+        or JUDGERESULT = #{judgeresult}
+      </if>
+      <if test="judgetime != null">
+        or TO_CHAR(JUDGETIME,'yyyy-MM-dd') = '#{judgetime}'
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="sampleno != null and sampleno != ''">
+        or SAMPLENO = #{sampleno}
+      </if>
+      <if test="itemcode != null and itemcode != ''">
+        or ITEMCODE = #{itemcode}
+      </if>
+      <if test="item != null and item != ''">
+        or ITEM = #{item}
+      </if>
+      <if test="testresult != null and testresult != ''">
+        or TESTRESULT = #{testresult}
+      </if>
+      <if test="itemjudgeresult != null and itemjudgeresult != ''">
+        or ITEMJUDGERESULT = #{itemjudgeresult}
+      </if>
+      <if test="recorder != null and recorder != ''">
+        or RECORDER = #{recorder}
+      </if>
+      <if test="inputtime != null">
+        or TO_CHAR(INPUTTIME,'yyyy-MM-dd') = '#{inputtime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
+    insert into EMS_CALORIFIC_VALUE (WTBH, SAMPLETYPE, MATERIALNO, 
+      MATERIALNAME, MATERIALSOURCE, SAMPLETIME, 
+      SAMPLEPERSON, SENDTIME, SENDER, 
+      JUDGERESULT, JUDGETIME, MEMO, 
+      SAMPLENO, ITEMCODE, ITEM, 
+      TESTRESULT, ITEMJUDGERESULT, RECORDER, 
+      INPUTTIME)
+    values (#{wtbh,jdbcType=VARCHAR}, #{sampletype,jdbcType=VARCHAR}, #{materialno,jdbcType=VARCHAR}, 
+      #{materialname,jdbcType=VARCHAR}, #{materialsource,jdbcType=VARCHAR}, #{sampletime,jdbcType=TIMESTAMP}, 
+      #{sampleperson,jdbcType=VARCHAR}, #{sendtime,jdbcType=TIMESTAMP}, #{sender,jdbcType=VARCHAR}, 
+      #{judgeresult,jdbcType=VARCHAR}, #{judgetime,jdbcType=TIMESTAMP}, #{memo,jdbcType=VARCHAR}, 
+      #{sampleno,jdbcType=VARCHAR}, #{itemcode,jdbcType=VARCHAR}, #{item,jdbcType=VARCHAR}, 
+      #{testresult,jdbcType=VARCHAR}, #{itemjudgeresult,jdbcType=VARCHAR}, #{recorder,jdbcType=VARCHAR}, 
+      #{inputtime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
+    insert into EMS_CALORIFIC_VALUE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="wtbh != null">
+        WTBH,
+      </if>
+      <if test="sampletype != null">
+        SAMPLETYPE,
+      </if>
+      <if test="materialno != null">
+        MATERIALNO,
+      </if>
+      <if test="materialname != null">
+        MATERIALNAME,
+      </if>
+      <if test="materialsource != null">
+        MATERIALSOURCE,
+      </if>
+      <if test="sampletime != null">
+        SAMPLETIME,
+      </if>
+      <if test="sampleperson != null">
+        SAMPLEPERSON,
+      </if>
+      <if test="sendtime != null">
+        SENDTIME,
+      </if>
+      <if test="sender != null">
+        SENDER,
+      </if>
+      <if test="judgeresult != null">
+        JUDGERESULT,
+      </if>
+      <if test="judgetime != null">
+        JUDGETIME,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="sampleno != null">
+        SAMPLENO,
+      </if>
+      <if test="itemcode != null">
+        ITEMCODE,
+      </if>
+      <if test="item != null">
+        ITEM,
+      </if>
+      <if test="testresult != null">
+        TESTRESULT,
+      </if>
+      <if test="itemjudgeresult != null">
+        ITEMJUDGERESULT,
+      </if>
+      <if test="recorder != null">
+        RECORDER,
+      </if>
+      <if test="inputtime != null">
+        INPUTTIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="wtbh != null">
+        #{wtbh,jdbcType=VARCHAR},
+      </if>
+      <if test="sampletype != null">
+        #{sampletype,jdbcType=VARCHAR},
+      </if>
+      <if test="materialno != null">
+        #{materialno,jdbcType=VARCHAR},
+      </if>
+      <if test="materialname != null">
+        #{materialname,jdbcType=VARCHAR},
+      </if>
+      <if test="materialsource != null">
+        #{materialsource,jdbcType=VARCHAR},
+      </if>
+      <if test="sampletime != null">
+        #{sampletime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sampleperson != null">
+        #{sampleperson,jdbcType=VARCHAR},
+      </if>
+      <if test="sendtime != null">
+        #{sendtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sender != null">
+        #{sender,jdbcType=VARCHAR},
+      </if>
+      <if test="judgeresult != null">
+        #{judgeresult,jdbcType=VARCHAR},
+      </if>
+      <if test="judgetime != null">
+        #{judgetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleno != null">
+        #{sampleno,jdbcType=VARCHAR},
+      </if>
+      <if test="itemcode != null">
+        #{itemcode,jdbcType=VARCHAR},
+      </if>
+      <if test="item != null">
+        #{item,jdbcType=VARCHAR},
+      </if>
+      <if test="testresult != null">
+        #{testresult,jdbcType=VARCHAR},
+      </if>
+      <if test="itemjudgeresult != null">
+        #{itemjudgeresult,jdbcType=VARCHAR},
+      </if>
+      <if test="recorder != null">
+        #{recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="inputtime != null">
+        #{inputtime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
+    update EMS_CALORIFIC_VALUE
+    set SAMPLETYPE = #{sampletype,jdbcType=VARCHAR},
+      MATERIALNO = #{materialno,jdbcType=VARCHAR},
+      MATERIALNAME = #{materialname,jdbcType=VARCHAR},
+      MATERIALSOURCE = #{materialsource,jdbcType=VARCHAR},
+      SAMPLETIME = #{sampletime,jdbcType=TIMESTAMP},
+      SAMPLEPERSON = #{sampleperson,jdbcType=VARCHAR},
+      SENDTIME = #{sendtime,jdbcType=TIMESTAMP},
+      SENDER = #{sender,jdbcType=VARCHAR},
+      JUDGERESULT = #{judgeresult,jdbcType=VARCHAR},
+      JUDGETIME = #{judgetime,jdbcType=TIMESTAMP},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      SAMPLENO = #{sampleno,jdbcType=VARCHAR},
+      ITEMCODE = #{itemcode,jdbcType=VARCHAR},
+      ITEM = #{item,jdbcType=VARCHAR},
+      TESTRESULT = #{testresult,jdbcType=VARCHAR},
+      ITEMJUDGERESULT = #{itemjudgeresult,jdbcType=VARCHAR},
+      RECORDER = #{recorder,jdbcType=VARCHAR},
+      INPUTTIME = #{inputtime,jdbcType=TIMESTAMP}
+    where WTBH = #{wtbh,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
+    update EMS_CALORIFIC_VALUE
+    <set>
+      <if test="sampletype != null">
+        SAMPLETYPE = #{sampletype,jdbcType=VARCHAR},
+      </if>
+      <if test="materialno != null">
+        MATERIALNO = #{materialno,jdbcType=VARCHAR},
+      </if>
+      <if test="materialname != null">
+        MATERIALNAME = #{materialname,jdbcType=VARCHAR},
+      </if>
+      <if test="materialsource != null">
+        MATERIALSOURCE = #{materialsource,jdbcType=VARCHAR},
+      </if>
+      <if test="sampletime != null">
+        SAMPLETIME = #{sampletime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sampleperson != null">
+        SAMPLEPERSON = #{sampleperson,jdbcType=VARCHAR},
+      </if>
+      <if test="sendtime != null">
+        SENDTIME = #{sendtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sender != null">
+        SENDER = #{sender,jdbcType=VARCHAR},
+      </if>
+      <if test="judgeresult != null">
+        JUDGERESULT = #{judgeresult,jdbcType=VARCHAR},
+      </if>
+      <if test="judgetime != null">
+        JUDGETIME = #{judgetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleno != null">
+        SAMPLENO = #{sampleno,jdbcType=VARCHAR},
+      </if>
+      <if test="itemcode != null">
+        ITEMCODE = #{itemcode,jdbcType=VARCHAR},
+      </if>
+      <if test="item != null">
+        ITEM = #{item,jdbcType=VARCHAR},
+      </if>
+      <if test="testresult != null">
+        TESTRESULT = #{testresult,jdbcType=VARCHAR},
+      </if>
+      <if test="itemjudgeresult != null">
+        ITEMJUDGERESULT = #{itemjudgeresult,jdbcType=VARCHAR},
+      </if>
+      <if test="recorder != null">
+        RECORDER = #{recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="inputtime != null">
+        INPUTTIME = #{inputtime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where WTBH = #{wtbh,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where WTBH = #{wtbh,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_CALORIFIC_VALUE 
+      (WTBH, 
+      SAMPLETYPE, MATERIALNO, MATERIALNAME, 
+      MATERIALSOURCE, SAMPLETIME, 
+      SAMPLEPERSON, SENDTIME, SENDER, 
+      JUDGERESULT, JUDGETIME, MEMO, 
+      SAMPLENO, ITEMCODE, ITEM, 
+      TESTRESULT, ITEMJUDGERESULT, 
+      RECORDER, INPUTTIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.wtbh,jdbcType=VARCHAR}, 
+      #{item.sampletype,jdbcType=VARCHAR}, #{item.materialno,jdbcType=VARCHAR}, #{item.materialname,jdbcType=VARCHAR}, 
+      #{item.materialsource,jdbcType=VARCHAR}, #{item.sampletime,jdbcType=TIMESTAMP}, 
+      #{item.sampleperson,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=TIMESTAMP}, #{item.sender,jdbcType=VARCHAR}, 
+      #{item.judgeresult,jdbcType=VARCHAR}, #{item.judgetime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.sampleno,jdbcType=VARCHAR}, #{item.itemcode,jdbcType=VARCHAR}, #{item.item,jdbcType=VARCHAR}, 
+      #{item.testresult,jdbcType=VARCHAR}, #{item.itemjudgeresult,jdbcType=VARCHAR}, 
+      #{item.recorder,jdbcType=VARCHAR}, #{item.inputtime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_CALORIFIC_VALUE
+     set
+       WTBH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.wtbh,jdbcType=VARCHAR}
+       </foreach>
+       ,SAMPLETYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampletype,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALNO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialno,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialname,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALSOURCE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialsource,jdbcType=VARCHAR}
+       </foreach>
+       ,SAMPLETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampletime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,SAMPLEPERSON=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampleperson,jdbcType=VARCHAR}
+       </foreach>
+       ,SENDTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sendtime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,SENDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sender,jdbcType=VARCHAR}
+       </foreach>
+       ,JUDGERESULT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.judgeresult,jdbcType=VARCHAR}
+       </foreach>
+       ,JUDGETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.judgetime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,SAMPLENO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampleno,jdbcType=VARCHAR}
+       </foreach>
+       ,ITEMCODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.itemcode,jdbcType=VARCHAR}
+       </foreach>
+       ,ITEM=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.item,jdbcType=VARCHAR}
+       </foreach>
+       ,TESTRESULT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.testresult,jdbcType=VARCHAR}
+       </foreach>
+       ,ITEMJUDGERESULT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.itemjudgeresult,jdbcType=VARCHAR}
+       </foreach>
+       ,RECORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.recorder,jdbcType=VARCHAR}
+       </foreach>
+       ,INPUTTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
+          when #{item.wtbh,jdbcType=VARCHAR} then #{item.inputtime,jdbcType=TIMESTAMP}
+       </foreach>
+     where WTBH in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.wtbh,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_CALORIFIC_VALUE
+    where WTBH in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!--获取最新的数据-->
+  <select id="getNewDate"  resultMap="BaseResultMap">
+    select distinct t.wtbh, t.materialno, t.materialname, t.materialsource,substr(t.sampleno,0,8) as sampleno
+    from ems_calorific_value t
+    where
+    t.wtbh not in (select id from Fold_the_values )
+  </select>
+  <select id="getValue" parameterType="java.util.HashMap" resultType="java.lang.String">
+    select t.TESTRESULT from ems_calorific_value t
+    <where>
+      <if test="wtbh != null and wtbh != '' ">
+       and  t.wtbh = #{wtbh}
+      </if>
+      <if test="item != null and item != '' ">
+       and t.item = #{item}
+      </if>
+    </where>
+  </select>
+</mapper>

+ 317 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/model/EmsCalorificValue.java

@@ -0,0 +1,317 @@
+package com.steerinfo.ems.emscalorificvalue.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class EmsCalorificValue implements IBasePO<String> {
+    /**
+     * 检验编号(WTBH,VARCHAR,100)
+     */
+    @ApiModelProperty(value="检验编号",required=true)
+    private String wtbh;
+
+    /**
+     * 取样类型(SAMPLETYPE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="取样类型",required=false)
+    private String sampletype;
+
+    /**
+     * 物料编码(MATERIALNO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialno;
+
+    /**
+     * 物料名称(MATERIALNAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialname;
+
+    /**
+     * 物料来源(MATERIALSOURCE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料来源",required=false)
+    private String materialsource;
+
+    /**
+     * 取样时间(SAMPLETIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="取样时间",required=false)
+    private Date sampletime;
+
+    /**
+     * 取样人(SAMPLEPERSON,VARCHAR,40)
+     */
+    @ApiModelProperty(value="取样人",required=false)
+    private String sampleperson;
+
+    /**
+     * 送样时间(SENDTIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="送样时间",required=false)
+    private Date sendtime;
+
+    /**
+     * 送样人 (SENDER,VARCHAR,40)
+     */
+    @ApiModelProperty(value="送样人 ",required=false)
+    private String sender;
+
+    /**
+     * 判定结果(JUDGERESULT,VARCHAR,20)
+     */
+    @ApiModelProperty(value="判定结果",required=false)
+    private String judgeresult;
+
+    /**
+     * 判定时间(JUDGETIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="判定时间",required=false)
+    private Date judgetime;
+
+    /**
+     * 备注(MEMO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 样品编号(SAMPLENO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="样品编号",required=false)
+    private String sampleno;
+
+    /**
+     * 检验项目编号(ITEMCODE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="检验项目编号",required=false)
+    private String itemcode;
+
+    /**
+     * 检验项目(ITEM,VARCHAR,50)
+     */
+    @ApiModelProperty(value="检验项目",required=false)
+    private String item;
+
+    /**
+     * 检验结果(TESTRESULT,VARCHAR,50)
+     */
+    @ApiModelProperty(value="检验结果",required=false)
+    private String testresult;
+
+    /**
+     * 结果判定 (ITEMJUDGERESULT,VARCHAR,50)
+     */
+    @ApiModelProperty(value="结果判定 ",required=false)
+    private String itemjudgeresult;
+
+    /**
+     * 检验人 (RECORDER,VARCHAR,40)
+     */
+    @ApiModelProperty(value="检验人 ",required=false)
+    private String recorder;
+
+    /**
+     * 检验时间(INPUTTIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="检验时间",required=false)
+    private Date inputtime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.wtbh;
+    }
+
+    @Override
+    public void setId(String wtbh) {
+        this.wtbh = wtbh == null ? null : wtbh.trim();
+    }
+
+    public String getWtbh() {
+        return wtbh;
+    }
+
+    public void setWtbh(String wtbh) {
+        this.wtbh = wtbh == null ? null : wtbh.trim();
+    }
+
+    public String getSampletype() {
+        return sampletype;
+    }
+
+    public void setSampletype(String sampletype) {
+        this.sampletype = sampletype == null ? null : sampletype.trim();
+    }
+
+    public String getMaterialno() {
+        return materialno;
+    }
+
+    public void setMaterialno(String materialno) {
+        this.materialno = materialno == null ? null : materialno.trim();
+    }
+
+    public String getMaterialname() {
+        return materialname;
+    }
+
+    public void setMaterialname(String materialname) {
+        this.materialname = materialname == null ? null : materialname.trim();
+    }
+
+    public String getMaterialsource() {
+        return materialsource;
+    }
+
+    public void setMaterialsource(String materialsource) {
+        this.materialsource = materialsource == null ? null : materialsource.trim();
+    }
+
+    public Date getSampletime() {
+        return sampletime;
+    }
+
+    public void setSampletime(Date sampletime) {
+        this.sampletime = sampletime;
+    }
+
+    public String getSampleperson() {
+        return sampleperson;
+    }
+
+    public void setSampleperson(String sampleperson) {
+        this.sampleperson = sampleperson == null ? null : sampleperson.trim();
+    }
+
+    public Date getSendtime() {
+        return sendtime;
+    }
+
+    public void setSendtime(Date sendtime) {
+        this.sendtime = sendtime;
+    }
+
+    public String getSender() {
+        return sender;
+    }
+
+    public void setSender(String sender) {
+        this.sender = sender == null ? null : sender.trim();
+    }
+
+    public String getJudgeresult() {
+        return judgeresult;
+    }
+
+    public void setJudgeresult(String judgeresult) {
+        this.judgeresult = judgeresult == null ? null : judgeresult.trim();
+    }
+
+    public Date getJudgetime() {
+        return judgetime;
+    }
+
+    public void setJudgetime(Date judgetime) {
+        this.judgetime = judgetime;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getSampleno() {
+        return sampleno;
+    }
+
+    public void setSampleno(String sampleno) {
+        this.sampleno = sampleno == null ? null : sampleno.trim();
+    }
+
+    public String getItemcode() {
+        return itemcode;
+    }
+
+    public void setItemcode(String itemcode) {
+        this.itemcode = itemcode == null ? null : itemcode.trim();
+    }
+
+    public String getItem() {
+        return item;
+    }
+
+    public void setItem(String item) {
+        this.item = item == null ? null : item.trim();
+    }
+
+    public String getTestresult() {
+        return testresult;
+    }
+
+    public void setTestresult(String testresult) {
+        this.testresult = testresult == null ? null : testresult.trim();
+    }
+
+    public String getItemjudgeresult() {
+        return itemjudgeresult;
+    }
+
+    public void setItemjudgeresult(String itemjudgeresult) {
+        this.itemjudgeresult = itemjudgeresult == null ? null : itemjudgeresult.trim();
+    }
+
+    public String getRecorder() {
+        return recorder;
+    }
+
+    public void setRecorder(String recorder) {
+        this.recorder = recorder == null ? null : recorder.trim();
+    }
+
+    public Date getInputtime() {
+        return inputtime;
+    }
+
+    public void setInputtime(Date inputtime) {
+        this.inputtime = inputtime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", wtbh=").append(wtbh);
+        sb.append(", sampletype=").append(sampletype);
+        sb.append(", materialno=").append(materialno);
+        sb.append(", materialname=").append(materialname);
+        sb.append(", materialsource=").append(materialsource);
+        sb.append(", sampletime=").append(sampletime);
+        sb.append(", sampleperson=").append(sampleperson);
+        sb.append(", sendtime=").append(sendtime);
+        sb.append(", sender=").append(sender);
+        sb.append(", judgeresult=").append(judgeresult);
+        sb.append(", judgetime=").append(judgetime);
+        sb.append(", memo=").append(memo);
+        sb.append(", sampleno=").append(sampleno);
+        sb.append(", itemcode=").append(itemcode);
+        sb.append(", item=").append(item);
+        sb.append(", testresult=").append(testresult);
+        sb.append(", itemjudgeresult=").append(itemjudgeresult);
+        sb.append(", recorder=").append(recorder);
+        sb.append(", inputtime=").append(inputtime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 28 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/service/IEmsCalorificValueService.java

@@ -0,0 +1,28 @@
+package com.steerinfo.ems.emscalorificvalue.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * EmsCalorificValue服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 08:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:EmsCalorificValue服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsCalorificValueService extends IBaseService<EmsCalorificValue, String>{
+    public List<EmsCalorificValue> getNewDate();
+    //获取每个能介的检验值
+    public String getValue(HashMap<String,Object> hashMap);
+}

+ 50 - 0
src/main/java/com/steerinfo/ems/emscalorificvalue/service/impl/EmsCalorificValueServiceImpl.java

@@ -0,0 +1,50 @@
+package com.steerinfo.ems.emscalorificvalue.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue;
+import com.steerinfo.ems.emscalorificvalue.mapper.EmsCalorificValueMapper;
+import com.steerinfo.ems.emscalorificvalue.service.IEmsCalorificValueService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * EmsCalorificValue服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 08:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:EmsCalorificValue服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsCalorificValueService")
+public class EmsCalorificValueServiceImpl extends BaseServiceImpl<EmsCalorificValue, String> implements IEmsCalorificValueService {
+
+    @Autowired
+    private EmsCalorificValueMapper emsCalorificValueMapper;
+
+    @Override
+    protected IBaseMapper<EmsCalorificValue, String> getMapper() {
+        return emsCalorificValueMapper;
+    }
+
+
+    @Override
+    public List<EmsCalorificValue> getNewDate() {
+        return emsCalorificValueMapper.getNewDate();
+    }
+
+    @Override
+    public String getValue(HashMap<String, Object> hashMap) {
+        return emsCalorificValueMapper.getValue(hashMap);
+    }
+
+}

+ 5 - 1
src/main/java/com/steerinfo/ems/emsgmpcjh/controller/EmsGmPcJhController.java

@@ -22,6 +22,8 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -46,7 +48,6 @@ public class EmsGmPcJhController extends BaseRESTfulController {
     private static  final  String AT2006 = "G-G2-";
     private static  final  String AT2004 = "G-L1-";
     private static  final  String AT2007 = "G-X1-";
-
     @Autowired
     IEmsGmPcJhService emsGmPcJhService;
     @Autowired
@@ -106,6 +107,9 @@ public class EmsGmPcJhController extends BaseRESTfulController {
     //@RequiresPermissions("emsgmpcjh:create")
     @PostMapping(value = "/")
     public RESTfulResult add(@RequestBody EmsGmPcJh model){
+        if (model.getDeliveryDate().before(model.getJhTime())) {
+            return failed(null,"日期选择有误!!! 交货日期不应该在排产日期前面");
+        }
         String userId = JwtUtil.getUseridByToken();
         String yyyymmdd = DateUtils.dateStr(model.getJhTime(), "yyyyMMdd");
         model.setStartTime(yyyymmdd);

+ 24 - 16
src/main/java/com/steerinfo/ems/emsgmpcjh/mapper/EmsGmPcJhMapper.xml

@@ -746,24 +746,32 @@
   </update>
   <!--轮次计划页面查询-->
   <select id="getGmPcJhData" parameterType="java.util.HashMap" resultType="Map">
-    SELECT  ID as id , to_char(JH_TIME,'yyyy-mm-dd') as jhTime, STATE as state, GRADES as grades, SPECIFICATIONS as specifications, LENGTHS as lengths, CHEMICAL_STANDARD as chemicalstandard, SURFACE_STANDARD as surfacestandard,
+    select ID as id , to_char(JH_TIME,'yyyy-mm-dd') as jhTime, STATE as state, GRADES as grades, SPECIFICATIONS as specifications, LENGTHS as lengths, CHEMICAL_STANDARD as chemicalstandard, SURFACE_STANDARD as surfacestandard,
     WORKPROC_TYPE as workprocType, IATERAL_AREA as iateralArea,  LENGTH_TIMES_WIDTH as lengthtimeswidth, TRANSPORT_TYPE as transportType , RECEIVE_TIME as receivetime, CREATE_MAN as createman,
     CREATE_TIME as createtime, UPDATE_MAN as updateman, UPDATE_TIME as updatime , MEMO as memo , PURPOSE as purpose, UNITID as unitid, DIMENSION as dimension, PLAN_WEIGHT as planweight,KXF_WEIGHT,YXF_WEIGHT,TO_CHAR(DELIVERY_DATE,'yyyy-mm-dd') as deliveryDate
-    FROM
-    EMS_GM_PC_JH
-    <where>
-      <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
-        and  JH_TIME between to_date(#{startTime},'yyyy-mm-dd')  and to_date(#{endTime},'yyyy-mm-dd')
-      </if>
-      <if test="workprocType != null and workprocType!= '' ">
-        and WORKPROC_TYPE in (${workprocType})
-      </if>
-      <if test="id !=null and id != ''">
-       and ID= #{id}
-      </if>
-      and state in ('2','3')
-      order by jhTime,ID
-    </where>
+      from (select *
+              from ems_gm_pc_jh t
+              <where>
+                <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
+                  and  JH_TIME between to_date(#{startTime},'yyyy-mm-dd')  and to_date(#{endTime},'yyyy-mm-dd')
+                </if>
+              </where>
+            union
+            select *
+              from ems_gm_pc_jh
+            <where>
+              <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
+                and  JH_TIME between to_date(substr(#{startTime}, 0, 7) || '-01','yyyy-mm-dd')  and to_date(substr(#{endTime}, 0, 7) || '-01','yyyy-mm-dd')
+              </if>
+               and ID like 'N%'
+            </where>) t1
+            <where>
+              <if test="workprocType != null and workprocType!= ''">
+                and WORKPROC_TYPE in (${workprocType})
+              </if>
+                and state in ('2','3')
+            </where>
+       order by t1.id desc
   </select>
   <!--国贸计划查询-->
 <select id="getXsDdDate" parameterType="java.util.HashMap" resultType="Map">

+ 3 - 0
src/main/java/com/steerinfo/ems/emsgmpcjh/service/IEmsGmPcJhService.java

@@ -40,4 +40,7 @@ public interface IEmsGmPcJhService extends IBaseService<EmsGmPcJh, String>{
     PageList<Map<String, Object>>  getXsShData(HashMap<String, Object> parmas, Integer pageNum,
                                                Integer pageSize);
 
+    //每月自动生成内部计划
+    public void addNbjh();
+
 }

+ 53 - 0
src/main/java/com/steerinfo/ems/emsgmpcjh/service/impl/EmsGmPcJhServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.ems.emsgmpcjh.service.impl;
 
+import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.Utils.ExcelToolUtils;
 import com.steerinfo.ems.Utils.MarketSlmException;
 import com.steerinfo.ems.emsgmpcjh.mapper.EmsGmPcJhMapper;
@@ -20,6 +21,8 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.regex.Pattern;
@@ -387,4 +390,54 @@ public class EmsGmPcJhServiceImpl extends BaseServiceImpl<EmsGmPcJh, String> imp
         }
         return lists;
     }
+    //每个月自动生成内部计划
+    public void addNbjh(){
+        EmsGmPcJh emsGmPcJh = new EmsGmPcJh();
+        ArrayList<String> ls =  new ArrayList<>();
+        ls.add("N-G1-");
+        ls.add("N-G2-");
+        ls.add("N-X1-");
+        ls.add("N-L1-");
+        String s = DateUtils.dateStr(new Date(), "yyyy-MM-dd");
+        DateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            for (String l : ls) {
+                l+= DateUtils.dateStr(new Date(),"yyyyMM")+"00-00";
+                emsGmPcJh.setPlanWeight(new BigDecimal("99999"));
+                emsGmPcJh.setKxfWeight(new BigDecimal("99999"));
+                emsGmPcJh.setYxfWeight(new BigDecimal("0"));
+                emsGmPcJh.setWorkprocType(this.setWorkprocType(l));
+                emsGmPcJh.setJhTime(dateFormat1.parse(s));
+                emsGmPcJh.setId(l);
+                emsGmPcJh.setState("2");
+                emsGmPcJhMapper.insert(emsGmPcJh);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public String setWorkprocType(String str){
+        if (str.contains("N-G1-")){
+            return "AT2005";
+        }
+        if (str.contains("N-G2-")){
+            return "AT2006";
+        }
+        if (str.contains("N-X1-")) {
+            return "AT2007";
+        }
+        if (str.contains("N-L1-")) {
+            return "AT2004";
+        }
+        return null;
+    }
+
+    public static void main(String[] args) throws ParseException {
+//
+//        System.out.println(myDate1);
+        DateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
+        Date myDate1 = dateFormat1.parse("2009-06-01");
+        System.out.println(myDate1);
+    }
 }

+ 110 - 0
src/main/java/com/steerinfo/ems/emslog/controller/EmsLogController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.ems.emslog.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.emslog.model.EmsLog;
+import com.steerinfo.ems.emslog.service.IEmsLogService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * EmsLog RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-18 04:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-18
+ * 作者:generator
+ * 参考:
+ * 描述:EmsLog RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emslogs")
+public class EmsLogController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsLogService emsLogService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emslog:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsLog> list = emsLogService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emslog:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsLog> list = emsLogService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsLog对象创建")
+    @ApiImplicitParam(name = "emsLog", value = "详细实体emsLog", required = true, dataType = "EmsLog")
+    //@RequiresPermissions("emslog:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsLog model){
+        EmsLog emsLog = emsLogService.add(model);
+        return success(emsLog);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emslog:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        EmsLog emsLog = emsLogService.getById(id);
+        return success(emsLog);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsLog信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "emsLog", value = "详细实体emsLog", required = true, dataType = "EmsLog")
+    })
+    //@RequiresPermissions("emslog:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody EmsLog model){
+        model.setId(id);
+        EmsLog emsLog = emsLogService.modify(model);
+        return success(emsLog);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emslog:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  emsLogService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 10 - 0
src/main/java/com/steerinfo/ems/emslog/mapper/EmsLogMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.ems.emslog.mapper;
+
+import com.steerinfo.ems.emslog.model.EmsLog;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EmsLogMapper extends IBaseMapper<EmsLog, String> {
+}

+ 212 - 0
src/main/java/com/steerinfo/ems/emslog/mapper/EmsLogMapper.xml

@@ -0,0 +1,212 @@
+<?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.steerinfo.ems.emslog.mapper.EmsLogMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emslog.model.EmsLog">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="UPDATETABLE" jdbcType="VARCHAR" property="updatetable" />
+    <result column="CODE" jdbcType="VARCHAR" property="code" />
+    <result column="OPERATORTIME" jdbcType="TIMESTAMP" property="operatortime" />
+    <result column="OPERATOR" jdbcType="VARCHAR" property="operator" />
+  </resultMap>
+  <sql id="columns">
+    ID, UPDATETABLE, CODE, OPERATORTIME, OPERATOR
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.UPDATETABLE, t.CODE, t.OPERATORTIME, t.OPERATOR
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_LOG
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_LOG t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="updatetable != null and updatetable != ''">
+        and UPDATETABLE = #{updatetable}
+      </if>
+      <if test="code != null and code != ''">
+        and CODE = #{code}
+      </if>
+      <if test="operatortime != null">
+        and TO_CHAR(OPERATORTIME,'yyyy-MM-dd') = #{operatortime}
+      </if>
+      <if test="operator != null and operator != ''">
+        and OPERATOR = #{operator}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="updatetable != null and updatetable != ''">
+        and UPDATETABLE LIKE '%${updatetable}%'
+      </if>
+      <if test="code != null and code != ''">
+        and CODE LIKE '%${code}%'
+      </if>
+      <if test="operatortime != null">
+        and TO_CHAR(OPERATORTIME,'yyyy-MM-dd') = #{operatortime}
+      </if>
+      <if test="operator != null and operator != ''">
+        and OPERATOR LIKE '%${operator}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from EMS_LOG
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_LOG
+    where 1!=1 
+      <if test="updatetable != null and updatetable != ''">
+        or UPDATETABLE = #{updatetable}
+      </if>
+      <if test="code != null and code != ''">
+        or CODE = #{code}
+      </if>
+      <if test="operatortime != null">
+        or TO_CHAR(OPERATORTIME,'yyyy-MM-dd') = '#{operatortime}'
+      </if>
+      <if test="operator != null and operator != ''">
+        or OPERATOR = #{operator}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emslog.model.EmsLog">
+    insert into EMS_LOG (ID, UPDATETABLE, CODE, 
+      OPERATORTIME, OPERATOR)
+    values (#{id,jdbcType=VARCHAR}, #{updatetable,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
+      #{operatortime,jdbcType=TIMESTAMP}, #{operator,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emslog.model.EmsLog">
+    insert into EMS_LOG
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="updatetable != null">
+        UPDATETABLE,
+      </if>
+      <if test="code != null">
+        CODE,
+      </if>
+      <if test="operatortime != null">
+        OPERATORTIME,
+      </if>
+      <if test="operator != null">
+        OPERATOR,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetable != null">
+        #{updatetable,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="operatortime != null">
+        #{operatortime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="operator != null">
+        #{operator,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emslog.model.EmsLog">
+    update EMS_LOG
+    set UPDATETABLE = #{updatetable,jdbcType=VARCHAR},
+      CODE = #{code,jdbcType=VARCHAR},
+      OPERATORTIME = #{operatortime,jdbcType=TIMESTAMP},
+      OPERATOR = #{operator,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emslog.model.EmsLog">
+    update EMS_LOG
+    <set>
+      <if test="updatetable != null">
+        UPDATETABLE = #{updatetable,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        CODE = #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="operatortime != null">
+        OPERATORTIME = #{operatortime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="operator != null">
+        OPERATOR = #{operator,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_LOG 
+      (ID, 
+      UPDATETABLE, CODE, OPERATORTIME, 
+      OPERATOR)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.updatetable,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR}, #{item.operatortime,jdbcType=TIMESTAMP}, 
+      #{item.operator,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_LOG
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATETABLE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.updatetable,jdbcType=VARCHAR}
+       </foreach>
+       ,CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.code,jdbcType=VARCHAR}
+       </foreach>
+       ,OPERATORTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.operatortime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,OPERATOR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.operator,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_LOG
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 97 - 0
src/main/java/com/steerinfo/ems/emslog/model/EmsLog.java

@@ -0,0 +1,97 @@
+package com.steerinfo.ems.emslog.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+
+@ApiModel(value="系统操作日志表")
+public class EmsLog implements IBasePO<String> {
+    /**
+     * 主键(ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private String id;
+
+    /**
+     * 修改的表名(UPDATETABLE,VARCHAR,50)
+     */
+    @ApiModelProperty(value="修改的表名",required=false)
+    private String updatetable;
+
+    /**
+     * 修改内容(CODE,VARCHAR,1000)
+     */
+    @ApiModelProperty(value="修改内容",required=false)
+    private String code;
+
+    /**
+     * 操作人(OPERATORTIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="操作人",required=false)
+    private Date operatortime;
+
+    /**
+     * 操作时间(OPERATOR,VARCHAR,50)
+     */
+    @ApiModelProperty(value="操作时间",required=false)
+    private String operator;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getUpdatetable() {
+        return updatetable;
+    }
+
+    public void setUpdatetable(String updatetable) {
+        this.updatetable = updatetable == null ? null : updatetable.trim();
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    public Date getOperatortime() {
+        return operatortime;
+    }
+
+    public void setOperatortime(Date operatortime) {
+        this.operatortime = operatortime;
+    }
+
+    public String getOperator() {
+        return operator;
+    }
+
+    public void setOperator(String operator) {
+        this.operator = operator == null ? null : operator.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", updatetable=").append(updatetable);
+        sb.append(", code=").append(code);
+        sb.append(", operatortime=").append(operatortime);
+        sb.append(", operator=").append(operator);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/ems/emslog/service/IEmsLogService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.ems.emslog.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.emslog.model.EmsLog;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * EmsLog服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-18 04:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-18
+ * 作者:generator
+ * 参考:
+ * 描述:EmsLog服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsLogService extends IBaseService<EmsLog, String>{
+
+}

+ 36 - 0
src/main/java/com/steerinfo/ems/emslog/service/impl/EmsLogServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.ems.emslog.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.emslog.model.EmsLog;
+import com.steerinfo.ems.emslog.mapper.EmsLogMapper;
+import com.steerinfo.ems.emslog.service.IEmsLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * EmsLog服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-18 04:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-18
+ * 作者:generator
+ * 参考:
+ * 描述:EmsLog服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsLogService")
+public class EmsLogServiceImpl extends BaseServiceImpl<EmsLog, String> implements IEmsLogService {
+
+    @Autowired
+    private EmsLogMapper emsLogMapper;
+
+    @Override
+    protected IBaseMapper<EmsLog, String> getMapper() {
+        return emsLogMapper;
+    }
+}

+ 0 - 1
src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.java

@@ -19,7 +19,6 @@ public interface EmsProdplanMonthMapper extends IBaseMapper<EmsProdplanMonth, St
     List<Map<String, Object>> getDateLc(HashMap<String,Object> parmas);
 
     EmsProdplanMonth getBymayAndWorkprocid(HashMap<String,Object> parmas);
-
     /**
      * 获取最大的序列号
      * @return

+ 1 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/service/IEmsProdplanMonthService.java

@@ -28,6 +28,7 @@ public interface IEmsProdplanMonthService extends IBaseService<EmsProdplanMonth,
 
     public PageList<Map<String, Object>> getDateEditForPage(HashMap<String, Object> parmas, Integer pageNum,
                                                             Integer pageSize);
+
     public PageList<Map<String, Object>> getDateLc(HashMap<String, Object> parmas, Integer pageNum,
                                                             Integer pageSize);
 

+ 47 - 15
src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java

@@ -1,8 +1,12 @@
 package com.steerinfo.ems.emsprodplanround.controller;
 
 import com.steerinfo.auth.utils.JwtUtil;
+import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.emsgmpcjh.mapper.EmsGmPcJhMapper;
 import com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh;
+import com.steerinfo.ems.emslog.mapper.EmsLogMapper;
+import com.steerinfo.ems.emslog.model.EmsLog;
+import com.steerinfo.ems.emslog.service.IEmsLogService;
 import com.steerinfo.ems.emsprodplanmonth.mapper.EmsProdplanMonthMapper;
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
 import com.steerinfo.ems.emsprodplanmonth.service.IEmsProdplanMonthService;
@@ -15,6 +19,7 @@ import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
 import com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound;
 import com.steerinfo.ems.emsprodplanround.service.IEmsProdplanRoundService;
+import com.steerinfo.framework.utils.misc.IdGenerator;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -56,6 +61,10 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
     EmsProdplanRoundMapper emsProdplanRoundMapper;
     @Autowired
     IEmsProdplanMonthService emsProdplanMonthService;
+    @Autowired
+    IEmsLogService emsLogService;
+    @Autowired
+    IdGenerator idGenerator;
     @ApiOperation(value="获取列表", notes="分页查询")
     @ApiImplicitParams({
         @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -87,18 +96,23 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         String userId = JwtUtil.getUseridByToken();
         String maxid = null;
         for (EmsProdplanRound model : models) {
+            if (model.getParentid() == null ){
+                return failed(null,"请点击选择左边计划!!!");
+            }
             EmsGmPcJh emsGmPcJh = emsGmPcJhMapper.selectByPrimaryKey(model.getParentid());
             if(emsGmPcJh.getState().equals("0")){
-                return failed("排产计划编号为"+emsGmPcJh.getId()+"做了取消下发操作,无法做新增操作");
+                return failed(null,"排产计划编号为"+emsGmPcJh.getId()+"做了取消下发操作,无法做新增操作");
             }
             if(model.getWorkprocType() == null || model.getWorkprocType().equals("")){
                 return  failed(null,"工序或者时间为空");
             }
             if (model.getParentid().substring(0,1).equals("G")){
                 maxid = emsProdplanRoundService.getMaxidAsGm(model);
+                model.setAscription("0");
             }
             else {
                 maxid = emsProdplanRoundService.getMaxidAsSC(model);
+                model.setAscription("1");
             }
             model.setId(maxid);
             model.setPlanWeight(model.getPlanWeight());
@@ -172,6 +186,32 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         return  success();
     }
 
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsProdplanRound信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "emsProdplanRound", value = "详细实体emsProdplanRound", required = true, dataType = "EmsProdplanRound")
+    })
+    //@RequiresPermissions("emsprodplanround:update")
+    @PutMapping(value = "ForcedUpdate", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult ForcedUpdate(@RequestBody EmsProdplanRound[] models) {
+        String userId = JwtUtil.getUseridByToken();
+        EmsLog emsLog =  new EmsLog();
+        for (int i = 0; i < models.length; i++) {
+            EmsProdplanRound  model = models[i];
+            model.setUpdateman(userId);
+            model.setUpdatetime(new Date());
+            String str = "{修改前的数据为:"+emsProdplanRoundMapper.selectByPrimaryKey(model.getId())+"修改后的数据为:"+model+"}";
+            emsProdplanRoundMapper.updateByPrimaryKey(model);
+            emsLog.setCode(str);
+            emsLog.setOperator(userId);
+            emsLog.setUpdatetable("ems_prodplan_round");
+            emsLog.setOperatortime(new Date());
+            emsLog.setId(idGenerator.getNextStr());
+            emsLogService.add(emsLog);
+        }
+           return  success();
+    }
+
     @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
     @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
     //@RequiresPermissions("emsprodplanround:delete")
@@ -288,19 +328,6 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
     }
 
     public void updateNbjh(EmsProdplanRound emsProdplanRound) {
-        //如果是内部计划 则判断有没有轮次计划 做删除操作
-        if (emsProdplanRound.getId().substring(0,1).equals("N")) {
-            if (emsProdplanRound.getParentid() != null || !emsProdplanRound.getParentid().equals("")) {
-                Map<String,Object> map =  new HashMap();
-                map.put("parentid",emsProdplanRound.getParentid());
-                List list = emsProdplanRoundMapper.selectByParameters(map);
-                if (list.size()<1) {
-                    emsGmPcJhMapper.deleteByPrimaryKey(emsProdplanRound.getParentid());
-                }
-            }
-        }
-        //如果是外部计划 则判断有没有轮次计划 做修改操作
-        if (emsProdplanRound.getId().substring(0,1).equals("G")) {
             if (emsProdplanRound.getParentid() != null || !emsProdplanRound.getParentid().equals("")) {
                 Map<String,Object> map =  new HashMap();
                 map.put("parentid",emsProdplanRound.getParentid());
@@ -311,7 +338,6 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
                      emsGmPcJhMapper.updateByPrimaryKeySelective(emsGmPcJh);
                 }
             }
-        }
     }
 
 
@@ -388,4 +414,10 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
        }
        return failed();
     }
+    @GetMapping("getstdchem")
+    public RESTfulResult getstdchem(){
+        List<EmsProdplanRound> emsProdplanRounds = emsProdplanRoundService.getchemicalStandard();
+        return success(emsProdplanRounds);
+    }
+
 }

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.java

@@ -27,6 +27,8 @@ public interface EmsProdplanRoundMapper extends IBaseMapper<EmsProdplanRound, St
     List<EmsProdplanRound> getdimension();
     //获取表面质量标准
     List<EmsProdplanRound> getsurfaceStandard();
+    //化学成份执行标准
+    List<EmsProdplanRound> getchemicalStandard();
     //审核页面数据获取
     List<Map<String, Object>> getAuditDate(HashMap<String, Object> parmas);
     //审核

+ 11 - 4
src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.xml

@@ -35,17 +35,18 @@
     <result column="AUDITSTATE" jdbcType="VARCHAR" property="auditState"/>
     <result column="GOINFO" jdbcType="VARCHAR" property="goinfo"/>
     <result column="FETCH_PLAN_WEIGHT" jdbcType="DECIMAL" property="fetchPlanWeight"/>
+    <result column="ASCRIPTION" jdbcType="VARCHAR" property="ascription"/>
   </resultMap>
   <sql id="columns">
     ID, MAY, SQNO, UNITID, DESCRIBE, STATE, GRADES, PLAN_WEIGHT, SPECIFICATIONS, LENGTHS, 
     CHEMICAL_STANDARD, SURFACE_STANDARD, MEMO, ISSUED_TIME, CREATEMAN, CREATETIME, UPDATEMAN, 
-    UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,STATUS,ERR_MSG,GOINFO,FETCH_PLAN_WEIGHT,DELIVERY_DATE,AUDITSTATE
+    UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,STATUS,ERR_MSG,GOINFO,FETCH_PLAN_WEIGHT,DELIVERY_DATE,AUDITSTATE,ASCRIPTION
   </sql>
   <sql id="columns_alias">
     t.ID, t.MAY, t.SQNO, t.UNITID, t.DESCRIBE, t.STATE, t.GRADES, t.PLAN_WEIGHT, t.SPECIFICATIONS, 
     t.LENGTHS, t.CHEMICAL_STANDARD, t.SURFACE_STANDARD, t.MEMO, t.ISSUED_TIME, t.CREATEMAN, 
     t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.TRANSPORT_TYPE, t.PURPOSE, t.WORKPROC_TYPE, 
-    t.MSG_FLAG, t.READ_FLAG,t.PARENTID,GOINFO,FETCH_PLAN_WEIGHT
+    t.MSG_FLAG, t.READ_FLAG,t.PARENTID,GOINFO,FETCH_PLAN_WEIGHT,
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM EMS_PRODPLAN_ROUND
@@ -285,7 +286,7 @@
       MEMO, ISSUED_TIME, CREATEMAN, 
       CREATETIME, UPDATEMAN, UPDATETIME, 
       TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
-      MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,GOINFO,DELIVERY_DATE,AUDITSTATE)
+      MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,GOINFO,DELIVERY_DATE,AUDITSTATE,ASCRIPTION)
     values (#{id,jdbcType=VARCHAR}, #{may,jdbcType=TIMESTAMP}, #{sqno,jdbcType=DECIMAL},
       #{unitid,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, 
       #{grades,jdbcType=VARCHAR}, #{planWeight,jdbcType=DECIMAL}, #{specifications,jdbcType=VARCHAR}, 
@@ -296,7 +297,7 @@
       #{msgFlag,jdbcType=VARCHAR}, #{readFlag,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR},
       #{iateralArea,jdbcType=VARCHAR},#{lengthTimesWidth,jdbcType=VARCHAR},
       #{dimension,jdbcType=VARCHAR},#{goinfo,jdbcType=VARCHAR},
-      #{deliveryDate,jdbcType=TIMESTAMP},#{auditState,jdbcType=VARCHAR})
+      #{deliveryDate,jdbcType=TIMESTAMP},#{auditState,jdbcType=VARCHAR},#{ascription,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
     insert into EMS_PRODPLAN_ROUND
@@ -791,4 +792,10 @@
       and  id like '%G-%'
     </where>
   </select>
+  <select id="getchemicalStandard" resultMap="BaseResultMap">
+    select distinct CHEMICAL_STANDARD
+    from ems_prodplan_round
+   where CHEMICAL_STANDARD not like '%null%'
+  </select>
+
 </mapper>

+ 11 - 1
src/main/java/com/steerinfo/ems/emsprodplanround/model/EmsProdplanRound.java

@@ -184,8 +184,18 @@ public class EmsProdplanRound implements IBasePO<String> {
     @ApiModelProperty
     private BigDecimal  fetchPlanWeight;
     //交货时间
-    @JSONField(format = "yyyy-mm-dd")
+    @JSONField(format = "yyyy-MM-dd")
     private Date deliveryDate;
+    //订单归属(0国贸 1内部)
+    private String ascription;
+
+    public String getAscription() {
+        return ascription;
+    }
+
+    public void setAscription(String ascription) {
+        this.ascription = ascription;
+    }
 
     public Date getDeliveryDate() {
         return deliveryDate;

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/service/IEmsProdplanRoundService.java

@@ -40,6 +40,8 @@ public interface IEmsProdplanRoundService extends IBaseService<EmsProdplanRound,
     List<EmsProdplanRound> getdimension();
     //获取表面质量标准
     List<EmsProdplanRound>getsurfaceStandard();
+    //化学成份执行标准
+    List<EmsProdplanRound> getchemicalStandard();
     // 审核页面查询
     PageList<Map<String, Object>> getAuditDateForPage(HashMap<String, Object> parmas, Integer pageNum,
                                                        Integer pageSize);

+ 5 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/service/impl/EmsProdplanRoundServiceImpl.java

@@ -79,6 +79,11 @@ public class EmsProdplanRoundServiceImpl extends BaseServiceImpl<EmsProdplanRoun
         return emsProdplanRoundMapper.getsurfaceStandard();
     }
 
+    @Override
+    public List<EmsProdplanRound> getchemicalStandard() {
+        return emsProdplanRoundMapper.getchemicalStandard();
+    }
+
     @Override
     public PageList<Map<String, Object>> getAuditDateForPage(HashMap<String, Object> parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum,pageSize);

+ 107 - 107
src/main/java/com/steerinfo/ems/emsscqklg/controller/EmsScqkLgController.java

@@ -1,107 +1,107 @@
-package com.steerinfo.ems.emsscqklg.controller;
-
-import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
-import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
-import com.steerinfo.framework.controller.BaseRESTfulController;
-import com.steerinfo.framework.controller.RESTfulResult;
-import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * EmsScqkLg RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-19 10:43
- * 类描述
- * 修订历史:
- * 日期:2021-10-19
- * 作者:generator
- * 参考:
- * 描述:EmsScqkLg RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-@RestController
-@RequestMapping("/${api.version}/emsscqklgs")
-public class EmsScqkLgController extends BaseRESTfulController {
-
-    @Autowired
-    IEmsScqkLgService emsScqkLgService;
-
-    @ApiOperation(value="获取列表", notes="分页查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("emsscqklg:view")
-    @GetMapping(value = "/")
-    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<EmsScqkLg> list = emsScqkLgService.queryForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-
-    @ApiOperation(value="获取列表", notes="分页模糊查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("emsscqklg:view")
-    @GetMapping(value = "/like/")
-    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<EmsScqkLg> list = emsScqkLgService.queryLikeForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-    
-    @ApiOperation(value="创建", notes="根据EmsScqkLg对象创建")
-    @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
-    //@RequiresPermissions("emsscqklg:create")
-    @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute EmsScqkLg model){
-        EmsScqkLg emsScqkLg = emsScqkLgService.add(model);
-        return success(emsScqkLg);
-    }
-
-    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
-    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
-    //@RequiresPermissions("emsscqklg:view")
-    @GetMapping(value = "/{id}")
-    public RESTfulResult get(@PathVariable Date id){
-        EmsScqkLg emsScqkLg = emsScqkLgService.getById(id);
-        return success(emsScqkLg);
-    }
-
-    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsScqkLg信息来更新详细信息")
-    @ApiImplicitParams({
-        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date"),
-        @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
-    })
-    //@RequiresPermissions("emsscqklg:update")
-    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult update(@PathVariable Date id, @RequestBody EmsScqkLg model){
-        model.setId(id);
-        EmsScqkLg emsScqkLg = emsScqkLgService.modify(model);
-        return success(emsScqkLg);
-    }
-
-    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
-    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
-    //@RequiresPermissions("emsscqklg:delete")
-    @DeleteMapping(value = "/{id}")//Date
-    public RESTfulResult delete(@PathVariable String id){
-    	List<String> list = Arrays.asList(id.split(","));
-    	if(ListUtils.isNotEmpty(list)) {
-	    	List<Date> ids = ListUtils.convertList(list);
-			  emsScqkLgService.delete(ids);
-    	}
-      return success();
-    }
-}
+package com.steerinfo.ems.emsscqklg.controller;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * EmsScqkLg RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emsscqklgs")
+public class EmsScqkLgController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsScqkLgService emsScqkLgService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emsscqklg:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsScqkLg> list = emsScqkLgService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emsscqklg:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsScqkLg> list = emsScqkLgService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsScqkLg对象创建")
+    @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
+    //@RequiresPermissions("emsscqklg:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsScqkLg model){
+        EmsScqkLg emsScqkLg = emsScqkLgService.add(model);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
+    //@RequiresPermissions("emsscqklg:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Date id){
+        EmsScqkLg emsScqkLg = emsScqkLgService.getById(id);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsScqkLg信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date"),
+        @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
+    })
+    //@RequiresPermissions("emsscqklg:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable Date id, @RequestBody EmsScqkLg model){
+        model.setId(id);
+        EmsScqkLg emsScqkLg = emsScqkLgService.modify(model);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
+    //@RequiresPermissions("emsscqklg:delete")
+    @DeleteMapping(value = "/{id}")//Date
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Date> ids = ListUtils.convertList(list);
+			  emsScqkLgService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 10 - 10
src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.java

@@ -1,11 +1,11 @@
-package com.steerinfo.ems.emsscqklg.mapper;
-
-import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.Date;
-
-@Mapper
-public interface EmsScqkLgMapper extends IBaseMapper<EmsScqkLg, Date> {
+package com.steerinfo.ems.emsscqklg.mapper;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.Date;
+
+@Mapper
+public interface EmsScqkLgMapper extends IBaseMapper<EmsScqkLg, Date> {
 }

+ 594 - 594
src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.xml

@@ -1,595 +1,595 @@
-<?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.steerinfo.ems.emsscqklg.mapper.EmsScqkLgMapper">
-  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
-    <id column="DATES" jdbcType="TIMESTAMP" property="dates" />
-    <result column="RCL" jdbcType="DECIMAL" property="rcl" />
-    <result column="JTSL" jdbcType="DECIMAL" property="jtsl" />
-    <result column="SJYL" jdbcType="DECIMAL" property="sjyl" />
-    <result column="KCL" jdbcType="DECIMAL" property="kcl" />
-    <result column="WJZL" jdbcType="DECIMAL" property="wjzl" />
-    <result column="SCLS" jdbcType="DECIMAL" property="scls" />
-    <result column="LL_1" jdbcType="DECIMAL" property="ll1" />
-    <result column="LL_2" jdbcType="DECIMAL" property="ll2" />
-    <result column="FGZL_NBHST" jdbcType="DECIMAL" property="fgzlNbhst" />
-    <result column="FGZL_WG" jdbcType="DECIMAL" property="fgzlWg" />
-    <result column="LLDLYL" jdbcType="DECIMAL" property="lldlyl" />
-    <result column="WGFG_JFGK" jdbcType="DECIMAL" property="wgfgJfgk" />
-    <result column="WGFG_QXC" jdbcType="DECIMAL" property="wgfgQxc" />
-    <result column="XCF" jdbcType="DECIMAL" property="xcf" />
-    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
-    <result column="CZR" jdbcType="VARCHAR" property="czr" />
-    <result column="CZSJ" jdbcType="TIMESTAMP" property="czsj" />
-    <result column="WXGPCL" jdbcType="DECIMAL" property="wxgpcl" />
-    <result column="LLB" jdbcType="DECIMAL" property="llb" />
-  </resultMap>
-  <sql id="columns">
-    DATES, RCL, JTSL, SJYL, KCL, WJZL, SCLS, LL_1, LL_2, FGZL_NBHST, FGZL_WG, LLDLYL, 
-    WGFG_JFGK, WGFG_QXC, XCF, MEMO, CZR, CZSJ, WXGPCL, LLB
-  </sql>
-  <sql id="columns_alias">
-    t.DATES, t.RCL, t.JTSL, t.SJYL, t.KCL, t.WJZL, t.SCLS, t.LL_1, t.LL_2, t.FGZL_NBHST, 
-    t.FGZL_WG, t.LLDLYL, t.WGFG_JFGK, t.WGFG_QXC, t.XCF, t.MEMO, t.CZR, t.CZSJ, t.WXGPCL, 
-    t.LLB
-  </sql>
-  <sql id="select">
-    SELECT <include refid="columns"/> FROM EMS_SCQK_LG
-  </sql>
-  <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM EMS_SCQK_LG t
-  </sql>
-  <sql id="where">
-    <where> 
-      <if test="dates != null">
-        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
-      </if>
-      <if test="rcl != null">
-        and RCL = #{rcl}
-      </if>
-      <if test="jtsl != null">
-        and JTSL = #{jtsl}
-      </if>
-      <if test="sjyl != null">
-        and SJYL = #{sjyl}
-      </if>
-      <if test="kcl != null">
-        and KCL = #{kcl}
-      </if>
-      <if test="wjzl != null">
-        and WJZL = #{wjzl}
-      </if>
-      <if test="scls != null">
-        and SCLS = #{scls}
-      </if>
-      <if test="ll1 != null">
-        and LL_1 = #{ll1}
-      </if>
-      <if test="ll2 != null">
-        and LL_2 = #{ll2}
-      </if>
-      <if test="fgzlNbhst != null">
-        and FGZL_NBHST = #{fgzlNbhst}
-      </if>
-      <if test="fgzlWg != null">
-        and FGZL_WG = #{fgzlWg}
-      </if>
-      <if test="lldlyl != null">
-        and LLDLYL = #{lldlyl}
-      </if>
-      <if test="wgfgJfgk != null">
-        and WGFG_JFGK = #{wgfgJfgk}
-      </if>
-      <if test="wgfgQxc != null">
-        and WGFG_QXC = #{wgfgQxc}
-      </if>
-      <if test="xcf != null">
-        and XCF = #{xcf}
-      </if>
-      <if test="memo != null and memo != ''">
-        and MEMO = #{memo}
-      </if>
-      <if test="czr != null and czr != ''">
-        and CZR = #{czr}
-      </if>
-      <if test="czsj != null">
-        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
-      </if>
-      <if test="wxgpcl != null">
-        and WXGPCL = #{wxgpcl}
-      </if>
-      <if test="llb != null">
-        and LLB = #{llb}
-      </if>
-    </where>
-  </sql>
-  <sql id="whereLike">
-    <where> 
-      <if test="dates != null">
-        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
-      </if>
-      <if test="rcl != null">
-        and RCL = #{rcl}
-      </if>
-      <if test="jtsl != null">
-        and JTSL = #{jtsl}
-      </if>
-      <if test="sjyl != null">
-        and SJYL = #{sjyl}
-      </if>
-      <if test="kcl != null">
-        and KCL = #{kcl}
-      </if>
-      <if test="wjzl != null">
-        and WJZL = #{wjzl}
-      </if>
-      <if test="scls != null">
-        and SCLS = #{scls}
-      </if>
-      <if test="ll1 != null">
-        and LL_1 = #{ll1}
-      </if>
-      <if test="ll2 != null">
-        and LL_2 = #{ll2}
-      </if>
-      <if test="fgzlNbhst != null">
-        and FGZL_NBHST = #{fgzlNbhst}
-      </if>
-      <if test="fgzlWg != null">
-        and FGZL_WG = #{fgzlWg}
-      </if>
-      <if test="lldlyl != null">
-        and LLDLYL = #{lldlyl}
-      </if>
-      <if test="wgfgJfgk != null">
-        and WGFG_JFGK = #{wgfgJfgk}
-      </if>
-      <if test="wgfgQxc != null">
-        and WGFG_QXC = #{wgfgQxc}
-      </if>
-      <if test="xcf != null">
-        and XCF = #{xcf}
-      </if>
-      <if test="memo != null and memo != ''">
-        and MEMO LIKE '%${memo}%'
-      </if>
-      <if test="czr != null and czr != ''">
-        and CZR LIKE '%${czr}%'
-      </if>
-      <if test="czsj != null">
-        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
-      </if>
-      <if test="wxgpcl != null">
-        and WXGPCL = #{wxgpcl}
-      </if>
-      <if test="llb != null">
-        and LLB = #{llb}
-      </if>
-    </where>
-  </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.util.Date">
-    delete from EMS_SCQK_LG
-    where DATES = #{dates,jdbcType=TIMESTAMP}
-  </delete>
-  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-    delete from EMS_SCQK_LG
-    where 1!=1 
-      <if test="rcl != null">
-        or RCL = #{rcl}
-      </if>
-      <if test="jtsl != null">
-        or JTSL = #{jtsl}
-      </if>
-      <if test="sjyl != null">
-        or SJYL = #{sjyl}
-      </if>
-      <if test="kcl != null">
-        or KCL = #{kcl}
-      </if>
-      <if test="wjzl != null">
-        or WJZL = #{wjzl}
-      </if>
-      <if test="scls != null">
-        or SCLS = #{scls}
-      </if>
-      <if test="ll1 != null">
-        or LL_1 = #{ll1}
-      </if>
-      <if test="ll2 != null">
-        or LL_2 = #{ll2}
-      </if>
-      <if test="fgzlNbhst != null">
-        or FGZL_NBHST = #{fgzlNbhst}
-      </if>
-      <if test="fgzlWg != null">
-        or FGZL_WG = #{fgzlWg}
-      </if>
-      <if test="lldlyl != null">
-        or LLDLYL = #{lldlyl}
-      </if>
-      <if test="wgfgJfgk != null">
-        or WGFG_JFGK = #{wgfgJfgk}
-      </if>
-      <if test="wgfgQxc != null">
-        or WGFG_QXC = #{wgfgQxc}
-      </if>
-      <if test="xcf != null">
-        or XCF = #{xcf}
-      </if>
-      <if test="memo != null and memo != ''">
-        or MEMO = #{memo}
-      </if>
-      <if test="czr != null and czr != ''">
-        or CZR = #{czr}
-      </if>
-      <if test="czsj != null">
-        or TO_CHAR(CZSJ,'yyyy-MM-dd') = '#{czsj}'
-      </if>
-      <if test="wxgpcl != null">
-        or WXGPCL = #{wxgpcl}
-      </if>
-      <if test="llb != null">
-        or LLB = #{llb}
-      </if>
-  </delete>
-  <insert id="insert" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
-    insert into EMS_SCQK_LG (DATES, RCL, JTSL, 
-      SJYL, KCL, WJZL, SCLS, 
-      LL_1, LL_2, FGZL_NBHST, 
-      FGZL_WG, LLDLYL, WGFG_JFGK, 
-      WGFG_QXC, XCF, MEMO, 
-      CZR, CZSJ, WXGPCL, 
-      LLB)
-    values (#{dates,jdbcType=TIMESTAMP}, #{rcl,jdbcType=DECIMAL}, #{jtsl,jdbcType=DECIMAL}, 
-      #{sjyl,jdbcType=DECIMAL}, #{kcl,jdbcType=DECIMAL}, #{wjzl,jdbcType=DECIMAL}, #{scls,jdbcType=DECIMAL}, 
-      #{ll1,jdbcType=DECIMAL}, #{ll2,jdbcType=DECIMAL}, #{fgzlNbhst,jdbcType=DECIMAL}, 
-      #{fgzlWg,jdbcType=DECIMAL}, #{lldlyl,jdbcType=DECIMAL}, #{wgfgJfgk,jdbcType=DECIMAL}, 
-      #{wgfgQxc,jdbcType=DECIMAL}, #{xcf,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, 
-      #{czr,jdbcType=VARCHAR}, #{czsj,jdbcType=TIMESTAMP}, #{wxgpcl,jdbcType=DECIMAL}, 
-      #{llb,jdbcType=DECIMAL})
-  </insert>
-  <insert id="insertSelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
-    insert into EMS_SCQK_LG
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="dates != null">
-        DATES,
-      </if>
-      <if test="rcl != null">
-        RCL,
-      </if>
-      <if test="jtsl != null">
-        JTSL,
-      </if>
-      <if test="sjyl != null">
-        SJYL,
-      </if>
-      <if test="kcl != null">
-        KCL,
-      </if>
-      <if test="wjzl != null">
-        WJZL,
-      </if>
-      <if test="scls != null">
-        SCLS,
-      </if>
-      <if test="ll1 != null">
-        LL_1,
-      </if>
-      <if test="ll2 != null">
-        LL_2,
-      </if>
-      <if test="fgzlNbhst != null">
-        FGZL_NBHST,
-      </if>
-      <if test="fgzlWg != null">
-        FGZL_WG,
-      </if>
-      <if test="lldlyl != null">
-        LLDLYL,
-      </if>
-      <if test="wgfgJfgk != null">
-        WGFG_JFGK,
-      </if>
-      <if test="wgfgQxc != null">
-        WGFG_QXC,
-      </if>
-      <if test="xcf != null">
-        XCF,
-      </if>
-      <if test="memo != null">
-        MEMO,
-      </if>
-      <if test="czr != null">
-        CZR,
-      </if>
-      <if test="czsj != null">
-        CZSJ,
-      </if>
-      <if test="wxgpcl != null">
-        WXGPCL,
-      </if>
-      <if test="llb != null">
-        LLB,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="dates != null">
-        #{dates,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rcl != null">
-        #{rcl,jdbcType=DECIMAL},
-      </if>
-      <if test="jtsl != null">
-        #{jtsl,jdbcType=DECIMAL},
-      </if>
-      <if test="sjyl != null">
-        #{sjyl,jdbcType=DECIMAL},
-      </if>
-      <if test="kcl != null">
-        #{kcl,jdbcType=DECIMAL},
-      </if>
-      <if test="wjzl != null">
-        #{wjzl,jdbcType=DECIMAL},
-      </if>
-      <if test="scls != null">
-        #{scls,jdbcType=DECIMAL},
-      </if>
-      <if test="ll1 != null">
-        #{ll1,jdbcType=DECIMAL},
-      </if>
-      <if test="ll2 != null">
-        #{ll2,jdbcType=DECIMAL},
-      </if>
-      <if test="fgzlNbhst != null">
-        #{fgzlNbhst,jdbcType=DECIMAL},
-      </if>
-      <if test="fgzlWg != null">
-        #{fgzlWg,jdbcType=DECIMAL},
-      </if>
-      <if test="lldlyl != null">
-        #{lldlyl,jdbcType=DECIMAL},
-      </if>
-      <if test="wgfgJfgk != null">
-        #{wgfgJfgk,jdbcType=DECIMAL},
-      </if>
-      <if test="wgfgQxc != null">
-        #{wgfgQxc,jdbcType=DECIMAL},
-      </if>
-      <if test="xcf != null">
-        #{xcf,jdbcType=DECIMAL},
-      </if>
-      <if test="memo != null">
-        #{memo,jdbcType=VARCHAR},
-      </if>
-      <if test="czr != null">
-        #{czr,jdbcType=VARCHAR},
-      </if>
-      <if test="czsj != null">
-        #{czsj,jdbcType=TIMESTAMP},
-      </if>
-      <if test="wxgpcl != null">
-        #{wxgpcl,jdbcType=DECIMAL},
-      </if>
-      <if test="llb != null">
-        #{llb,jdbcType=DECIMAL},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
-    update EMS_SCQK_LG
-    set RCL = #{rcl,jdbcType=DECIMAL},
-      JTSL = #{jtsl,jdbcType=DECIMAL},
-      SJYL = #{sjyl,jdbcType=DECIMAL},
-      KCL = #{kcl,jdbcType=DECIMAL},
-      WJZL = #{wjzl,jdbcType=DECIMAL},
-      SCLS = #{scls,jdbcType=DECIMAL},
-      LL_1 = #{ll1,jdbcType=DECIMAL},
-      LL_2 = #{ll2,jdbcType=DECIMAL},
-      FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
-      FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
-      LLDLYL = #{lldlyl,jdbcType=DECIMAL},
-      WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
-      WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
-      XCF = #{xcf,jdbcType=DECIMAL},
-      MEMO = #{memo,jdbcType=VARCHAR},
-      CZR = #{czr,jdbcType=VARCHAR},
-      CZSJ = #{czsj,jdbcType=TIMESTAMP},
-      WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
-      LLB = #{llb,jdbcType=DECIMAL}
-    where DATES = #{dates,jdbcType=TIMESTAMP}
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
-    update EMS_SCQK_LG
-    <set>
-      <if test="rcl != null">
-        RCL = #{rcl,jdbcType=DECIMAL},
-      </if>
-      <if test="jtsl != null">
-        JTSL = #{jtsl,jdbcType=DECIMAL},
-      </if>
-      <if test="sjyl != null">
-        SJYL = #{sjyl,jdbcType=DECIMAL},
-      </if>
-      <if test="kcl != null">
-        KCL = #{kcl,jdbcType=DECIMAL},
-      </if>
-      <if test="wjzl != null">
-        WJZL = #{wjzl,jdbcType=DECIMAL},
-      </if>
-      <if test="scls != null">
-        SCLS = #{scls,jdbcType=DECIMAL},
-      </if>
-      <if test="ll1 != null">
-        LL_1 = #{ll1,jdbcType=DECIMAL},
-      </if>
-      <if test="ll2 != null">
-        LL_2 = #{ll2,jdbcType=DECIMAL},
-      </if>
-      <if test="fgzlNbhst != null">
-        FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
-      </if>
-      <if test="fgzlWg != null">
-        FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
-      </if>
-      <if test="lldlyl != null">
-        LLDLYL = #{lldlyl,jdbcType=DECIMAL},
-      </if>
-      <if test="wgfgJfgk != null">
-        WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
-      </if>
-      <if test="wgfgQxc != null">
-        WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
-      </if>
-      <if test="xcf != null">
-        XCF = #{xcf,jdbcType=DECIMAL},
-      </if>
-      <if test="memo != null">
-        MEMO = #{memo,jdbcType=VARCHAR},
-      </if>
-      <if test="czr != null">
-        CZR = #{czr,jdbcType=VARCHAR},
-      </if>
-      <if test="czsj != null">
-        CZSJ = #{czsj,jdbcType=TIMESTAMP},
-      </if>
-      <if test="wxgpcl != null">
-        WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
-      </if>
-      <if test="llb != null">
-        LLB = #{llb,jdbcType=DECIMAL},
-      </if>
-    </set>
-    where DATES = #{dates,jdbcType=TIMESTAMP}
-  </update>
-  <select id="selectByPrimaryKey" parameterType="java.util.Date" resultMap="BaseResultMap">
-    <include refid="select"/>
-    where DATES = #{dates,jdbcType=TIMESTAMP}
-  </select>
-  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
-  </select>
-  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
-  </select>
-  <insert id="batchInsert" parameterType="java.util.List">
-    insert into EMS_SCQK_LG 
-      (DATES, 
-      RCL, JTSL, SJYL, 
-      KCL, WJZL, SCLS, 
-      LL_1, LL_2, FGZL_NBHST, 
-      FGZL_WG, LLDLYL, WGFG_JFGK, 
-      WGFG_QXC, XCF, MEMO, 
-      CZR, CZSJ, WXGPCL, 
-      LLB)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.dates,jdbcType=TIMESTAMP}, 
-      #{item.rcl,jdbcType=DECIMAL}, #{item.jtsl,jdbcType=DECIMAL}, #{item.sjyl,jdbcType=DECIMAL}, 
-      #{item.kcl,jdbcType=DECIMAL}, #{item.wjzl,jdbcType=DECIMAL}, #{item.scls,jdbcType=DECIMAL}, 
-      #{item.ll1,jdbcType=DECIMAL}, #{item.ll2,jdbcType=DECIMAL}, #{item.fgzlNbhst,jdbcType=DECIMAL}, 
-      #{item.fgzlWg,jdbcType=DECIMAL}, #{item.lldlyl,jdbcType=DECIMAL}, #{item.wgfgJfgk,jdbcType=DECIMAL}, 
-      #{item.wgfgQxc,jdbcType=DECIMAL}, #{item.xcf,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
-      #{item.czr,jdbcType=VARCHAR}, #{item.czsj,jdbcType=TIMESTAMP}, #{item.wxgpcl,jdbcType=DECIMAL}, 
-      #{item.llb,jdbcType=DECIMAL} from dual  
-   </foreach> )
-  </insert>
-  <update id="batchUpdate" parameterType="java.util.List">
-     update EMS_SCQK_LG
-     set
-       DATES=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.dates,jdbcType=TIMESTAMP}
-       </foreach>
-       ,RCL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.rcl,jdbcType=DECIMAL}
-       </foreach>
-       ,JTSL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.jtsl,jdbcType=DECIMAL}
-       </foreach>
-       ,SJYL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.sjyl,jdbcType=DECIMAL}
-       </foreach>
-       ,KCL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.kcl,jdbcType=DECIMAL}
-       </foreach>
-       ,WJZL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wjzl,jdbcType=DECIMAL}
-       </foreach>
-       ,SCLS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.scls,jdbcType=DECIMAL}
-       </foreach>
-       ,LL_1=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll1,jdbcType=DECIMAL}
-       </foreach>
-       ,LL_2=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll2,jdbcType=DECIMAL}
-       </foreach>
-       ,FGZL_NBHST=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlNbhst,jdbcType=DECIMAL}
-       </foreach>
-       ,FGZL_WG=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlWg,jdbcType=DECIMAL}
-       </foreach>
-       ,LLDLYL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.lldlyl,jdbcType=DECIMAL}
-       </foreach>
-       ,WGFG_JFGK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgJfgk,jdbcType=DECIMAL}
-       </foreach>
-       ,WGFG_QXC=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgQxc,jdbcType=DECIMAL}
-       </foreach>
-       ,XCF=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.xcf,jdbcType=DECIMAL}
-       </foreach>
-       ,MEMO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.memo,jdbcType=VARCHAR}
-       </foreach>
-       ,CZR=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czr,jdbcType=VARCHAR}
-       </foreach>
-       ,CZSJ=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czsj,jdbcType=TIMESTAMP}
-       </foreach>
-       ,WXGPCL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wxgpcl,jdbcType=DECIMAL}
-       </foreach>
-       ,LLB=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
-          when #{item.dates,jdbcType=TIMESTAMP} then #{item.llb,jdbcType=DECIMAL}
-       </foreach>
-     where DATES in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
-    #{item.dates,jdbcType=TIMESTAMP}
-     </foreach> 
-  </update>
-  <delete id="batchDelete" parameterType="java.util.List">
-    delete from EMS_SCQK_LG
-    where DATES in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
-      #{id}
-    </foreach>
-  </delete>
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+<?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.steerinfo.ems.emsscqklg.mapper.EmsScqkLgMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    <id column="DATES" jdbcType="TIMESTAMP" property="dates" />
+    <result column="RCL" jdbcType="DECIMAL" property="rcl" />
+    <result column="JTSL" jdbcType="DECIMAL" property="jtsl" />
+    <result column="SJYL" jdbcType="DECIMAL" property="sjyl" />
+    <result column="KCL" jdbcType="DECIMAL" property="kcl" />
+    <result column="WJZL" jdbcType="DECIMAL" property="wjzl" />
+    <result column="SCLS" jdbcType="DECIMAL" property="scls" />
+    <result column="LL_1" jdbcType="DECIMAL" property="ll1" />
+    <result column="LL_2" jdbcType="DECIMAL" property="ll2" />
+    <result column="FGZL_NBHST" jdbcType="DECIMAL" property="fgzlNbhst" />
+    <result column="FGZL_WG" jdbcType="DECIMAL" property="fgzlWg" />
+    <result column="LLDLYL" jdbcType="DECIMAL" property="lldlyl" />
+    <result column="WGFG_JFGK" jdbcType="DECIMAL" property="wgfgJfgk" />
+    <result column="WGFG_QXC" jdbcType="DECIMAL" property="wgfgQxc" />
+    <result column="XCF" jdbcType="DECIMAL" property="xcf" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="CZR" jdbcType="VARCHAR" property="czr" />
+    <result column="CZSJ" jdbcType="TIMESTAMP" property="czsj" />
+    <result column="WXGPCL" jdbcType="DECIMAL" property="wxgpcl" />
+    <result column="LLB" jdbcType="DECIMAL" property="llb" />
+  </resultMap>
+  <sql id="columns">
+    DATES, RCL, JTSL, SJYL, KCL, WJZL, SCLS, LL_1, LL_2, FGZL_NBHST, FGZL_WG, LLDLYL, 
+    WGFG_JFGK, WGFG_QXC, XCF, MEMO, CZR, CZSJ, WXGPCL, LLB
+  </sql>
+  <sql id="columns_alias">
+    t.DATES, t.RCL, t.JTSL, t.SJYL, t.KCL, t.WJZL, t.SCLS, t.LL_1, t.LL_2, t.FGZL_NBHST, 
+    t.FGZL_WG, t.LLDLYL, t.WGFG_JFGK, t.WGFG_QXC, t.XCF, t.MEMO, t.CZR, t.CZSJ, t.WXGPCL, 
+    t.LLB
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_SCQK_LG
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_SCQK_LG t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="rcl != null">
+        and RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        and JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        and SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        and KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        and WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        and SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        and LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        and LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        and FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        and FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        and LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        and WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        and WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        and XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="czr != null and czr != ''">
+        and CZR = #{czr}
+      </if>
+      <if test="czsj != null">
+        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
+      </if>
+      <if test="wxgpcl != null">
+        and WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        and LLB = #{llb}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="rcl != null">
+        and RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        and JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        and SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        and KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        and WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        and SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        and LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        and LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        and FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        and FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        and LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        and WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        and WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        and XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="czr != null and czr != ''">
+        and CZR LIKE '%${czr}%'
+      </if>
+      <if test="czsj != null">
+        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
+      </if>
+      <if test="wxgpcl != null">
+        and WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        and LLB = #{llb}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.util.Date">
+    delete from EMS_SCQK_LG
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_SCQK_LG
+    where 1!=1 
+      <if test="rcl != null">
+        or RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        or JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        or SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        or KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        or WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        or SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        or LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        or LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        or FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        or FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        or LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        or WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        or WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        or XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="czr != null and czr != ''">
+        or CZR = #{czr}
+      </if>
+      <if test="czsj != null">
+        or TO_CHAR(CZSJ,'yyyy-MM-dd') = '#{czsj}'
+      </if>
+      <if test="wxgpcl != null">
+        or WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        or LLB = #{llb}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    insert into EMS_SCQK_LG (DATES, RCL, JTSL, 
+      SJYL, KCL, WJZL, SCLS, 
+      LL_1, LL_2, FGZL_NBHST, 
+      FGZL_WG, LLDLYL, WGFG_JFGK, 
+      WGFG_QXC, XCF, MEMO, 
+      CZR, CZSJ, WXGPCL, 
+      LLB)
+    values (#{dates,jdbcType=TIMESTAMP}, #{rcl,jdbcType=DECIMAL}, #{jtsl,jdbcType=DECIMAL}, 
+      #{sjyl,jdbcType=DECIMAL}, #{kcl,jdbcType=DECIMAL}, #{wjzl,jdbcType=DECIMAL}, #{scls,jdbcType=DECIMAL}, 
+      #{ll1,jdbcType=DECIMAL}, #{ll2,jdbcType=DECIMAL}, #{fgzlNbhst,jdbcType=DECIMAL}, 
+      #{fgzlWg,jdbcType=DECIMAL}, #{lldlyl,jdbcType=DECIMAL}, #{wgfgJfgk,jdbcType=DECIMAL}, 
+      #{wgfgQxc,jdbcType=DECIMAL}, #{xcf,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, 
+      #{czr,jdbcType=VARCHAR}, #{czsj,jdbcType=TIMESTAMP}, #{wxgpcl,jdbcType=DECIMAL}, 
+      #{llb,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    insert into EMS_SCQK_LG
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="dates != null">
+        DATES,
+      </if>
+      <if test="rcl != null">
+        RCL,
+      </if>
+      <if test="jtsl != null">
+        JTSL,
+      </if>
+      <if test="sjyl != null">
+        SJYL,
+      </if>
+      <if test="kcl != null">
+        KCL,
+      </if>
+      <if test="wjzl != null">
+        WJZL,
+      </if>
+      <if test="scls != null">
+        SCLS,
+      </if>
+      <if test="ll1 != null">
+        LL_1,
+      </if>
+      <if test="ll2 != null">
+        LL_2,
+      </if>
+      <if test="fgzlNbhst != null">
+        FGZL_NBHST,
+      </if>
+      <if test="fgzlWg != null">
+        FGZL_WG,
+      </if>
+      <if test="lldlyl != null">
+        LLDLYL,
+      </if>
+      <if test="wgfgJfgk != null">
+        WGFG_JFGK,
+      </if>
+      <if test="wgfgQxc != null">
+        WGFG_QXC,
+      </if>
+      <if test="xcf != null">
+        XCF,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="czr != null">
+        CZR,
+      </if>
+      <if test="czsj != null">
+        CZSJ,
+      </if>
+      <if test="wxgpcl != null">
+        WXGPCL,
+      </if>
+      <if test="llb != null">
+        LLB,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="dates != null">
+        #{dates,jdbcType=TIMESTAMP},
+      </if>
+      <if test="rcl != null">
+        #{rcl,jdbcType=DECIMAL},
+      </if>
+      <if test="jtsl != null">
+        #{jtsl,jdbcType=DECIMAL},
+      </if>
+      <if test="sjyl != null">
+        #{sjyl,jdbcType=DECIMAL},
+      </if>
+      <if test="kcl != null">
+        #{kcl,jdbcType=DECIMAL},
+      </if>
+      <if test="wjzl != null">
+        #{wjzl,jdbcType=DECIMAL},
+      </if>
+      <if test="scls != null">
+        #{scls,jdbcType=DECIMAL},
+      </if>
+      <if test="ll1 != null">
+        #{ll1,jdbcType=DECIMAL},
+      </if>
+      <if test="ll2 != null">
+        #{ll2,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlNbhst != null">
+        #{fgzlNbhst,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlWg != null">
+        #{fgzlWg,jdbcType=DECIMAL},
+      </if>
+      <if test="lldlyl != null">
+        #{lldlyl,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgJfgk != null">
+        #{wgfgJfgk,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgQxc != null">
+        #{wgfgQxc,jdbcType=DECIMAL},
+      </if>
+      <if test="xcf != null">
+        #{xcf,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="czr != null">
+        #{czr,jdbcType=VARCHAR},
+      </if>
+      <if test="czsj != null">
+        #{czsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="wxgpcl != null">
+        #{wxgpcl,jdbcType=DECIMAL},
+      </if>
+      <if test="llb != null">
+        #{llb,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    update EMS_SCQK_LG
+    set RCL = #{rcl,jdbcType=DECIMAL},
+      JTSL = #{jtsl,jdbcType=DECIMAL},
+      SJYL = #{sjyl,jdbcType=DECIMAL},
+      KCL = #{kcl,jdbcType=DECIMAL},
+      WJZL = #{wjzl,jdbcType=DECIMAL},
+      SCLS = #{scls,jdbcType=DECIMAL},
+      LL_1 = #{ll1,jdbcType=DECIMAL},
+      LL_2 = #{ll2,jdbcType=DECIMAL},
+      FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
+      FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
+      LLDLYL = #{lldlyl,jdbcType=DECIMAL},
+      WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
+      WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
+      XCF = #{xcf,jdbcType=DECIMAL},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      CZR = #{czr,jdbcType=VARCHAR},
+      CZSJ = #{czsj,jdbcType=TIMESTAMP},
+      WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
+      LLB = #{llb,jdbcType=DECIMAL}
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    update EMS_SCQK_LG
+    <set>
+      <if test="rcl != null">
+        RCL = #{rcl,jdbcType=DECIMAL},
+      </if>
+      <if test="jtsl != null">
+        JTSL = #{jtsl,jdbcType=DECIMAL},
+      </if>
+      <if test="sjyl != null">
+        SJYL = #{sjyl,jdbcType=DECIMAL},
+      </if>
+      <if test="kcl != null">
+        KCL = #{kcl,jdbcType=DECIMAL},
+      </if>
+      <if test="wjzl != null">
+        WJZL = #{wjzl,jdbcType=DECIMAL},
+      </if>
+      <if test="scls != null">
+        SCLS = #{scls,jdbcType=DECIMAL},
+      </if>
+      <if test="ll1 != null">
+        LL_1 = #{ll1,jdbcType=DECIMAL},
+      </if>
+      <if test="ll2 != null">
+        LL_2 = #{ll2,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlNbhst != null">
+        FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlWg != null">
+        FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
+      </if>
+      <if test="lldlyl != null">
+        LLDLYL = #{lldlyl,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgJfgk != null">
+        WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgQxc != null">
+        WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
+      </if>
+      <if test="xcf != null">
+        XCF = #{xcf,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="czr != null">
+        CZR = #{czr,jdbcType=VARCHAR},
+      </if>
+      <if test="czsj != null">
+        CZSJ = #{czsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="wxgpcl != null">
+        WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
+      </if>
+      <if test="llb != null">
+        LLB = #{llb,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.util.Date" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_SCQK_LG 
+      (DATES, 
+      RCL, JTSL, SJYL, 
+      KCL, WJZL, SCLS, 
+      LL_1, LL_2, FGZL_NBHST, 
+      FGZL_WG, LLDLYL, WGFG_JFGK, 
+      WGFG_QXC, XCF, MEMO, 
+      CZR, CZSJ, WXGPCL, 
+      LLB)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.dates,jdbcType=TIMESTAMP}, 
+      #{item.rcl,jdbcType=DECIMAL}, #{item.jtsl,jdbcType=DECIMAL}, #{item.sjyl,jdbcType=DECIMAL}, 
+      #{item.kcl,jdbcType=DECIMAL}, #{item.wjzl,jdbcType=DECIMAL}, #{item.scls,jdbcType=DECIMAL}, 
+      #{item.ll1,jdbcType=DECIMAL}, #{item.ll2,jdbcType=DECIMAL}, #{item.fgzlNbhst,jdbcType=DECIMAL}, 
+      #{item.fgzlWg,jdbcType=DECIMAL}, #{item.lldlyl,jdbcType=DECIMAL}, #{item.wgfgJfgk,jdbcType=DECIMAL}, 
+      #{item.wgfgQxc,jdbcType=DECIMAL}, #{item.xcf,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.czr,jdbcType=VARCHAR}, #{item.czsj,jdbcType=TIMESTAMP}, #{item.wxgpcl,jdbcType=DECIMAL}, 
+      #{item.llb,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_SCQK_LG
+     set
+       DATES=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.dates,jdbcType=TIMESTAMP}
+       </foreach>
+       ,RCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.rcl,jdbcType=DECIMAL}
+       </foreach>
+       ,JTSL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.jtsl,jdbcType=DECIMAL}
+       </foreach>
+       ,SJYL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.sjyl,jdbcType=DECIMAL}
+       </foreach>
+       ,KCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.kcl,jdbcType=DECIMAL}
+       </foreach>
+       ,WJZL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wjzl,jdbcType=DECIMAL}
+       </foreach>
+       ,SCLS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.scls,jdbcType=DECIMAL}
+       </foreach>
+       ,LL_1=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll1,jdbcType=DECIMAL}
+       </foreach>
+       ,LL_2=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll2,jdbcType=DECIMAL}
+       </foreach>
+       ,FGZL_NBHST=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlNbhst,jdbcType=DECIMAL}
+       </foreach>
+       ,FGZL_WG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlWg,jdbcType=DECIMAL}
+       </foreach>
+       ,LLDLYL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.lldlyl,jdbcType=DECIMAL}
+       </foreach>
+       ,WGFG_JFGK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgJfgk,jdbcType=DECIMAL}
+       </foreach>
+       ,WGFG_QXC=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgQxc,jdbcType=DECIMAL}
+       </foreach>
+       ,XCF=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.xcf,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,CZR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czr,jdbcType=VARCHAR}
+       </foreach>
+       ,CZSJ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czsj,jdbcType=TIMESTAMP}
+       </foreach>
+       ,WXGPCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wxgpcl,jdbcType=DECIMAL}
+       </foreach>
+       ,LLB=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.llb,jdbcType=DECIMAL}
+       </foreach>
+     where DATES in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.dates,jdbcType=TIMESTAMP}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_SCQK_LG
+    where DATES in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
 </mapper>

+ 333 - 333
src/main/java/com/steerinfo/ems/emsscqklg/model/EmsScqkLg.java

@@ -1,334 +1,334 @@
-package com.steerinfo.ems.emsscqklg.model;
-
-import com.steerinfo.framework.model.IBasePO;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-@ApiModel(value="生产情况-炼钢")
-public class EmsScqkLg implements IBasePO<Date> {
-    /**
-     * 生产日期(DATES,TIMESTAMP,7)
-     */
-    @ApiModelProperty(value="生产日期",required=true)
-    private Date dates;
-
-    /**
-     * 钢坯日产量(RCL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="钢坯日产量",required=false)
-    private BigDecimal rcl;
-
-    /**
-     * 进入炼钢铁水量(JTSL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="进入炼钢铁水量",required=false)
-    private BigDecimal jtsl;
-
-    /**
-     * 炼钢实际用量(SJYL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="炼钢实际用量",required=false)
-    private BigDecimal sjyl;
-
-    /**
-     * 库存量(铁水)(KCL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="库存量(铁水)",required=false)
-    private BigDecimal kcl;
-
-    /**
-     * 未浇钢水量(WJZL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="未浇钢水量",required=false)
-    private BigDecimal wjzl;
-
-    /**
-     * 生产炉数(SCLS,DECIMAL,0)
-     */
-    @ApiModelProperty(value="生产炉数",required=false)
-    private BigDecimal scls;
-
-    /**
-     * 1#炉龄(LL_1,DECIMAL,0)
-     */
-    @ApiModelProperty(value="1#炉龄",required=false)
-    private BigDecimal ll1;
-
-    /**
-     * 2#炉龄(LL_2,DECIMAL,0)
-     */
-    @ApiModelProperty(value="2#炉龄",required=false)
-    private BigDecimal ll2;
-
-    /**
-     * 废钢总量_内部含生铁(FGZL_NBHST,DECIMAL,0)
-     */
-    @ApiModelProperty(value="废钢总量_内部含生铁",required=false)
-    private BigDecimal fgzlNbhst;
-
-    /**
-     * 废钢总量_外购(FGZL_WG,DECIMAL,0)
-     */
-    @ApiModelProperty(value="废钢总量_外购",required=false)
-    private BigDecimal fgzlWg;
-
-    /**
-     * 冷料单炉用量(LLDLYL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="冷料单炉用量",required=false)
-    private BigDecimal lldlyl;
-
-    /**
-     * 外购废钢_进废钢坑(WGFG_JFGK,DECIMAL,0)
-     */
-    @ApiModelProperty(value="外购废钢_进废钢坑",required=false)
-    private BigDecimal wgfgJfgk;
-
-    /**
-     * 外购废钢_去席村废钢量(WGFG_QXC,DECIMAL,0)
-     */
-    @ApiModelProperty(value="外购废钢_去席村废钢量",required=false)
-    private BigDecimal wgfgQxc;
-
-    /**
-     * 席村返回废钢量(XCF,DECIMAL,0)
-     */
-    @ApiModelProperty(value="席村返回废钢量",required=false)
-    private BigDecimal xcf;
-
-    /**
-     * 记事(MEMO,VARCHAR,500)
-     */
-    @ApiModelProperty(value="记事",required=false)
-    private String memo;
-
-    /**
-     * 操作人(CZR,VARCHAR,10)
-     */
-    @ApiModelProperty(value="操作人",required=false)
-    private String czr;
-
-    /**
-     * 操作时间(CZSJ,TIMESTAMP,7)
-     */
-    @ApiModelProperty(value="操作时间",required=false)
-    private Date czsj;
-
-    /**
-     * 外销钢坯产量(WXGPCL,DECIMAL,0)
-     */
-    @ApiModelProperty(value="外销钢坯产量",required=false)
-    private BigDecimal wxgpcl;
-
-    /**
-     * 冷料比(LLB,DECIMAL,0)
-     */
-    @ApiModelProperty(value="冷料比",required=false)
-    private BigDecimal llb;
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public Date getId() {
-        return this.dates;
-    }
-
-    @Override
-    public void setId(Date dates) {
-        this.dates = dates;
-    }
-
-    public Date getDates() {
-        return dates;
-    }
-
-    public void setDates(Date dates) {
-        this.dates = dates;
-    }
-
-    public BigDecimal getRcl() {
-        return rcl;
-    }
-
-    public void setRcl(BigDecimal rcl) {
-        this.rcl = rcl;
-    }
-
-    public BigDecimal getJtsl() {
-        return jtsl;
-    }
-
-    public void setJtsl(BigDecimal jtsl) {
-        this.jtsl = jtsl;
-    }
-
-    public BigDecimal getSjyl() {
-        return sjyl;
-    }
-
-    public void setSjyl(BigDecimal sjyl) {
-        this.sjyl = sjyl;
-    }
-
-    public BigDecimal getKcl() {
-        return kcl;
-    }
-
-    public void setKcl(BigDecimal kcl) {
-        this.kcl = kcl;
-    }
-
-    public BigDecimal getWjzl() {
-        return wjzl;
-    }
-
-    public void setWjzl(BigDecimal wjzl) {
-        this.wjzl = wjzl;
-    }
-
-    public BigDecimal getScls() {
-        return scls;
-    }
-
-    public void setScls(BigDecimal scls) {
-        this.scls = scls;
-    }
-
-    public BigDecimal getLl1() {
-        return ll1;
-    }
-
-    public void setLl1(BigDecimal ll1) {
-        this.ll1 = ll1;
-    }
-
-    public BigDecimal getLl2() {
-        return ll2;
-    }
-
-    public void setLl2(BigDecimal ll2) {
-        this.ll2 = ll2;
-    }
-
-    public BigDecimal getFgzlNbhst() {
-        return fgzlNbhst;
-    }
-
-    public void setFgzlNbhst(BigDecimal fgzlNbhst) {
-        this.fgzlNbhst = fgzlNbhst;
-    }
-
-    public BigDecimal getFgzlWg() {
-        return fgzlWg;
-    }
-
-    public void setFgzlWg(BigDecimal fgzlWg) {
-        this.fgzlWg = fgzlWg;
-    }
-
-    public BigDecimal getLldlyl() {
-        return lldlyl;
-    }
-
-    public void setLldlyl(BigDecimal lldlyl) {
-        this.lldlyl = lldlyl;
-    }
-
-    public BigDecimal getWgfgJfgk() {
-        return wgfgJfgk;
-    }
-
-    public void setWgfgJfgk(BigDecimal wgfgJfgk) {
-        this.wgfgJfgk = wgfgJfgk;
-    }
-
-    public BigDecimal getWgfgQxc() {
-        return wgfgQxc;
-    }
-
-    public void setWgfgQxc(BigDecimal wgfgQxc) {
-        this.wgfgQxc = wgfgQxc;
-    }
-
-    public BigDecimal getXcf() {
-        return xcf;
-    }
-
-    public void setXcf(BigDecimal xcf) {
-        this.xcf = xcf;
-    }
-
-    public String getMemo() {
-        return memo;
-    }
-
-    public void setMemo(String memo) {
-        this.memo = memo == null ? null : memo.trim();
-    }
-
-    public String getCzr() {
-        return czr;
-    }
-
-    public void setCzr(String czr) {
-        this.czr = czr == null ? null : czr.trim();
-    }
-
-    public Date getCzsj() {
-        return czsj;
-    }
-
-    public void setCzsj(Date czsj) {
-        this.czsj = czsj;
-    }
-
-    public BigDecimal getWxgpcl() {
-        return wxgpcl;
-    }
-
-    public void setWxgpcl(BigDecimal wxgpcl) {
-        this.wxgpcl = wxgpcl;
-    }
-
-    public BigDecimal getLlb() {
-        return llb;
-    }
-
-    public void setLlb(BigDecimal llb) {
-        this.llb = llb;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", dates=").append(dates);
-        sb.append(", rcl=").append(rcl);
-        sb.append(", jtsl=").append(jtsl);
-        sb.append(", sjyl=").append(sjyl);
-        sb.append(", kcl=").append(kcl);
-        sb.append(", wjzl=").append(wjzl);
-        sb.append(", scls=").append(scls);
-        sb.append(", ll1=").append(ll1);
-        sb.append(", ll2=").append(ll2);
-        sb.append(", fgzlNbhst=").append(fgzlNbhst);
-        sb.append(", fgzlWg=").append(fgzlWg);
-        sb.append(", lldlyl=").append(lldlyl);
-        sb.append(", wgfgJfgk=").append(wgfgJfgk);
-        sb.append(", wgfgQxc=").append(wgfgQxc);
-        sb.append(", xcf=").append(xcf);
-        sb.append(", memo=").append(memo);
-        sb.append(", czr=").append(czr);
-        sb.append(", czsj=").append(czsj);
-        sb.append(", wxgpcl=").append(wxgpcl);
-        sb.append(", llb=").append(llb);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
+package com.steerinfo.ems.emsscqklg.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="生产情况-炼钢")
+public class EmsScqkLg implements IBasePO<Date> {
+    /**
+     * 生产日期(DATES,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="生产日期",required=true)
+    private Date dates;
+
+    /**
+     * 钢坯日产量(RCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="钢坯日产量",required=false)
+    private BigDecimal rcl;
+
+    /**
+     * 进入炼钢铁水量(JTSL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="进入炼钢铁水量",required=false)
+    private BigDecimal jtsl;
+
+    /**
+     * 炼钢实际用量(SJYL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="炼钢实际用量",required=false)
+    private BigDecimal sjyl;
+
+    /**
+     * 库存量(铁水)(KCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="库存量(铁水)",required=false)
+    private BigDecimal kcl;
+
+    /**
+     * 未浇钢水量(WJZL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="未浇钢水量",required=false)
+    private BigDecimal wjzl;
+
+    /**
+     * 生产炉数(SCLS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="生产炉数",required=false)
+    private BigDecimal scls;
+
+    /**
+     * 1#炉龄(LL_1,DECIMAL,0)
+     */
+    @ApiModelProperty(value="1#炉龄",required=false)
+    private BigDecimal ll1;
+
+    /**
+     * 2#炉龄(LL_2,DECIMAL,0)
+     */
+    @ApiModelProperty(value="2#炉龄",required=false)
+    private BigDecimal ll2;
+
+    /**
+     * 废钢总量_内部含生铁(FGZL_NBHST,DECIMAL,0)
+     */
+    @ApiModelProperty(value="废钢总量_内部含生铁",required=false)
+    private BigDecimal fgzlNbhst;
+
+    /**
+     * 废钢总量_外购(FGZL_WG,DECIMAL,0)
+     */
+    @ApiModelProperty(value="废钢总量_外购",required=false)
+    private BigDecimal fgzlWg;
+
+    /**
+     * 冷料单炉用量(LLDLYL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="冷料单炉用量",required=false)
+    private BigDecimal lldlyl;
+
+    /**
+     * 外购废钢_进废钢坑(WGFG_JFGK,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外购废钢_进废钢坑",required=false)
+    private BigDecimal wgfgJfgk;
+
+    /**
+     * 外购废钢_去席村废钢量(WGFG_QXC,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外购废钢_去席村废钢量",required=false)
+    private BigDecimal wgfgQxc;
+
+    /**
+     * 席村返回废钢量(XCF,DECIMAL,0)
+     */
+    @ApiModelProperty(value="席村返回废钢量",required=false)
+    private BigDecimal xcf;
+
+    /**
+     * 记事(MEMO,VARCHAR,500)
+     */
+    @ApiModelProperty(value="记事",required=false)
+    private String memo;
+
+    /**
+     * 操作人(CZR,VARCHAR,10)
+     */
+    @ApiModelProperty(value="操作人",required=false)
+    private String czr;
+
+    /**
+     * 操作时间(CZSJ,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="操作时间",required=false)
+    private Date czsj;
+
+    /**
+     * 外销钢坯产量(WXGPCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外销钢坯产量",required=false)
+    private BigDecimal wxgpcl;
+
+    /**
+     * 冷料比(LLB,DECIMAL,0)
+     */
+    @ApiModelProperty(value="冷料比",required=false)
+    private BigDecimal llb;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Date getId() {
+        return this.dates;
+    }
+
+    @Override
+    public void setId(Date dates) {
+        this.dates = dates;
+    }
+
+    public Date getDates() {
+        return dates;
+    }
+
+    public void setDates(Date dates) {
+        this.dates = dates;
+    }
+
+    public BigDecimal getRcl() {
+        return rcl;
+    }
+
+    public void setRcl(BigDecimal rcl) {
+        this.rcl = rcl;
+    }
+
+    public BigDecimal getJtsl() {
+        return jtsl;
+    }
+
+    public void setJtsl(BigDecimal jtsl) {
+        this.jtsl = jtsl;
+    }
+
+    public BigDecimal getSjyl() {
+        return sjyl;
+    }
+
+    public void setSjyl(BigDecimal sjyl) {
+        this.sjyl = sjyl;
+    }
+
+    public BigDecimal getKcl() {
+        return kcl;
+    }
+
+    public void setKcl(BigDecimal kcl) {
+        this.kcl = kcl;
+    }
+
+    public BigDecimal getWjzl() {
+        return wjzl;
+    }
+
+    public void setWjzl(BigDecimal wjzl) {
+        this.wjzl = wjzl;
+    }
+
+    public BigDecimal getScls() {
+        return scls;
+    }
+
+    public void setScls(BigDecimal scls) {
+        this.scls = scls;
+    }
+
+    public BigDecimal getLl1() {
+        return ll1;
+    }
+
+    public void setLl1(BigDecimal ll1) {
+        this.ll1 = ll1;
+    }
+
+    public BigDecimal getLl2() {
+        return ll2;
+    }
+
+    public void setLl2(BigDecimal ll2) {
+        this.ll2 = ll2;
+    }
+
+    public BigDecimal getFgzlNbhst() {
+        return fgzlNbhst;
+    }
+
+    public void setFgzlNbhst(BigDecimal fgzlNbhst) {
+        this.fgzlNbhst = fgzlNbhst;
+    }
+
+    public BigDecimal getFgzlWg() {
+        return fgzlWg;
+    }
+
+    public void setFgzlWg(BigDecimal fgzlWg) {
+        this.fgzlWg = fgzlWg;
+    }
+
+    public BigDecimal getLldlyl() {
+        return lldlyl;
+    }
+
+    public void setLldlyl(BigDecimal lldlyl) {
+        this.lldlyl = lldlyl;
+    }
+
+    public BigDecimal getWgfgJfgk() {
+        return wgfgJfgk;
+    }
+
+    public void setWgfgJfgk(BigDecimal wgfgJfgk) {
+        this.wgfgJfgk = wgfgJfgk;
+    }
+
+    public BigDecimal getWgfgQxc() {
+        return wgfgQxc;
+    }
+
+    public void setWgfgQxc(BigDecimal wgfgQxc) {
+        this.wgfgQxc = wgfgQxc;
+    }
+
+    public BigDecimal getXcf() {
+        return xcf;
+    }
+
+    public void setXcf(BigDecimal xcf) {
+        this.xcf = xcf;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getCzr() {
+        return czr;
+    }
+
+    public void setCzr(String czr) {
+        this.czr = czr == null ? null : czr.trim();
+    }
+
+    public Date getCzsj() {
+        return czsj;
+    }
+
+    public void setCzsj(Date czsj) {
+        this.czsj = czsj;
+    }
+
+    public BigDecimal getWxgpcl() {
+        return wxgpcl;
+    }
+
+    public void setWxgpcl(BigDecimal wxgpcl) {
+        this.wxgpcl = wxgpcl;
+    }
+
+    public BigDecimal getLlb() {
+        return llb;
+    }
+
+    public void setLlb(BigDecimal llb) {
+        this.llb = llb;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", dates=").append(dates);
+        sb.append(", rcl=").append(rcl);
+        sb.append(", jtsl=").append(jtsl);
+        sb.append(", sjyl=").append(sjyl);
+        sb.append(", kcl=").append(kcl);
+        sb.append(", wjzl=").append(wjzl);
+        sb.append(", scls=").append(scls);
+        sb.append(", ll1=").append(ll1);
+        sb.append(", ll2=").append(ll2);
+        sb.append(", fgzlNbhst=").append(fgzlNbhst);
+        sb.append(", fgzlWg=").append(fgzlWg);
+        sb.append(", lldlyl=").append(lldlyl);
+        sb.append(", wgfgJfgk=").append(wgfgJfgk);
+        sb.append(", wgfgQxc=").append(wgfgQxc);
+        sb.append(", xcf=").append(xcf);
+        sb.append(", memo=").append(memo);
+        sb.append(", czr=").append(czr);
+        sb.append(", czsj=").append(czsj);
+        sb.append(", wxgpcl=").append(wxgpcl);
+        sb.append(", llb=").append(llb);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
 }

+ 23 - 23
src/main/java/com/steerinfo/ems/emsscqklg/service/IEmsScqkLgService.java

@@ -1,24 +1,24 @@
-package com.steerinfo.ems.emsscqklg.service;
-
-import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
-import com.steerinfo.framework.service.IBaseService;
-
-import java.util.Date;
-
-/**
- * EmsScqkLg服务接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-19 10:43
- * 类描述
- * 修订历史:
- * 日期:2021-10-19
- * 作者:generator
- * 参考:
- * 描述:EmsScqkLg服务接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-
-public interface IEmsScqkLgService extends IBaseService<EmsScqkLg, Date>{
-    int dateGenerate();
+package com.steerinfo.ems.emsscqklg.service;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.Date;
+
+/**
+ * EmsScqkLg服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+
+public interface IEmsScqkLgService extends IBaseService<EmsScqkLg, Date>{
+    int dateGenerate();
 }

+ 131 - 0
src/main/java/com/steerinfo/ems/foldthevalues/controller/FoldTheValuesController.java

@@ -0,0 +1,131 @@
+package com.steerinfo.ems.foldthevalues.controller;
+
+import com.steerinfo.ems.foldthevalues.mapper.FoldTheValuesMapper;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.foldthevalues.model.FoldTheValues;
+import com.steerinfo.ems.foldthevalues.service.IFoldTheValuesService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.script.ScriptException;
+import java.util.*;
+import java.math.BigDecimal;
+
+/**
+ * FoldTheValues RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:33
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:FoldTheValues RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/foldthevaluess")
+public class FoldTheValuesController extends BaseRESTfulController {
+
+    @Autowired
+    IFoldTheValuesService foldTheValuesService;
+    @Autowired
+    FoldTheValuesMapper foldTheValuesMapper;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("foldthevalues:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<FoldTheValues> list = foldTheValuesService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("foldthevalues:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<FoldTheValues> list = foldTheValuesService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据FoldTheValues对象创建")
+    @ApiImplicitParam(name = "foldTheValues", value = "详细实体foldTheValues", required = true, dataType = "FoldTheValues")
+    //@RequiresPermissions("foldthevalues:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute FoldTheValues model){
+        FoldTheValues foldTheValues = foldTheValuesService.add(model);
+        return success(foldTheValues);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("foldthevalues:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        FoldTheValues foldTheValues = foldTheValuesService.getById(id);
+        return success(foldTheValues);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的foldTheValues信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "foldTheValues", value = "详细实体foldTheValues", required = true, dataType = "FoldTheValues")
+    })
+    //@RequiresPermissions("foldthevalues:update")
+    @PutMapping(produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update( @RequestBody FoldTheValues[] models){
+        for (FoldTheValues model : models) {
+            foldTheValuesMapper.updateByPrimaryKey(model);
+        }
+        return success();
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("foldthevalues:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  foldTheValuesService.delete(ids);
+    	}
+      return success();
+    }
+
+    @GetMapping("/aaa")
+    public RESTfulResult getdate() throws ScriptException {
+        foldTheValuesService.getDate();
+        return  success();
+    }
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("foldthevalues:view")
+    @GetMapping(value = "/getDateForPage")
+    public RESTfulResult getDateForPage (@RequestParam HashMap<String, Object> parmas,Integer pageNum, Integer pageSize) {
+        PageList<Map<String, Object>> forPage = foldTheValuesService.getDateForPage(parmas, pageNum, pageSize);
+        return success(forPage);
+    }
+
+}

+ 20 - 0
src/main/java/com/steerinfo/ems/foldthevalues/mapper/FoldTheValuesMapper.java

@@ -0,0 +1,20 @@
+package com.steerinfo.ems.foldthevalues.mapper;
+
+import com.steerinfo.ems.foldthevalues.model.FoldTheValues;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface FoldTheValuesMapper extends IBaseMapper<FoldTheValues, String> {
+    /**
+     * 获取页面数据
+     * @param parmas
+     * @return
+     */
+    List<Map<String, Object>> getDateForPage(HashMap<String,Object> parmas);
+}

+ 356 - 0
src/main/java/com/steerinfo/ems/foldthevalues/mapper/FoldTheValuesMapper.xml

@@ -0,0 +1,356 @@
+<?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.steerinfo.ems.foldthevalues.mapper.FoldTheValuesMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.foldthevalues.model.FoldTheValues">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="MATERIALSOURCE" jdbcType="VARCHAR" property="materialsource" />
+    <result column="CLOCK" jdbcType="VARCHAR" property="clock" />
+    <result column="CODE" jdbcType="VARCHAR" property="code" />
+    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
+    <result column="ISAVAILABLE" jdbcType="VARCHAR" property="isavailable" />
+    <result column="REVISOR" jdbcType="VARCHAR" property="revisor" />
+    <result column="REVISETIME" jdbcType="VARCHAR" property="revisetime" />
+    <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
+    <result column="BZ" jdbcType="VARCHAR" property="bz" />
+    <result column="MATERIALNO" jdbcType="VARCHAR" property="materialno"/>
+  </resultMap>
+  <sql id="columns">
+    ID, MATERIALSOURCE, CLOCK, CODE, DESCRIPTION, ISAVAILABLE, REVISOR, REVISETIME,
+    UNITID, BZ,MATERIALNO
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.MATERIALSOURCE, t.CLOCK, t.CODE, t.DESCRIPTION, t.ISAVAILABLE, t.REVISOR,
+    t.REVISETIME, t.UNITID, t.BZ,t.MATERIALNO
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM FOLD_THE_VALUES
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM FOLD_THE_VALUES t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="materialsource != null and materialsource != ''">
+        and MATERIALSOURCE = #{materialsource}
+      </if>
+      <if test="clock != null and clock != ''">
+        and CLOCK = #{clock}
+      </if>
+      <if test="code != null and code != ''">
+        and CODE = #{code}
+      </if>
+      <if test="description != null and description != ''">
+        and DESCRIPTION = #{description}
+      </if>
+      <if test="isavailable != null and isavailable != ''">
+        and ISAVAILABLE = #{isavailable}
+      </if>
+      <if test="revisor != null and revisor != ''">
+        and REVISOR = #{revisor}
+      </if>
+      <if test="revisetime != null and revisetime != ''">
+        and REVISETIME = #{revisetime}
+      </if>
+      <if test="unitid != null and unitid != ''">
+        and UNITID = #{unitid}
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ = #{bz}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="materialsource != null and materialsource != ''">
+        and MATERIALSOURCE LIKE '%${materialsource}%'
+      </if>
+      <if test="clock != null and clock != ''">
+        and CLOCK LIKE '%${clock}%'
+      </if>
+      <if test="code != null and code != ''">
+        and CODE LIKE '%${code}%'
+      </if>
+      <if test="description != null and description != ''">
+        and DESCRIPTION LIKE '%${description}%'
+      </if>
+      <if test="isavailable != null and isavailable != ''">
+        and ISAVAILABLE LIKE '%${isavailable}%'
+      </if>
+      <if test="revisor != null and revisor != ''">
+        and REVISOR LIKE '%${revisor}%'
+      </if>
+      <if test="revisetime != null and revisetime != ''">
+        and REVISETIME LIKE '%${revisetime}%'
+      </if>
+      <if test="unitid != null and unitid != ''">
+        and UNITID LIKE '%${unitid}%'
+      </if>
+      <if test="bz != null and bz != ''">
+        and BZ LIKE '%${bz}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from FOLD_THE_VALUES
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from FOLD_THE_VALUES
+    where 1!=1 
+      <if test="materialsource != null and materialsource != ''">
+        or MATERIALSOURCE = #{materialsource}
+      </if>
+      <if test="clock != null and clock != ''">
+        or CLOCK = #{clock}
+      </if>
+      <if test="code != null and code != ''">
+        or CODE = #{code}
+      </if>
+      <if test="description != null and description != ''">
+        or DESCRIPTION = #{description}
+      </if>
+      <if test="isavailable != null and isavailable != ''">
+        or ISAVAILABLE = #{isavailable}
+      </if>
+      <if test="revisor != null and revisor != ''">
+        or REVISOR = #{revisor}
+      </if>
+      <if test="revisetime != null and revisetime != ''">
+        or REVISETIME = #{revisetime}
+      </if>
+      <if test="unitid != null and unitid != ''">
+        or UNITID = #{unitid}
+      </if>
+      <if test="bz != null and bz != ''">
+        or BZ = #{bz}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.foldthevalues.model.FoldTheValues">
+    insert into FOLD_THE_VALUES (ID, MATERIALSOURCE, CLOCK,
+      CODE, DESCRIPTION, ISAVAILABLE, 
+      REVISOR, REVISETIME,MATERIALNO,
+      UNITID, BZ)
+    values (#{id,jdbcType=VARCHAR}, #{materialsource,jdbcType=VARCHAR}, #{clock,jdbcType=VARCHAR}, 
+      #{code,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{isavailable,jdbcType=VARCHAR}, 
+      #{revisor,jdbcType=VARCHAR}, #{revisetime,jdbcType=VARCHAR},#{materialno,jdbcType=VARCHAR},
+      #{unitid,jdbcType=VARCHAR}, #{bz,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.foldthevalues.model.FoldTheValues">
+    insert into FOLD_THE_VALUES
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="materialsource != null">
+        MATERIALSOURCE,
+      </if>
+      <if test="clock != null">
+        CLOCK,
+      </if>
+      <if test="code != null">
+        CODE,
+      </if>
+      <if test="description != null">
+        DESCRIPTION,
+      </if>
+      <if test="isavailable != null">
+        ISAVAILABLE,
+      </if>
+      <if test="revisor != null">
+        REVISOR,
+      </if>
+      <if test="revisetime != null">
+        REVISETIME,
+      </if>
+      <if test="unitid != null">
+        UNITID,
+      </if>
+      <if test="bz != null">
+        BZ,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="materialsource != null">
+        #{materialsource,jdbcType=VARCHAR},
+      </if>
+      <if test="clock != null">
+        #{clock,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="isavailable != null">
+        #{isavailable,jdbcType=VARCHAR},
+      </if>
+      <if test="revisor != null">
+        #{revisor,jdbcType=VARCHAR},
+      </if>
+      <if test="revisetime != null">
+        #{revisetime,jdbcType=VARCHAR},
+      </if>
+      <if test="unitid != null">
+        #{unitid,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        #{bz,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.foldthevalues.model.FoldTheValues">
+    update FOLD_THE_VALUES
+    set
+      CLOCK = #{clock,jdbcType=VARCHAR},
+      CODE = #{code,jdbcType=VARCHAR},
+      DESCRIPTION = #{description,jdbcType=VARCHAR},
+      ISAVAILABLE = #{isavailable,jdbcType=VARCHAR},
+      REVISOR = #{revisor,jdbcType=VARCHAR},
+      REVISETIME = #{revisetime,jdbcType=VARCHAR},
+      UNITID = #{unitid,jdbcType=VARCHAR},
+      BZ = #{bz,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.foldthevalues.model.FoldTheValues">
+    update FOLD_THE_VALUES
+    <set>
+      <if test="materialsource != null">
+        MATERIALSOURCE = #{materialsource,jdbcType=VARCHAR},
+      </if>
+      <if test="clock != null">
+        CLOCK = #{clock,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        CODE = #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        DESCRIPTION = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="isavailable != null">
+        ISAVAILABLE = #{isavailable,jdbcType=VARCHAR},
+      </if>
+      <if test="revisor != null">
+        REVISOR = #{revisor,jdbcType=VARCHAR},
+      </if>
+      <if test="revisetime != null">
+        REVISETIME = #{revisetime,jdbcType=VARCHAR},
+      </if>
+      <if test="unitid != null">
+        UNITID = #{unitid,jdbcType=VARCHAR},
+      </if>
+      <if test="bz != null">
+        BZ = #{bz,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into FOLD_THE_VALUES 
+      (ID, 
+      MATERIALSOURCE, CLOCK, CODE, 
+      DESCRIPTION, ISAVAILABLE, REVISOR, 
+      REVISETIME, UNITID,
+      BZ)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.materialsource,jdbcType=VARCHAR}, #{item.clock,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR}, 
+      #{item.description,jdbcType=VARCHAR}, #{item.isavailable,jdbcType=VARCHAR}, #{item.revisor,jdbcType=VARCHAR}, 
+      #{item.revisetime,jdbcType=VARCHAR}, #{item.unitid,jdbcType=VARCHAR},
+      #{item.bz,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update FOLD_THE_VALUES
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALSOURCE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.materialsource,jdbcType=VARCHAR}
+       </foreach>
+       ,CLOCK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.clock,jdbcType=VARCHAR}
+       </foreach>
+       ,CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.code,jdbcType=VARCHAR}
+       </foreach>
+       ,DESCRIPTION=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.description,jdbcType=VARCHAR}
+       </foreach>
+       ,ISAVAILABLE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.isavailable,jdbcType=VARCHAR}
+       </foreach>
+       ,REVISOR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.revisor,jdbcType=VARCHAR}
+       </foreach>
+       ,REVISETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.revisetime,jdbcType=VARCHAR}
+       </foreach>
+       ,UNITID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.unitid,jdbcType=VARCHAR}
+       </foreach>
+       ,BZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from FOLD_THE_VALUES
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getDateForPage" parameterType="java.util.HashMap" resultType="Map">
+    select t.*, t1.id as energyid, t1.name as energyname
+      from Fold_the_values t
+      left join t_rm_energy t1
+      on t.materialno = t1.bdesc1
+      <where>
+        <if test="clock != null and clock != '' ">
+          and t.clock = #{clock}
+        </if>
+        <if test="energyid != null and energyid != '' ">
+          and t1.energyid = #{energyid}
+        </if>
+      </where>
+  </select>
+</mapper>

+ 181 - 0
src/main/java/com/steerinfo/ems/foldthevalues/model/FoldTheValues.java

@@ -0,0 +1,181 @@
+package com.steerinfo.ems.foldthevalues.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="折标系数值表")
+public class FoldTheValues implements IBasePO<String> {
+    /**
+     * ID(ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String id;
+
+    @ApiModelProperty(value="物料来源",required=false)
+    private String materialsource;
+
+    /**
+     * 版本(CLOCK,VARCHAR,30)
+     */
+    @ApiModelProperty(value="版本",required=false)
+    private String clock;
+
+    /**
+     * 折标值(CODE,VARCHAR,60)
+     */
+    @ApiModelProperty(value="折标值",required=false)
+    private String code;
+
+    /**
+     * 描述(DESCRIPTION,VARCHAR,500)
+     */
+    @ApiModelProperty(value="描述",required=false)
+    private String description;
+
+    /**
+     * 是否可用(ISAVAILABLE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="是否可用",required=false)
+    private String isavailable;
+
+    /**
+     * 修改者(REVISOR,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改者",required=false)
+    private String revisor;
+
+    /**
+     * 修改时间(REVISETIME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private String revisetime;
+
+    /**
+     * 单位(UNITID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="单位",required=false)
+    private String unitid;
+    /**
+     * 物料编码
+     */
+     @ApiModelProperty(value="物料编码",required=false)
+     private String materialno;
+
+    public String getMaterialno() {
+        return materialno;
+    }
+
+    public void setMaterialno(String materialno) {
+        this.materialno = materialno;
+    }
+
+    /**
+     * 备注(BZ,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String bz;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getMaterialsource() {
+        return materialsource;
+    }
+
+    public void setMaterialsource(String materialsource) {
+        this.materialsource = materialsource == null ? null : materialsource.trim();
+    }
+
+    public String getClock() {
+        return clock;
+    }
+
+    public void setClock(String clock) {
+        this.clock = clock == null ? null : clock.trim();
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description == null ? null : description.trim();
+    }
+
+    public String getIsavailable() {
+        return isavailable;
+    }
+
+    public void setIsavailable(String isavailable) {
+        this.isavailable = isavailable == null ? null : isavailable.trim();
+    }
+
+    public String getRevisor() {
+        return revisor;
+    }
+
+    public void setRevisor(String revisor) {
+        this.revisor = revisor == null ? null : revisor.trim();
+    }
+
+    public String getRevisetime() {
+        return revisetime;
+    }
+
+    public void setRevisetime(String revisetime) {
+        this.revisetime = revisetime == null ? null : revisetime.trim();
+    }
+
+    public String getUnitid() {
+        return unitid;
+    }
+
+    public void setUnitid(String unitid) {
+        this.unitid = unitid == null ? null : unitid.trim();
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz == null ? null : bz.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", materialsource=").append(materialsource);
+        sb.append(", clock=").append(clock);
+        sb.append(", code=").append(code);
+        sb.append(", description=").append(description);
+        sb.append(", isavailable=").append(isavailable);
+        sb.append(", revisor=").append(revisor);
+        sb.append(", revisetime=").append(revisetime);
+        sb.append(", unitid=").append(unitid);
+        sb.append(", bz=").append(bz);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 32 - 0
src/main/java/com/steerinfo/ems/foldthevalues/service/IFoldTheValuesService.java

@@ -0,0 +1,32 @@
+package com.steerinfo.ems.foldthevalues.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.foldthevalues.model.FoldTheValues;
+import com.steerinfo.framework.service.pagehelper.PageList;
+
+import javax.script.ScriptException;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * FoldTheValues服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:33
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:FoldTheValues服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IFoldTheValuesService extends IBaseService<FoldTheValues, String>{
+    public void getDate()throws ScriptException;
+
+    public PageList<Map<String, Object>> getDateForPage(HashMap<String, Object> parmas, Integer pageNum,
+                                                   Integer pageSize);
+
+}

+ 114 - 0
src/main/java/com/steerinfo/ems/foldthevalues/service/impl/FoldTheValuesServiceImpl.java

@@ -0,0 +1,114 @@
+package com.steerinfo.ems.foldthevalues.service.impl;
+
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.emscalorificvalue.mapper.EmsCalorificValueMapper;
+import com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue;
+import com.steerinfo.ems.njformula.mapper.NjFormulaMapper;
+import com.steerinfo.ems.njformula.model.NjFormula;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.foldthevalues.model.FoldTheValues;
+import com.steerinfo.ems.foldthevalues.mapper.FoldTheValuesMapper;
+import com.steerinfo.ems.foldthevalues.service.IFoldTheValuesService;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+import java.text.DecimalFormat;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * FoldTheValues服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:33
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:FoldTheValues服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "foldTheValuesService")
+public class FoldTheValuesServiceImpl extends BaseServiceImpl<FoldTheValues, String> implements IFoldTheValuesService {
+    @Autowired
+    private FoldTheValuesMapper foldTheValuesMapper;
+    @Autowired
+    private EmsCalorificValueMapper emsCalorificValueMapper;
+    @Autowired
+    private NjFormulaMapper njFormulaMapper;
+
+
+    @Override
+    protected IBaseMapper<FoldTheValues, String> getMapper() {
+        return foldTheValuesMapper;
+    }
+
+    public void getDate() throws ScriptException {
+        List<EmsCalorificValue> newDate = emsCalorificValueMapper.getNewDate();
+        FoldTheValues foldTheValues = new FoldTheValues();
+        for (EmsCalorificValue emsCalorificValue : newDate) {
+            foldTheValues.setMaterialsource(emsCalorificValue.getMaterialsource());
+            foldTheValues.setClock(emsCalorificValue.getSampleno());
+            foldTheValues.setCode(this.getzbz(emsCalorificValue) == null ? "0.00" : this.getzbz(emsCalorificValue));
+            foldTheValues.setMaterialno(emsCalorificValue.getMaterialno());
+            foldTheValues.setIsavailable("0");
+            foldTheValues.setUnitid("033");
+            foldTheValues.setId(emsCalorificValue.getWtbh());
+            foldTheValuesMapper.insert(foldTheValues);
+        }
+    }
+
+    @Override
+    public PageList<Map<String, Object>> getDateForPage(HashMap<String, Object> parmas, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> dateLc = foldTheValuesMapper.getDateForPage(parmas);
+        PageList<Map<String, Object>> pageInfo = new PageList<Map<String, Object>>(dateLc);
+        return pageInfo;
+    }
+
+    //获取折标值
+    public String getzbz(EmsCalorificValue emsCalorificValue) throws ScriptException {
+        ScriptEngine jse = new ScriptEngineManager().getEngineByName("JavaScript");
+        //首先获取公式
+        NjFormula njFormula = njFormulaMapper.getByMateralNo(emsCalorificValue.getMaterialno());
+        String formula = njFormula.getCode();
+        if (null == formula ){
+            return  null;
+        }
+        HashMap map =  new HashMap();
+        map.put("wtbh",emsCalorificValue.getWtbh());
+        if(formula.contains("CO") == true){
+            map.put("item","CO");
+            String value = emsCalorificValueMapper.getValue(map) == null ? "0.00" : emsCalorificValueMapper.getValue(map);
+            formula = formula.replace("CO", value);
+        }
+        if (formula.contains("H2") == true){
+            map.put("item","H2");
+            String value = emsCalorificValueMapper.getValue(map) == null ? "0.00" : emsCalorificValueMapper.getValue(map);
+            formula = formula.replace("H2", value);
+        }
+        if (formula.contains("CH4") == true){
+            map.put("item","CH4");
+            String value = emsCalorificValueMapper.getValue(map) == null ? "0.00" : emsCalorificValueMapper.getValue(map);
+            formula = formula.replace("CH4", value);
+        }
+        if (formula.contains("N2") == true){
+            map.put("item","N2");
+            String value = emsCalorificValueMapper.getValue(map) == null ? "0.00" :emsCalorificValueMapper.getValue(map);
+            formula = formula.replace("N2", value);
+        }
+        DecimalFormat df   = new DecimalFormat("0.00");
+        return  df.format(jse.eval(formula)).toString();
+    }
+
+}

+ 110 - 0
src/main/java/com/steerinfo/ems/njformula/controller/NjFormulaController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.ems.njformula.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.njformula.model.NjFormula;
+import com.steerinfo.ems.njformula.service.INjFormulaService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * NjFormula RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:53
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:NjFormula RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/njformulas")
+public class NjFormulaController extends BaseRESTfulController {
+
+    @Autowired
+    INjFormulaService njFormulaService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("njformula:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<NjFormula> list = njFormulaService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("njformula:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<NjFormula> list = njFormulaService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据NjFormula对象创建")
+    @ApiImplicitParam(name = "njFormula", value = "详细实体njFormula", required = true, dataType = "NjFormula")
+    //@RequiresPermissions("njformula:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute NjFormula model){
+        NjFormula njFormula = njFormulaService.add(model);
+        return success(njFormula);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("njformula:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        NjFormula njFormula = njFormulaService.getById(id);
+        return success(njFormula);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的njFormula信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "njFormula", value = "详细实体njFormula", required = true, dataType = "NjFormula")
+    })
+    //@RequiresPermissions("njformula:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody NjFormula model){
+        model.setId(id);
+        NjFormula njFormula = njFormulaService.modify(model);
+        return success(njFormula);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("njformula:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  njFormulaService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 13 - 0
src/main/java/com/steerinfo/ems/njformula/mapper/NjFormulaMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.ems.njformula.mapper;
+
+import com.steerinfo.ems.njformula.model.NjFormula;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface NjFormulaMapper extends IBaseMapper<NjFormula, String> {
+    //根据物料编码获取公式
+    public NjFormula getByMateralNo(@Param("MateralNo") String MateralNo);
+}

+ 192 - 0
src/main/java/com/steerinfo/ems/njformula/mapper/NjFormulaMapper.xml

@@ -0,0 +1,192 @@
+<?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.steerinfo.ems.njformula.mapper.NjFormulaMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.njformula.model.NjFormula">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="MATERIALNO" jdbcType="VARCHAR" property="materialno" />
+    <result column="CODE" jdbcType="VARCHAR" property="code" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+  </resultMap>
+  <sql id="columns">
+    ID, MATERIALNO, CODE, MEMO
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.MATERIALNO, t.CODE, t.MEMO
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM NJ_FORMULA
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM NJ_FORMULA t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="materialno != null and materialno != ''">
+        and MATERIALNO = #{materialno}
+      </if>
+      <if test="code != null and code != ''">
+        and CODE = #{code}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="materialno != null and materialno != ''">
+        and MATERIALNO LIKE '%${materialno}%'
+      </if>
+      <if test="code != null and code != ''">
+        and CODE LIKE '%${code}%'
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from NJ_FORMULA
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from NJ_FORMULA
+    where 1!=1 
+      <if test="materialno != null and materialno != ''">
+        or MATERIALNO = #{materialno}
+      </if>
+      <if test="code != null and code != ''">
+        or CODE = #{code}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.njformula.model.NjFormula">
+    insert into NJ_FORMULA (ID, MATERIALNO, CODE, 
+      MEMO)
+    values (#{id,jdbcType=VARCHAR}, #{materialno,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
+      #{memo,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.njformula.model.NjFormula">
+    insert into NJ_FORMULA
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="materialno != null">
+        MATERIALNO,
+      </if>
+      <if test="code != null">
+        CODE,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="materialno != null">
+        #{materialno,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.njformula.model.NjFormula">
+    update NJ_FORMULA
+    set MATERIALNO = #{materialno,jdbcType=VARCHAR},
+      CODE = #{code,jdbcType=VARCHAR},
+      MEMO = #{memo,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.njformula.model.NjFormula">
+    update NJ_FORMULA
+    <set>
+      <if test="materialno != null">
+        MATERIALNO = #{materialno,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        CODE = #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into NJ_FORMULA 
+      (ID, 
+      MATERIALNO, CODE, MEMO
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.materialno,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update NJ_FORMULA
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALNO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.materialno,jdbcType=VARCHAR}
+       </foreach>
+       ,CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.code,jdbcType=VARCHAR}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from NJ_FORMULA
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+<!--  根据物料编码获取公式-->
+  <select id="getByMateralNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select t.code from NJ_FORMULA t where
+    t.MATERIALNO =#{MateralNo}
+  </select>
+</mapper>

+ 81 - 0
src/main/java/com/steerinfo/ems/njformula/model/NjFormula.java

@@ -0,0 +1,81 @@
+package com.steerinfo.ems.njformula.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="null")
+public class NjFormula implements IBasePO<String> {
+    /**
+     * ID(ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String id;
+
+    /**
+     * 物料编码(MATERIALNO,VARCHAR,50)
+     */
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialno;
+
+    /**
+     * 公式内容(CODE,VARCHAR,1000)
+     */
+    @ApiModelProperty(value="公式内容",required=false)
+    private String code;
+
+    /**
+     * 备注(MEMO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getMaterialno() {
+        return materialno;
+    }
+
+    public void setMaterialno(String materialno) {
+        this.materialno = materialno == null ? null : materialno.trim();
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", materialno=").append(materialno);
+        sb.append(", code=").append(code);
+        sb.append(", memo=").append(memo);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/steerinfo/ems/njformula/service/INjFormulaService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.ems.njformula.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.njformula.model.NjFormula;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * NjFormula服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:53
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:NjFormula服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface INjFormulaService extends IBaseService<NjFormula, String>{
+    //根据物料编码获取公式
+    public NjFormula getByMateralNo(@Param("MateralNo") String MateralNo);
+}

+ 41 - 0
src/main/java/com/steerinfo/ems/njformula/service/impl/NjFormulaServiceImpl.java

@@ -0,0 +1,41 @@
+package com.steerinfo.ems.njformula.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.njformula.model.NjFormula;
+import com.steerinfo.ems.njformula.mapper.NjFormulaMapper;
+import com.steerinfo.ems.njformula.service.INjFormulaService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * NjFormula服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-14 02:53
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-14
+ * 作者:generator
+ * 参考:
+ * 描述:NjFormula服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "njFormulaService")
+public class NjFormulaServiceImpl extends BaseServiceImpl<NjFormula, String> implements INjFormulaService {
+
+    @Autowired
+    private NjFormulaMapper njFormulaMapper;
+
+    @Override
+    protected IBaseMapper<NjFormula, String> getMapper() {
+        return njFormulaMapper;
+    }
+
+    @Override
+    public NjFormula getByMateralNo(String MateralNo) {
+        return njFormulaMapper.getByMateralNo(MateralNo);
+    }
+}

+ 108 - 108
src/main/java/com/steerinfo/ems/rttable/controller/RttableController.java

@@ -1,108 +1,108 @@
-package com.steerinfo.ems.rttable.controller;
-
-import com.steerinfo.ems.rttable.model.Rttable;
-import com.steerinfo.ems.rttable.service.IRttableService;
-import com.steerinfo.framework.controller.BaseRESTfulController;
-import com.steerinfo.framework.controller.RESTfulResult;
-import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * Rttable RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-15 03:37
- * 类描述
- * 修订历史:
- * 日期:2021-10-15
- * 作者:generator
- * 参考:
- * 描述:Rttable RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-@RestController
-@RequestMapping("/${api.version}/rttables")
-public class RttableController extends BaseRESTfulController {
-
-    @Autowired
-    IRttableService rttableService;
-
-    @ApiOperation(value="获取列表", notes="分页查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("rttable:view")
-    @GetMapping(value = "/")
-    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<Rttable> list = rttableService.queryForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-
-    @ApiOperation(value="获取列表", notes="分页模糊查询")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
-    })
-    //@RequiresPermissions("rttable:view")
-    @GetMapping(value = "/like/")
-    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-        PageList<Rttable> list = rttableService.queryLikeForPage(parmas, pageNum, pageSize);
-        return success(list);
-    }
-    
-    @ApiOperation(value="创建", notes="根据Rttable对象创建")
-    @ApiImplicitParam(name = "rttable", value = "详细实体rttable", required = true, dataType = "Rttable")
-    //@RequiresPermissions("rttable:create")
-    @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute Rttable model){
-        Rttable rttable = rttableService.add(model);
-        return success(rttable);
-    }
-
-    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
-    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
-    //@RequiresPermissions("rttable:view")
-    @GetMapping(value = "/{id}")
-    public RESTfulResult get(@PathVariable BigDecimal id){
-        Rttable rttable = rttableService.getById(id);
-        return success(rttable);
-    }
-
-    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的rttable信息来更新详细信息")
-    @ApiImplicitParams({
-        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal"),
-        @ApiImplicitParam(name = "rttable", value = "详细实体rttable", required = true, dataType = "Rttable")
-    })
-    //@RequiresPermissions("rttable:update")
-    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult update(@PathVariable BigDecimal id, @RequestBody Rttable model){
-        model.setId(id);
-        Rttable rttable = rttableService.modify(model);
-        return success(rttable);
-    }
-
-    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
-    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
-    //@RequiresPermissions("rttable:delete")
-    @DeleteMapping(value = "/{id}")//BigDecimal
-    public RESTfulResult delete(@PathVariable String id){
-    	List<String> list = Arrays.asList(id.split(","));
-    	if(ListUtils.isNotEmpty(list)) {
-	    	List<BigDecimal> ids = ListUtils.convertList(list);
-			  rttableService.delete(ids);
-    	}
-      return success();
-    }
-
-}
+package com.steerinfo.ems.rttable.controller;
+
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.ems.rttable.service.IRttableService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Rttable RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:37
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:Rttable RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/rttables")
+public class RttableController extends BaseRESTfulController {
+
+    @Autowired
+    IRttableService rttableService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("rttable:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Rttable> list = rttableService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("rttable:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Rttable> list = rttableService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据Rttable对象创建")
+    @ApiImplicitParam(name = "rttable", value = "详细实体rttable", required = true, dataType = "Rttable")
+    //@RequiresPermissions("rttable:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute Rttable model){
+        Rttable rttable = rttableService.add(model);
+        return success(rttable);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    //@RequiresPermissions("rttable:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable BigDecimal id){
+        Rttable rttable = rttableService.getById(id);
+        return success(rttable);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的rttable信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal"),
+        @ApiImplicitParam(name = "rttable", value = "详细实体rttable", required = true, dataType = "Rttable")
+    })
+    //@RequiresPermissions("rttable:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable BigDecimal id, @RequestBody Rttable model){
+        model.setId(id);
+        Rttable rttable = rttableService.modify(model);
+        return success(rttable);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    //@RequiresPermissions("rttable:delete")
+    @DeleteMapping(value = "/{id}")//BigDecimal
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<BigDecimal> ids = ListUtils.convertList(list);
+			  rttableService.delete(ids);
+    	}
+      return success();
+    }
+
+}

+ 18 - 18
src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.java

@@ -1,19 +1,19 @@
-package com.steerinfo.ems.rttable.mapper;
-
-import com.steerinfo.ems.rttable.model.Rttable;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.math.BigDecimal;
-import java.util.HashMap;
-
-@Mapper
-public interface RttableMapper extends IBaseMapper<Rttable, BigDecimal> {
-
-    int insertPowerTenMinutes(HashMap<String, Object> HashMap);
-
-    int updatePowerTenMinutes(HashMap<String, Object> HashMap);
-
-    int updatePowerMinutes(HashMap<String, Object> HashMap);
-
+package com.steerinfo.ems.rttable.mapper;
+
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+
+@Mapper
+public interface RttableMapper extends IBaseMapper<Rttable, BigDecimal> {
+
+    int insertPowerTenMinutes(HashMap<String, Object> HashMap);
+
+    int updatePowerTenMinutes(HashMap<String, Object> HashMap);
+
+    int updatePowerMinutes(HashMap<String, Object> HashMap);
+
 }

+ 283 - 283
src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.xml

@@ -1,284 +1,284 @@
-<?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.steerinfo.ems.rttable.mapper.RttableMapper">
-  <resultMap id="BaseResultMap" type="com.steerinfo.ems.rttable.model.Rttable">
-    <id column="ID" jdbcType="DECIMAL" property="id" />
-    <result column="ALTID" jdbcType="VARCHAR" property="altid" />
-    <result column="RTVALUE" jdbcType="DECIMAL" property="rtvalue" />
-    <result column="ALARMSTATUS" jdbcType="DECIMAL" property="alarmstatus" />
-    <result column="COMMSTATUS" jdbcType="DECIMAL" property="commstatus" />
-    <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
-    <result column="NOTE" jdbcType="VARCHAR" property="note" />
-  </resultMap>
-  <sql id="columns">
-    ID, ALTID, RTVALUE, ALARMSTATUS, COMMSTATUS, UPDATETIME, NOTE
-  </sql>
-  <sql id="columns_alias">
-    t.ID, t.ALTID, t.RTVALUE, t.ALARMSTATUS, t.COMMSTATUS, t.UPDATETIME, t.NOTE
-  </sql>
-  <sql id="select">
-    SELECT <include refid="columns"/> FROM RTTABLE
-  </sql>
-  <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM RTTABLE t
-  </sql>
-  <sql id="where">
-    <where> 
-      <if test="id != null">
-        and ID = #{id}
-      </if>
-      <if test="altid != null and altid != ''">
-        and ALTID = #{altid}
-      </if>
-      <if test="rtvalue != null">
-        and RTVALUE = #{rtvalue}
-      </if>
-      <if test="alarmstatus != null">
-        and ALARMSTATUS = #{alarmstatus}
-      </if>
-      <if test="commstatus != null">
-        and COMMSTATUS = #{commstatus}
-      </if>
-      <if test="updatetime != null">
-        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
-      </if>
-      <if test="note != null and note != ''">
-        and NOTE = #{note}
-      </if>
-    </where>
-  </sql>
-  <sql id="whereLike">
-    <where> 
-      <if test="id != null">
-        and ID = #{id}
-      </if>
-      <if test="altid != null and altid != ''">
-        and ALTID LIKE '%${altid}%'
-      </if>
-      <if test="rtvalue != null">
-        and RTVALUE = #{rtvalue}
-      </if>
-      <if test="alarmstatus != null">
-        and ALARMSTATUS = #{alarmstatus}
-      </if>
-      <if test="commstatus != null">
-        and COMMSTATUS = #{commstatus}
-      </if>
-      <if test="updatetime != null">
-        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
-      </if>
-      <if test="note != null and note != ''">
-        and NOTE LIKE '%${note}%'
-      </if>
-    </where>
-  </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-    delete from RTTABLE
-    where ID = #{id,jdbcType=DECIMAL}
-  </delete>
-  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-    delete from RTTABLE
-    where 1!=1 
-      <if test="altid != null and altid != ''">
-        or ALTID = #{altid}
-      </if>
-      <if test="rtvalue != null">
-        or RTVALUE = #{rtvalue}
-      </if>
-      <if test="alarmstatus != null">
-        or ALARMSTATUS = #{alarmstatus}
-      </if>
-      <if test="commstatus != null">
-        or COMMSTATUS = #{commstatus}
-      </if>
-      <if test="updatetime != null">
-        or TO_CHAR(UPDATETIME,'yyyy-MM-dd') = '#{updatetime}'
-      </if>
-      <if test="note != null and note != ''">
-        or NOTE = #{note}
-      </if>
-  </delete>
-  <insert id="insert" parameterType="com.steerinfo.ems.rttable.model.Rttable">
-    insert into RTTABLE (ID, ALTID, RTVALUE, 
-      ALARMSTATUS, COMMSTATUS, UPDATETIME, 
-      NOTE)
-    values (#{id,jdbcType=DECIMAL}, #{altid,jdbcType=VARCHAR}, #{rtvalue,jdbcType=DECIMAL}, 
-      #{alarmstatus,jdbcType=DECIMAL}, #{commstatus,jdbcType=DECIMAL}, #{updatetime,jdbcType=TIMESTAMP}, 
-      #{note,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
-    insert into RTTABLE
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        ID,
-      </if>
-      <if test="altid != null">
-        ALTID,
-      </if>
-      <if test="rtvalue != null">
-        RTVALUE,
-      </if>
-      <if test="alarmstatus != null">
-        ALARMSTATUS,
-      </if>
-      <if test="commstatus != null">
-        COMMSTATUS,
-      </if>
-      <if test="updatetime != null">
-        UPDATETIME,
-      </if>
-      <if test="note != null">
-        NOTE,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=DECIMAL},
-      </if>
-      <if test="altid != null">
-        #{altid,jdbcType=VARCHAR},
-      </if>
-      <if test="rtvalue != null">
-        #{rtvalue,jdbcType=DECIMAL},
-      </if>
-      <if test="alarmstatus != null">
-        #{alarmstatus,jdbcType=DECIMAL},
-      </if>
-      <if test="commstatus != null">
-        #{commstatus,jdbcType=DECIMAL},
-      </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="note != null">
-        #{note,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.rttable.model.Rttable">
-    update RTTABLE
-    set ALTID = #{altid,jdbcType=VARCHAR},
-      RTVALUE = #{rtvalue,jdbcType=DECIMAL},
-      ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
-      COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
-      UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
-      NOTE = #{note,jdbcType=VARCHAR}
-    where ID = #{id,jdbcType=DECIMAL}
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
-    update RTTABLE
-    <set>
-      <if test="altid != null">
-        ALTID = #{altid,jdbcType=VARCHAR},
-      </if>
-      <if test="rtvalue != null">
-        RTVALUE = #{rtvalue,jdbcType=DECIMAL},
-      </if>
-      <if test="alarmstatus != null">
-        ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
-      </if>
-      <if test="commstatus != null">
-        COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
-      </if>
-      <if test="updatetime != null">
-        UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="note != null">
-        NOTE = #{note,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where ID = #{id,jdbcType=DECIMAL}
-  </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-    <include refid="select"/>
-    where ID = #{id,jdbcType=DECIMAL}
-  </select>
-  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
-  </select>
-  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
-  </select>
-  <insert id="batchInsert" parameterType="java.util.List">
-    insert into RTTABLE 
-      (ID, 
-      ALTID, RTVALUE, ALARMSTATUS, 
-      COMMSTATUS, UPDATETIME, NOTE
-      )
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.id,jdbcType=DECIMAL}, 
-      #{item.altid,jdbcType=VARCHAR}, #{item.rtvalue,jdbcType=DECIMAL}, #{item.alarmstatus,jdbcType=DECIMAL}, 
-      #{item.commstatus,jdbcType=DECIMAL}, #{item.updatetime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR}
-       from dual  
-   </foreach> )
-  </insert>
-  <update id="batchUpdate" parameterType="java.util.List">
-     update RTTABLE
-     set
-       ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.id,jdbcType=DECIMAL}
-       </foreach>
-       ,ALTID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.altid,jdbcType=VARCHAR}
-       </foreach>
-       ,RTVALUE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.rtvalue,jdbcType=DECIMAL}
-       </foreach>
-       ,ALARMSTATUS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.alarmstatus,jdbcType=DECIMAL}
-       </foreach>
-       ,COMMSTATUS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.commstatus,jdbcType=DECIMAL}
-       </foreach>
-       ,UPDATETIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.updatetime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,NOTE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
-          when #{item.id,jdbcType=DECIMAL} then #{item.note,jdbcType=VARCHAR}
-       </foreach>
-     where ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
-    #{item.id,jdbcType=DECIMAL}
-     </foreach> 
-  </update>
-  <delete id="batchDelete" parameterType="java.util.List">
-    delete from RTTABLE
-    where ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
-      #{id}
-    </foreach>
-  </delete>
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <insert id="insertPowerTenMinutes" parameterType="java.util.HashMap">
-    INSERT INTO EMS_POWER_TIMING(TMSTMP) VALUES
-    (to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
-    )
-  </insert>
-  <update id="updatePowerTenMinutes" parameterType="java.util.HashMap">
-    update EMS_POWER_TIMING
-    <set>
-      ${sql}
-    </set>
-    where TMSTMP =to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
-  </update>
-  <update id="updatePowerMinutes" parameterType="java.util.HashMap">
-    update ${table}
-    <set>
-      <if test="clock != null and clock != ''">
-        TMSTMP = to_date (#{clock,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
-      </if>
-      ${sql}
-    </set>
-  </update>
+<?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.steerinfo.ems.rttable.mapper.RttableMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.rttable.model.Rttable">
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="ALTID" jdbcType="VARCHAR" property="altid" />
+    <result column="RTVALUE" jdbcType="DECIMAL" property="rtvalue" />
+    <result column="ALARMSTATUS" jdbcType="DECIMAL" property="alarmstatus" />
+    <result column="COMMSTATUS" jdbcType="DECIMAL" property="commstatus" />
+    <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
+    <result column="NOTE" jdbcType="VARCHAR" property="note" />
+  </resultMap>
+  <sql id="columns">
+    ID, ALTID, RTVALUE, ALARMSTATUS, COMMSTATUS, UPDATETIME, NOTE
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.ALTID, t.RTVALUE, t.ALARMSTATUS, t.COMMSTATUS, t.UPDATETIME, t.NOTE
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM RTTABLE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM RTTABLE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="altid != null and altid != ''">
+        and ALTID = #{altid}
+      </if>
+      <if test="rtvalue != null">
+        and RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        and ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        and COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE = #{note}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="altid != null and altid != ''">
+        and ALTID LIKE '%${altid}%'
+      </if>
+      <if test="rtvalue != null">
+        and RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        and ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        and COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE LIKE '%${note}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from RTTABLE
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RTTABLE
+    where 1!=1 
+      <if test="altid != null and altid != ''">
+        or ALTID = #{altid}
+      </if>
+      <if test="rtvalue != null">
+        or RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        or ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        or COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        or TO_CHAR(UPDATETIME,'yyyy-MM-dd') = '#{updatetime}'
+      </if>
+      <if test="note != null and note != ''">
+        or NOTE = #{note}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    insert into RTTABLE (ID, ALTID, RTVALUE, 
+      ALARMSTATUS, COMMSTATUS, UPDATETIME, 
+      NOTE)
+    values (#{id,jdbcType=DECIMAL}, #{altid,jdbcType=VARCHAR}, #{rtvalue,jdbcType=DECIMAL}, 
+      #{alarmstatus,jdbcType=DECIMAL}, #{commstatus,jdbcType=DECIMAL}, #{updatetime,jdbcType=TIMESTAMP}, 
+      #{note,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    insert into RTTABLE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="altid != null">
+        ALTID,
+      </if>
+      <if test="rtvalue != null">
+        RTVALUE,
+      </if>
+      <if test="alarmstatus != null">
+        ALARMSTATUS,
+      </if>
+      <if test="commstatus != null">
+        COMMSTATUS,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="note != null">
+        NOTE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="altid != null">
+        #{altid,jdbcType=VARCHAR},
+      </if>
+      <if test="rtvalue != null">
+        #{rtvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="alarmstatus != null">
+        #{alarmstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="commstatus != null">
+        #{commstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        #{note,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    update RTTABLE
+    set ALTID = #{altid,jdbcType=VARCHAR},
+      RTVALUE = #{rtvalue,jdbcType=DECIMAL},
+      ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
+      COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
+      UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
+      NOTE = #{note,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    update RTTABLE
+    <set>
+      <if test="altid != null">
+        ALTID = #{altid,jdbcType=VARCHAR},
+      </if>
+      <if test="rtvalue != null">
+        RTVALUE = #{rtvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="alarmstatus != null">
+        ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="commstatus != null">
+        COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        NOTE = #{note,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into RTTABLE 
+      (ID, 
+      ALTID, RTVALUE, ALARMSTATUS, 
+      COMMSTATUS, UPDATETIME, NOTE
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=DECIMAL}, 
+      #{item.altid,jdbcType=VARCHAR}, #{item.rtvalue,jdbcType=DECIMAL}, #{item.alarmstatus,jdbcType=DECIMAL}, 
+      #{item.commstatus,jdbcType=DECIMAL}, #{item.updatetime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update RTTABLE
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.id,jdbcType=DECIMAL}
+       </foreach>
+       ,ALTID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.altid,jdbcType=VARCHAR}
+       </foreach>
+       ,RTVALUE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.rtvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,ALARMSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.alarmstatus,jdbcType=DECIMAL}
+       </foreach>
+       ,COMMSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.commstatus,jdbcType=DECIMAL}
+       </foreach>
+       ,UPDATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.updatetime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,NOTE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.note,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from RTTABLE
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <insert id="insertPowerTenMinutes" parameterType="java.util.HashMap">
+    INSERT INTO EMS_POWER_TIMING(TMSTMP) VALUES
+    (to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+    )
+  </insert>
+  <update id="updatePowerTenMinutes" parameterType="java.util.HashMap">
+    update EMS_POWER_TIMING
+    <set>
+      ${sql}
+    </set>
+    where TMSTMP =to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+  </update>
+  <update id="updatePowerMinutes" parameterType="java.util.HashMap">
+    update ${table}
+    <set>
+      <if test="clock != null and clock != ''">
+        TMSTMP = to_date (#{clock,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+      </if>
+      ${sql}
+    </set>
+  </update>
 </mapper>

+ 127 - 127
src/main/java/com/steerinfo/ems/rttable/model/Rttable.java

@@ -1,128 +1,128 @@
-package com.steerinfo.ems.rttable.model;
-
-import com.steerinfo.framework.model.IBasePO;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.math.BigDecimal;
-import java.util.Date;
-
-@ApiModel(value="null")
-public class Rttable implements IBasePO<BigDecimal> {
-    /**
-     * ID随机(ID,DECIMAL,38)
-     */
-    @ApiModelProperty(value="ID随机",required=true)
-    private BigDecimal id;
-
-    /**
-     * MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)(ALTID,VARCHAR,30)
-     */
-    @ApiModelProperty(value="MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)",required=true)
-    private String altid;
-
-    /**
-     * 数据(RTVALUE,DECIMAL,0)
-     */
-    @ApiModelProperty(value="数据",required=false)
-    private BigDecimal rtvalue;
-
-    /**
-     * 报警(ALARMSTATUS,DECIMAL,0)
-     */
-    @ApiModelProperty(value="报警",required=false)
-    private BigDecimal alarmstatus;
-
-    /**
-     * 通讯状态(COMMSTATUS,DECIMAL,0)
-     */
-    @ApiModelProperty(value="通讯状态",required=false)
-    private BigDecimal commstatus;
-
-    /**
-     * 更新时间(UPDATETIME,TIMESTAMP,7)
-     */
-    @ApiModelProperty(value="更新时间",required=false)
-    private Date updatetime;
-
-    /**
-     * EMS+分厂+工序+介质+仪表(NOTE,VARCHAR,200)
-     */
-    @ApiModelProperty(value="EMS+分厂+工序+介质+仪表",required=false)
-    private String note;
-
-    private static final long serialVersionUID = 1L;
-
-    public BigDecimal getId() {
-        return id;
-    }
-
-    public void setId(BigDecimal id) {
-        this.id = id;
-    }
-
-    public String getAltid() {
-        return altid;
-    }
-
-    public void setAltid(String altid) {
-        this.altid = altid == null ? null : altid.trim();
-    }
-
-    public BigDecimal getRtvalue() {
-        return rtvalue;
-    }
-
-    public void setRtvalue(String rtvalue) {
-        this.rtvalue = new BigDecimal(rtvalue);
-    }
-
-    public BigDecimal getAlarmstatus() {
-        return alarmstatus;
-    }
-
-    public void setAlarmstatus(String alarmstatus) {
-        this.alarmstatus = new BigDecimal(alarmstatus);
-    }
-
-    public BigDecimal getCommstatus() {
-        return commstatus;
-    }
-
-    public void setCommstatus(String commstatus) {
-        this.commstatus = new BigDecimal(commstatus);
-    }
-
-    public Date getUpdatetime() {
-        return updatetime;
-    }
-
-    public void setUpdatetime(Date updatetime) {
-        this.updatetime = updatetime;
-    }
-
-    public String getNote() {
-        return note;
-    }
-
-    public void setNote(String note) {
-        this.note = note == null ? null : note.trim();
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", altid=").append(altid);
-        sb.append(", rtvalue=").append(rtvalue);
-        sb.append(", alarmstatus=").append(alarmstatus);
-        sb.append(", commstatus=").append(commstatus);
-        sb.append(", updatetime=").append(updatetime);
-        sb.append(", note=").append(note);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
+package com.steerinfo.ems.rttable.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class Rttable implements IBasePO<BigDecimal> {
+    /**
+     * ID随机(ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="ID随机",required=true)
+    private BigDecimal id;
+
+    /**
+     * MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)(ALTID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)",required=true)
+    private String altid;
+
+    /**
+     * 数据(RTVALUE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="数据",required=false)
+    private BigDecimal rtvalue;
+
+    /**
+     * 报警(ALARMSTATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="报警",required=false)
+    private BigDecimal alarmstatus;
+
+    /**
+     * 通讯状态(COMMSTATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="通讯状态",required=false)
+    private BigDecimal commstatus;
+
+    /**
+     * 更新时间(UPDATETIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="更新时间",required=false)
+    private Date updatetime;
+
+    /**
+     * EMS+分厂+工序+介质+仪表(NOTE,VARCHAR,200)
+     */
+    @ApiModelProperty(value="EMS+分厂+工序+介质+仪表",required=false)
+    private String note;
+
+    private static final long serialVersionUID = 1L;
+
+    public BigDecimal getId() {
+        return id;
+    }
+
+    public void setId(BigDecimal id) {
+        this.id = id;
+    }
+
+    public String getAltid() {
+        return altid;
+    }
+
+    public void setAltid(String altid) {
+        this.altid = altid == null ? null : altid.trim();
+    }
+
+    public BigDecimal getRtvalue() {
+        return rtvalue;
+    }
+
+    public void setRtvalue(String rtvalue) {
+        this.rtvalue = new BigDecimal(rtvalue);
+    }
+
+    public BigDecimal getAlarmstatus() {
+        return alarmstatus;
+    }
+
+    public void setAlarmstatus(String alarmstatus) {
+        this.alarmstatus = new BigDecimal(alarmstatus);
+    }
+
+    public BigDecimal getCommstatus() {
+        return commstatus;
+    }
+
+    public void setCommstatus(String commstatus) {
+        this.commstatus = new BigDecimal(commstatus);
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note == null ? null : note.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", altid=").append(altid);
+        sb.append(", rtvalue=").append(rtvalue);
+        sb.append(", alarmstatus=").append(alarmstatus);
+        sb.append(", commstatus=").append(commstatus);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", note=").append(note);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
 }

+ 26 - 26
src/main/java/com/steerinfo/ems/rttable/service/IRttableService.java

@@ -1,27 +1,27 @@
-package com.steerinfo.ems.rttable.service;
-
-import com.steerinfo.ems.rttable.model.Rttable;
-import com.steerinfo.framework.service.IBaseService;
-
-import java.math.BigDecimal;
-
-/**
- * Rttable服务接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-10-15 03:37
- * 类描述
- * 修订历史:
- * 日期:2021-10-15
- * 作者:generator
- * 参考:
- * 描述:Rttable服务接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
-public interface IRttableService extends IBaseService<Rttable, BigDecimal>{
-
-    int dataGeneration();
-
-    int getPowerTenMinutes();
-
+package com.steerinfo.ems.rttable.service;
+
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+
+/**
+ * Rttable服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:37
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:Rttable服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IRttableService extends IBaseService<Rttable, BigDecimal>{
+
+    int dataGeneration();
+
+    int getPowerTenMinutes();
+
 }

+ 5 - 2
src/main/java/com/steerinfo/ems/tcm0316/mapper/TCm0316Mapper.xml

@@ -110,8 +110,11 @@
   </delete>
 
   <select id="getNameAndId" resultMap="BaseResultMap">
-  select POWERMONITORCODE, POWERMONITORNAME from T_CM_0316
-  order by POWERMONITORNAME
+   select t.powermonitorname || '-' || t1.powername as powermonitorname,
+         t.powermonitorcode
+    from t_cm_0316 t
+    left join t_cm_0325 t1
+      on t.powersystemname = t1.powercode
   </select>
 
   <!--

+ 7 - 0
src/main/java/com/steerinfo/ems/trmcalpoint/controller/TRmCalpointController.java

@@ -128,6 +128,13 @@ public class TRmCalpointController extends BaseRESTfulController {
             }
             parmas.put("propertyid", propertyid);
         }
+        if(parmas.get("costid") != null && !parmas.get("costid").toString().isEmpty()){
+            String costid = parmas.get("costid").toString();
+            if(!costid.startsWith("'")){
+                costid = "'" + costid.replaceAll(",", "','").replaceAll(",", "','") + "'";
+            }
+            parmas.put("costid", costid);
+        }
         PageList<TRmCalpoint> list = tRmCalpointService.queryLikeForPage(parmas, pageNum, pageSize);
         return success(list);
     }

+ 2 - 2
src/main/java/com/steerinfo/ems/trmcalpoint/mapper/TRmCalpointMapper.xml

@@ -770,7 +770,7 @@
         and UNITID = #{unitid}
       </if>
       <if test="costid != null and costid != ''">
-        and COSTID = #{costid}
+        and COSTID in (${costid})
       </if>
       <if test="tagid != null and tagid != ''">
         and TAGID = #{tagid}
@@ -923,7 +923,7 @@
         and UNITID LIKE '%${unitid}%'
       </if>
       <if test="costid != null and costid != ''">
-        and COSTID LIKE '%${costid}%'
+        and COSTID in (${costid})
       </if>
       <if test="tagid != null and tagid != ''">
         and TAGID LIKE '%${tagid}%'

+ 1 - 1
src/main/java/com/steerinfo/ems/trmenergy/controller/TRmEnergyController.java

@@ -150,7 +150,7 @@ public class TRmEnergyController extends BaseRESTfulController {
                 continue;
             }
             List<Formula> list = formulaService.getByCode(Ids.get(i));
-            LOGGER.info("需要删除数据所对应的公式共" + list.size() + "条:");
+               LOGGER.info("需要删除数据所对应的公式共" + list.size() + "条:");
             for (int j = 0;j < list.size();j++){
                 LOGGER.info("该能介所对应的第" + (j + 1) + "条公式内容:" + list.get(i).toString());
             }

+ 19 - 9
src/main/java/com/steerinfo/task/SpringCronTask.java

@@ -4,6 +4,7 @@ import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.bfhyd.service.IBfhydService;
 import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
 import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
+import com.steerinfo.ems.emsgmpcjh.service.IEmsGmPcJhService;
 import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
 import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
 import com.steerinfo.ems.ifemsmesactitem.service.IIfEmsMesActitemService;
@@ -43,10 +44,8 @@ import org.springframework.scheduling.support.CronTrigger;
 import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ScheduledFuture;
 
@@ -58,7 +57,7 @@ public class SpringCronTask implements SchedulingConfigurer{
 
 	private ScheduledTaskRegistrar taskRegistrar;
 
-	private Map<String, ScheduledFuture<?>> taskFutures = new ConcurrentHashMap<String, ScheduledFuture<?>>();
+	private Map<String, ScheduledFuture<?>>  taskFutures = new ConcurrentHashMap<String, ScheduledFuture<?>>();
 
 	@Autowired
 	private JdbcTemplate jdbcTemplate;
@@ -111,6 +110,8 @@ public class SpringCronTask implements SchedulingConfigurer{
 	@Autowired
 	IEmsWaterRealtimeService emsWaterRealtimeService;
 	@Autowired
+	IEmsGmPcJhService emsGmPcJhService;
+	@Autowired
 	IDzMaterialSfService dzMaterialSfService;
 	@Autowired
 	IRttableService rttableService;
@@ -264,17 +265,15 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				}
 				 else if(taskId.equalsIgnoreCase("120")){
-					 // 获取大用户水系统数据;获取mosaic动力数据 5分钟一次
+					 // 获取大用户水系统数据 5分钟一次
 					 long start = new Date().getTime();
 					 emsWaterRealtimeService.getWaterListByArmMeter();
 					 emsWaterRealtimeService.dataGeneration();
-					 rttableService.dataGeneration();
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				 } else if(taskId.equalsIgnoreCase("121")){
-					 // 根据计量点配置生成水数据;自动生成动力数据 10分钟一次
+					 // 根据计量点配置生成水数据 10分钟一次
 					 long start = new Date().getTime();
 					 emsWaterRealtimeService.getWaterTenMinutes();
-					 rttableService.getPowerTenMinutes();
 					 try {
 						 emsWaterRealtimeService.getWaterListToMosaic();
 					 } catch (AxisFault e) {
@@ -302,6 +301,17 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 emsScqkLgService.dateGenerate();
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				 }
+//				 else if (taskId.equalsIgnoreCase("124")) {
+//					 Date now = new Date();
+//					 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
+//					 Calendar c = Calendar.getInstance();
+//					 if (c.get(Calendar.DATE) == 1) {
+//						 long start = new Date().getTime();
+//						 emsGmPcJhService.addNbjh();
+//						 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+//					 }
+//
+//				 }
 //				 else if (taskId.equalsIgnoreCase("106")) {
 //					// 获取MES水质监测数据
 //					long start = new Date().getTime();