Bladeren bron

lrl -2021-12-04

lirl 3 jaren geleden
bovenliggende
commit
00a8355950

+ 144 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/controller/ChemicalConstituentsController.java

@@ -0,0 +1,144 @@
+package com.steerinfo.ems.chemicalconstituents.controller;
+
+import com.steerinfo.ems.chemicalconstituents.mapper.ChemicalConstituentsMapper;
+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.chemicalconstituents.model.ChemicalConstituents;
+import com.steerinfo.ems.chemicalconstituents.service.IChemicalConstituentsService;
+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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ChemicalConstituents RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 10:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:ChemicalConstituents RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/chemicalconstituentss")
+public class ChemicalConstituentsController extends BaseRESTfulController {
+
+    @Autowired
+    IChemicalConstituentsService chemicalConstituentsService;
+
+    @Autowired
+    ChemicalConstituentsMapper chemicalConstituentsMapper;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("chemicalconstituents:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<ChemicalConstituents> list = chemicalConstituentsService.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("chemicalconstituents:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<ChemicalConstituents> list = chemicalConstituentsService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据ChemicalConstituents对象创建")
+    @ApiImplicitParam(name = "chemicalConstituents", value = "详细实体chemicalConstituents", required = true, dataType = "ChemicalConstituents")
+    //@RequiresPermissions("chemicalconstituents:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute ChemicalConstituents model){
+        ChemicalConstituents chemicalConstituents = chemicalConstituentsService.add(model);
+        return success(chemicalConstituents);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(name = "model", value = "详细实体chemicalConstituents的id值", required = true, dataType = "ChemicalConstituents")
+    //@RequiresPermissions("chemicalconstituents:view")
+    @GetMapping(value = "/getById")
+    public RESTfulResult get(@ModelAttribute ChemicalConstituents model){
+        ChemicalConstituents chemicalConstituents = chemicalConstituentsService.getById(model);
+        return success(chemicalConstituents);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的chemicalConstituents信息来更新详细信息")
+    @ApiImplicitParam(name = "chemicalConstituents", value = "详细实体chemicalConstituents", required = true, dataType = "ChemicalConstituents")
+    //@RequiresPermissions("chemicalconstituents:update")
+    @PutMapping(value = "/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@RequestBody ChemicalConstituents model){
+        ChemicalConstituents chemicalConstituents = chemicalConstituentsService.modify(model);
+        return success(chemicalConstituents);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(name = "models", value = "详细实体chemicalConstituents", required = true, dataType = "ChemicalConstituents")
+    //@RequiresPermissions("chemicalconstituents:delete")
+    @DeleteMapping(value = "/")//ChemicalConstituents
+    public RESTfulResult delete(@RequestBody List<ChemicalConstituents> models){
+    	if(ListUtils.isNotEmpty(models)) {
+			  chemicalConstituentsService.delete(models);
+    	}
+      return success();
+    }
+    @ApiOperation(value="获取详细信息", notes="根据url的gmid来获取详细信息")
+    @ApiImplicitParam(name = "chemicalConstituents", value = "详细集合chemicalConstituents", required = true, dataType = "ChemicalConstituents")
+    @GetMapping("/getDataByGmid")
+    public RESTfulResult getDataByGmid(@RequestParam HashMap parmas){
+        String gmid = parmas.get("gmid").toString();
+        List<ChemicalConstituents> dataByGmid = chemicalConstituentsService.getDataByGmid(gmid);
+        return success(dataByGmid);
+    }
+
+    @PutMapping("/update")
+    public RESTfulResult update(@RequestBody ChemicalConstituents[] models){
+        Map<String,Object> map = new HashMap<>();
+        for (ChemicalConstituents model : models) {
+            map.put("gmid",model.getGmid());
+            map.put("chemCode",model.getChemCode());
+            ChemicalConstituents chemicalConstituents = chemicalConstituentsMapper.selectByPrimaryKey(model);
+            if (chemicalConstituents != null) {
+                chemicalConstituentsMapper.updateByPrimaryKey(model);
+            } else {
+                chemicalConstituentsMapper.insert(model);
+            }
+        }
+        return success();
+    }
+
+    @DeleteMapping("/delete")
+    public RESTfulResult delete(@RequestBody ChemicalConstituents[] models){
+        List<ChemicalConstituents> ls =  new ArrayList<>();
+        for (ChemicalConstituents model : models) {
+            if (model.getGmid() != null && !model.getGmid().equals("")  && model.getChemCode() != null && !model.getChemCode().equals("")){
+                ls.add(model);
+            }
+            if(ls.size()>0) {
+                chemicalConstituentsService.delete(ls);
+            }
+        }
+        return success();
+    }
+
+}

+ 15 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/mapper/ChemicalConstituentsMapper.java

@@ -0,0 +1,15 @@
+package com.steerinfo.ems.chemicalconstituents.mapper;
+
+import com.steerinfo.framework.mapper.ICBaseMapper;
+import com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface ChemicalConstituentsMapper extends ICBaseMapper<ChemicalConstituents, String> {
+    //根据国贸id来获取成分信息
+    public List<ChemicalConstituents> getDataByGmid(@Param("gmid") String gmid);
+
+}

+ 192 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/mapper/ChemicalConstituentsMapper.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.chemicalconstituents.mapper.ChemicalConstituentsMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents">
+    <id column="GMID" jdbcType="VARCHAR" property="gmid" />
+    <id column="CHEM_CODE" jdbcType="VARCHAR" property="chemCode" />
+    <result column="NK_STD_MIN" jdbcType="DECIMAL" property="nkStdMin" />
+    <result column="NK_STD_MAX" jdbcType="DECIMAL" property="nkStdMax" />
+  </resultMap>
+  <sql id="columns">
+    GMID, CHEM_CODE, NK_STD_MIN, NK_STD_MAX
+  </sql>
+  <sql id="columns_alias">
+    t.GMID, t.CHEM_CODE, t.NK_STD_MIN, t.NK_STD_MAX
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM CHEMICAL_CONSTITUENTS
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM CHEMICAL_CONSTITUENTS t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="gmid != null and gmid != ''">
+        and GMID = #{gmid}
+      </if>
+      <if test="chemCode != null and chemCode != ''">
+        and CHEM_CODE = #{chemCode}
+      </if>
+      <if test="nkStdMin != null">
+        and NK_STD_MIN = #{nkStdMin}
+      </if>
+      <if test="nkStdMax != null">
+        and NK_STD_MAX = #{nkStdMax}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="gmid != null and gmid != ''">
+        and GMID LIKE '%${gmid}%'
+      </if>
+      <if test="chemCode != null and chemCode != ''">
+        and CHEM_CODE LIKE '%${chemCode}%'
+      </if>
+      <if test="nkStdMin != null">
+        and NK_STD_MIN = #{nkStdMin}
+      </if>
+      <if test="nkStdMax != null">
+        and NK_STD_MAX = #{nkStdMax}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="map">
+    delete from CHEMICAL_CONSTITUENTS
+    where GMID = #{gmid,jdbcType=VARCHAR}
+      and CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from CHEMICAL_CONSTITUENTS
+    where 1!=1 
+      <if test="chemCode != null and chemCode != ''">
+        or CHEM_CODE = #{chemCode}
+      </if>
+      <if test="nkStdMin != null">
+        or NK_STD_MIN = #{nkStdMin}
+      </if>
+      <if test="nkStdMax != null">
+        or NK_STD_MAX = #{nkStdMax}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents">
+    insert into CHEMICAL_CONSTITUENTS (GMID, CHEM_CODE,
+      NK_STD_MIN, NK_STD_MAX)
+    values (#{gmid,jdbcType=VARCHAR}, #{chemCode,jdbcType=VARCHAR},
+      #{nkStdMin,jdbcType=DECIMAL}, #{nkStdMax,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents">
+    insert into CHEMICAL_CONSTITUENTS
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="gmid != null">
+        GMID,
+      </if>
+      <if test="chemCode != null">
+        CHEM_CODE,
+      </if>
+      <if test="nkStdMin != null">
+        NK_STD_MIN,
+      </if>
+      <if test="nkStdMax != null">
+        NK_STD_MAX,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="gmid != null">
+        #{gmid,jdbcType=VARCHAR},
+      </if>
+      <if test="chemCode != null">
+        #{chemCode,jdbcType=VARCHAR},
+      </if>
+      <if test="nkStdMin != null">
+        #{nkStdMin,jdbcType=DECIMAL},
+      </if>
+      <if test="nkStdMax != null">
+        #{nkStdMax,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents">
+    update CHEMICAL_CONSTITUENTS
+    set NK_STD_MIN = #{nkStdMin,jdbcType=DECIMAL},
+      NK_STD_MAX = #{nkStdMax,jdbcType=DECIMAL}
+    where GMID = #{gmid,jdbcType=VARCHAR}
+      and CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents">
+    update CHEMICAL_CONSTITUENTS
+    <set>
+      <if test="nkStdMin != null">
+        NK_STD_MIN = #{nkStdMin,jdbcType=DECIMAL},
+      </if>
+      <if test="nkStdMax != null">
+        NK_STD_MAX = #{nkStdMax,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where GMID = #{gmid,jdbcType=VARCHAR}
+      and CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where GMID = #{gmid,jdbcType=VARCHAR}
+      and CHEM_CODE = #{chemCode,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 CHEMICAL_CONSTITUENTS 
+      (GMID, 
+      CHEM_CODE, NK_STD_MIN,
+      NK_STD_MAX)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.gmid,jdbcType=VARCHAR}, 
+      #{item.chemCode,jdbcType=VARCHAR}, #{item.nkStdMin,jdbcType=DECIMAL},
+      #{item.nkStdMax,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update CHEMICAL_CONSTITUENTS
+     set
+       GMID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GMID" close="end">
+          when #{item.gmid,jdbcType=VARCHAR} then #{item.gmid,jdbcType=VARCHAR}
+       </foreach>
+       ,CHEM_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GMID" close="end">
+          when #{item.gmid,jdbcType=VARCHAR} then #{item.chemCode,jdbcType=VARCHAR}
+       </foreach>
+       ,NK_STD_MIN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GMID" close="end">
+          when #{item.gmid,jdbcType=VARCHAR} then #{item.nkStdMin,jdbcType=DECIMAL}
+       </foreach>
+       ,NK_STD_MAX=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GMID" close="end">
+          when #{item.gmid,jdbcType=VARCHAR} then #{item.nkStdMax,jdbcType=DECIMAL}
+       </foreach>
+    where (GMID,CHEM_CODE) in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+     (#{item.gmid, jdbcType=VARCHAR},#{item.chemCode, jdbcType=VARCHAR})
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from CHEMICAL_CONSTITUENTS
+    where (GMID,CHEM_CODE) in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+     ( #{item.gmid, jdbcType=VARCHAR}, #{item.chemCode, jdbcType=VARCHAR})
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getDataByGmid" parameterType="java.lang.String" resultMap="BaseResultMap">
+    SELECT GMID, CHEM_CODE, NK_STD_MIN, NK_STD_MAX FROM CHEMICAL_CONSTITUENTS
+    WHERE
+    GMID = #{gmid}
+  </select>
+</mapper>

+ 99 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/model/ChemicalConstituents.java

@@ -0,0 +1,99 @@
+package com.steerinfo.ems.chemicalconstituents.model;
+
+import com.steerinfo.framework.model.ICBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+@ApiModel(value="null")
+public class ChemicalConstituents implements ICBasePO<ChemicalConstituents> {
+    /**
+     * GMid(GMID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="GMid",required=true)
+    private String gmid;
+
+    /**
+     * 成分编码(CHEM_CODE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="成分编码",required=true)
+    private String chemCode;
+
+    /**
+     * 内控下限值(NK_STD_MIN,DECIMAL,0)
+     */
+    @ApiModelProperty(value="内控下限值",required=false)
+    private BigDecimal nkStdMin;
+
+    /**
+     * 内控上限值(NK_STD_MAX,DECIMAL,0)
+     */
+    @ApiModelProperty(value="内控上限值",required=false)
+    private BigDecimal nkStdMax;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Map<String, Object> getId() {
+        Map<String, Object> params = new HashMap<>();
+        params.put("gmid",this.gmid);
+        params.put("chemCode",this.chemCode);
+        return params;
+    }
+
+    @Override
+    public void setId(ChemicalConstituents chemicalConstituents) {
+        this.gmid = chemicalConstituents.getGmid();
+        this.chemCode = chemicalConstituents.getChemCode();
+    }
+
+    public String getGmid() {
+        return gmid;
+    }
+
+    public void setGmid(String gmid) {
+        this.gmid = gmid == null ? null : gmid.trim();
+    }
+
+    public String getChemCode() {
+        return chemCode;
+    }
+
+    public void setChemCode(String chemCode) {
+        this.chemCode = chemCode == null ? null : chemCode.trim();
+    }
+
+    public BigDecimal getNkStdMin() {
+        return nkStdMin;
+    }
+
+    public void setNkStdMin(BigDecimal nkStdMin) {
+        this.nkStdMin = nkStdMin;
+    }
+
+    public BigDecimal getNkStdMax() {
+        return nkStdMax;
+    }
+
+    public void setNkStdMax(BigDecimal nkStdMax) {
+        this.nkStdMax = nkStdMax;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", gmid=").append(gmid);
+        sb.append(", chemCode=").append(chemCode);
+        sb.append(", nkStdMin=").append(nkStdMin);
+        sb.append(", nkStdMax=").append(nkStdMax);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 25 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/service/IChemicalConstituentsService.java

@@ -0,0 +1,25 @@
+package com.steerinfo.ems.chemicalconstituents.service;
+
+import com.steerinfo.framework.service.ICBaseService;
+import com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * ChemicalConstituents服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 10:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:ChemicalConstituents服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IChemicalConstituentsService extends ICBaseService<ChemicalConstituents, String>{
+    //根据国贸id来获取成分信息
+    public List<ChemicalConstituents> getDataByGmid(@Param("gmid") String gmid);
+}

+ 41 - 0
src/main/java/com/steerinfo/ems/chemicalconstituents/service/impl/ChemicalConstituentsServiceImpl.java

@@ -0,0 +1,41 @@
+package com.steerinfo.ems.chemicalconstituents.service.impl;
+
+import com.steerinfo.framework.mapper.ICBaseMapper;
+import com.steerinfo.framework.service.impl.CBaseServiceImpl;
+import com.steerinfo.ems.chemicalconstituents.model.ChemicalConstituents;
+import com.steerinfo.ems.chemicalconstituents.mapper.ChemicalConstituentsMapper;
+import com.steerinfo.ems.chemicalconstituents.service.IChemicalConstituentsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * ChemicalConstituents服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 10:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:ChemicalConstituents服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "chemicalConstituentsService")
+public class ChemicalConstituentsServiceImpl extends CBaseServiceImpl<ChemicalConstituents, String> implements IChemicalConstituentsService {
+
+    @Autowired
+    private ChemicalConstituentsMapper chemicalConstituentsMapper;
+
+    @Override
+    protected ICBaseMapper<ChemicalConstituents, String> getMapper() {
+        return chemicalConstituentsMapper;
+    }
+
+    @Override
+    public List<ChemicalConstituents> getDataByGmid(String gmid) {
+        return chemicalConstituentsMapper.getDataByGmid(gmid);
+    }
+}

+ 114 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/controller/QcmBaseChemController.java

@@ -0,0 +1,114 @@
+package com.steerinfo.ems.qcmbasechem.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.qcmbasechem.model.QcmBaseChem;
+import com.steerinfo.ems.qcmbasechem.service.IQcmBaseChemService;
+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.HashMap;
+import java.util.List;
+
+/**
+ * QcmBaseChem RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 09:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:QcmBaseChem RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/qcmbasechems")
+public class QcmBaseChemController extends BaseRESTfulController {
+
+    @Autowired
+    IQcmBaseChemService qcmBaseChemService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("qcmbasechem:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<QcmBaseChem> list = qcmBaseChemService.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("qcmbasechem:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<QcmBaseChem> list = qcmBaseChemService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据QcmBaseChem对象创建")
+    @ApiImplicitParam(name = "qcmBaseChem", value = "详细实体qcmBaseChem", required = true, dataType = "QcmBaseChem")
+    //@RequiresPermissions("qcmbasechem:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute QcmBaseChem model){
+        QcmBaseChem qcmBaseChem = qcmBaseChemService.add(model);
+        return success(qcmBaseChem);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("qcmbasechem:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        QcmBaseChem qcmBaseChem = qcmBaseChemService.getById(id);
+        return success(qcmBaseChem);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的qcmBaseChem信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "qcmBaseChem", value = "详细实体qcmBaseChem", required = true, dataType = "QcmBaseChem")
+    })
+    //@RequiresPermissions("qcmbasechem:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody QcmBaseChem model){
+        model.setId(id);
+        QcmBaseChem qcmBaseChem = qcmBaseChemService.modify(model);
+        return success(qcmBaseChem);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("qcmbasechem: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);
+			  qcmBaseChemService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @GetMapping("/getIdAndName")
+    public RESTfulResult getIdAndName(){
+        List<QcmBaseChem> idAndName = qcmBaseChemService.getIdAndName();
+        return  success(idAndName);
+    }
+
+}

+ 13 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/mapper/QcmBaseChemMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.ems.qcmbasechem.mapper;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.ems.qcmbasechem.model.QcmBaseChem;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface QcmBaseChemMapper extends IBaseMapper<QcmBaseChem, String> {
+    //用于下拉框查询
+    public List<QcmBaseChem> getIdAndName();
+}

+ 445 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/mapper/QcmBaseChemMapper.xml

@@ -0,0 +1,445 @@
+<?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.qcmbasechem.mapper.QcmBaseChemMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.qcmbasechem.model.QcmBaseChem">
+    <id column="CHEM_CODE" jdbcType="VARCHAR" property="chemCode" />
+    <result column="CHEM_NAME" jdbcType="VARCHAR" property="chemName" />
+    <result column="CHEM_TYPE" jdbcType="CHAR" property="chemType" />
+    <result column="CHEM_FORMULA" jdbcType="VARCHAR" property="chemFormula" />
+    <result column="VALID_FLAG" jdbcType="CHAR" property="validFlag" />
+    <result column="CHEM_SOURCE" jdbcType="VARCHAR" property="chemSource" />
+    <result column="L3_CODE_NO" jdbcType="VARCHAR" property="l3CodeNo" />
+    <result column="L3_CHEM_CODE" jdbcType="VARCHAR" property="l3ChemCode" />
+    <result column="DISPLAY_ORDER" jdbcType="DECIMAL" property="displayOrder" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="CREATE_OPR" jdbcType="VARCHAR" property="createOpr" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_OPR" jdbcType="VARCHAR" property="updateOpr" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="columns">
+    CHEM_CODE, CHEM_NAME, CHEM_TYPE, CHEM_FORMULA, VALID_FLAG, CHEM_SOURCE, L3_CODE_NO, 
+    L3_CHEM_CODE, DISPLAY_ORDER, MEMO, CREATE_OPR, CREATE_TIME, UPDATE_OPR, UPDATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.CHEM_CODE, t.CHEM_NAME, t.CHEM_TYPE, t.CHEM_FORMULA, t.VALID_FLAG, t.CHEM_SOURCE, 
+    t.L3_CODE_NO, t.L3_CHEM_CODE, t.DISPLAY_ORDER, t.MEMO, t.CREATE_OPR, t.CREATE_TIME, 
+    t.UPDATE_OPR, t.UPDATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM QCM_BASE_CHEM
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM QCM_BASE_CHEM t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="chemCode != null and chemCode != ''">
+        and CHEM_CODE = #{chemCode}
+      </if>
+      <if test="chemName != null and chemName != ''">
+        and CHEM_NAME = #{chemName}
+      </if>
+      <if test="chemType != null">
+        and CHEM_TYPE = #{chemType}
+      </if>
+      <if test="chemFormula != null and chemFormula != ''">
+        and CHEM_FORMULA = #{chemFormula}
+      </if>
+      <if test="validFlag != null">
+        and VALID_FLAG = #{validFlag}
+      </if>
+      <if test="chemSource != null and chemSource != ''">
+        and CHEM_SOURCE = #{chemSource}
+      </if>
+      <if test="l3CodeNo != null and l3CodeNo != ''">
+        and L3_CODE_NO = #{l3CodeNo}
+      </if>
+      <if test="l3ChemCode != null and l3ChemCode != ''">
+        and L3_CHEM_CODE = #{l3ChemCode}
+      </if>
+      <if test="displayOrder != null">
+        and DISPLAY_ORDER = #{displayOrder}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="createOpr != null and createOpr != ''">
+        and CREATE_OPR = #{createOpr}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateOpr != null and updateOpr != ''">
+        and UPDATE_OPR = #{updateOpr}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="chemCode != null and chemCode != ''">
+        and CHEM_CODE LIKE '%${chemCode}%'
+      </if>
+      <if test="chemName != null and chemName != ''">
+        and CHEM_NAME LIKE '%${chemName}%'
+      </if>
+      <if test="chemType != null">
+        and CHEM_TYPE = #{chemType}
+      </if>
+      <if test="chemFormula != null and chemFormula != ''">
+        and CHEM_FORMULA LIKE '%${chemFormula}%'
+      </if>
+      <if test="validFlag != null">
+        and VALID_FLAG = #{validFlag}
+      </if>
+      <if test="chemSource != null and chemSource != ''">
+        and CHEM_SOURCE LIKE '%${chemSource}%'
+      </if>
+      <if test="l3CodeNo != null and l3CodeNo != ''">
+        and L3_CODE_NO LIKE '%${l3CodeNo}%'
+      </if>
+      <if test="l3ChemCode != null and l3ChemCode != ''">
+        and L3_CHEM_CODE LIKE '%${l3ChemCode}%'
+      </if>
+      <if test="displayOrder != null">
+        and DISPLAY_ORDER = #{displayOrder}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="createOpr != null and createOpr != ''">
+        and CREATE_OPR LIKE '%${createOpr}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateOpr != null and updateOpr != ''">
+        and UPDATE_OPR LIKE '%${updateOpr}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from QCM_BASE_CHEM
+    where CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from QCM_BASE_CHEM
+    where 1!=1 
+      <if test="chemName != null and chemName != ''">
+        or CHEM_NAME = #{chemName}
+      </if>
+      <if test="chemType != null">
+        or CHEM_TYPE = #{chemType}
+      </if>
+      <if test="chemFormula != null and chemFormula != ''">
+        or CHEM_FORMULA = #{chemFormula}
+      </if>
+      <if test="validFlag != null">
+        or VALID_FLAG = #{validFlag}
+      </if>
+      <if test="chemSource != null and chemSource != ''">
+        or CHEM_SOURCE = #{chemSource}
+      </if>
+      <if test="l3CodeNo != null and l3CodeNo != ''">
+        or L3_CODE_NO = #{l3CodeNo}
+      </if>
+      <if test="l3ChemCode != null and l3ChemCode != ''">
+        or L3_CHEM_CODE = #{l3ChemCode}
+      </if>
+      <if test="displayOrder != null">
+        or DISPLAY_ORDER = #{displayOrder}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="createOpr != null and createOpr != ''">
+        or CREATE_OPR = #{createOpr}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateOpr != null and updateOpr != ''">
+        or UPDATE_OPR = #{updateOpr}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.qcmbasechem.model.QcmBaseChem">
+    insert into QCM_BASE_CHEM (CHEM_CODE, CHEM_NAME, CHEM_TYPE, 
+      CHEM_FORMULA, VALID_FLAG, CHEM_SOURCE, 
+      L3_CODE_NO, L3_CHEM_CODE, DISPLAY_ORDER, 
+      MEMO, CREATE_OPR, CREATE_TIME, 
+      UPDATE_OPR, UPDATE_TIME)
+    values (#{chemCode,jdbcType=VARCHAR}, #{chemName,jdbcType=VARCHAR}, #{chemType,jdbcType=CHAR}, 
+      #{chemFormula,jdbcType=VARCHAR}, #{validFlag,jdbcType=CHAR}, #{chemSource,jdbcType=VARCHAR}, 
+      #{l3CodeNo,jdbcType=VARCHAR}, #{l3ChemCode,jdbcType=VARCHAR}, #{displayOrder,jdbcType=DECIMAL}, 
+      #{memo,jdbcType=VARCHAR}, #{createOpr,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateOpr,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.qcmbasechem.model.QcmBaseChem">
+    insert into QCM_BASE_CHEM
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="chemCode != null">
+        CHEM_CODE,
+      </if>
+      <if test="chemName != null">
+        CHEM_NAME,
+      </if>
+      <if test="chemType != null">
+        CHEM_TYPE,
+      </if>
+      <if test="chemFormula != null">
+        CHEM_FORMULA,
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG,
+      </if>
+      <if test="chemSource != null">
+        CHEM_SOURCE,
+      </if>
+      <if test="l3CodeNo != null">
+        L3_CODE_NO,
+      </if>
+      <if test="l3ChemCode != null">
+        L3_CHEM_CODE,
+      </if>
+      <if test="displayOrder != null">
+        DISPLAY_ORDER,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="createOpr != null">
+        CREATE_OPR,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateOpr != null">
+        UPDATE_OPR,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="chemCode != null">
+        #{chemCode,jdbcType=VARCHAR},
+      </if>
+      <if test="chemName != null">
+        #{chemName,jdbcType=VARCHAR},
+      </if>
+      <if test="chemType != null">
+        #{chemType,jdbcType=CHAR},
+      </if>
+      <if test="chemFormula != null">
+        #{chemFormula,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        #{validFlag,jdbcType=CHAR},
+      </if>
+      <if test="chemSource != null">
+        #{chemSource,jdbcType=VARCHAR},
+      </if>
+      <if test="l3CodeNo != null">
+        #{l3CodeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="l3ChemCode != null">
+        #{l3ChemCode,jdbcType=VARCHAR},
+      </if>
+      <if test="displayOrder != null">
+        #{displayOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="createOpr != null">
+        #{createOpr,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateOpr != null">
+        #{updateOpr,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.qcmbasechem.model.QcmBaseChem">
+    update QCM_BASE_CHEM
+    set CHEM_NAME = #{chemName,jdbcType=VARCHAR},
+      CHEM_TYPE = #{chemType,jdbcType=CHAR},
+      CHEM_FORMULA = #{chemFormula,jdbcType=VARCHAR},
+      VALID_FLAG = #{validFlag,jdbcType=CHAR},
+      CHEM_SOURCE = #{chemSource,jdbcType=VARCHAR},
+      L3_CODE_NO = #{l3CodeNo,jdbcType=VARCHAR},
+      L3_CHEM_CODE = #{l3ChemCode,jdbcType=VARCHAR},
+      DISPLAY_ORDER = #{displayOrder,jdbcType=DECIMAL},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      CREATE_OPR = #{createOpr,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_OPR = #{updateOpr,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
+    where CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.qcmbasechem.model.QcmBaseChem">
+    update QCM_BASE_CHEM
+    <set>
+      <if test="chemName != null">
+        CHEM_NAME = #{chemName,jdbcType=VARCHAR},
+      </if>
+      <if test="chemType != null">
+        CHEM_TYPE = #{chemType,jdbcType=CHAR},
+      </if>
+      <if test="chemFormula != null">
+        CHEM_FORMULA = #{chemFormula,jdbcType=VARCHAR},
+      </if>
+      <if test="validFlag != null">
+        VALID_FLAG = #{validFlag,jdbcType=CHAR},
+      </if>
+      <if test="chemSource != null">
+        CHEM_SOURCE = #{chemSource,jdbcType=VARCHAR},
+      </if>
+      <if test="l3CodeNo != null">
+        L3_CODE_NO = #{l3CodeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="l3ChemCode != null">
+        L3_CHEM_CODE = #{l3ChemCode,jdbcType=VARCHAR},
+      </if>
+      <if test="displayOrder != null">
+        DISPLAY_ORDER = #{displayOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="createOpr != null">
+        CREATE_OPR = #{createOpr,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateOpr != null">
+        UPDATE_OPR = #{updateOpr,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where CHEM_CODE = #{chemCode,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where CHEM_CODE = #{chemCode,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 QCM_BASE_CHEM 
+      (CHEM_CODE, 
+      CHEM_NAME, CHEM_TYPE, CHEM_FORMULA, 
+      VALID_FLAG, CHEM_SOURCE, L3_CODE_NO, 
+      L3_CHEM_CODE, DISPLAY_ORDER, MEMO, 
+      CREATE_OPR, CREATE_TIME, UPDATE_OPR, 
+      UPDATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.chemCode,jdbcType=VARCHAR}, 
+      #{item.chemName,jdbcType=VARCHAR}, #{item.chemType,jdbcType=CHAR}, #{item.chemFormula,jdbcType=VARCHAR}, 
+      #{item.validFlag,jdbcType=CHAR}, #{item.chemSource,jdbcType=VARCHAR}, #{item.l3CodeNo,jdbcType=VARCHAR}, 
+      #{item.l3ChemCode,jdbcType=VARCHAR}, #{item.displayOrder,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.createOpr,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateOpr,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update QCM_BASE_CHEM
+     set
+       CHEM_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.chemCode,jdbcType=VARCHAR}
+       </foreach>
+       ,CHEM_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.chemName,jdbcType=VARCHAR}
+       </foreach>
+       ,CHEM_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.chemType,jdbcType=CHAR}
+       </foreach>
+       ,CHEM_FORMULA=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.chemFormula,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=CHAR}
+       </foreach>
+       ,CHEM_SOURCE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.chemSource,jdbcType=VARCHAR}
+       </foreach>
+       ,L3_CODE_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.l3CodeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,L3_CHEM_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.l3ChemCode,jdbcType=VARCHAR}
+       </foreach>
+       ,DISPLAY_ORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.displayOrder,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_OPR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.createOpr,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_OPR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.updateOpr,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case CHEM_CODE" close="end">
+          when #{item.chemCode,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where CHEM_CODE in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.chemCode,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from QCM_BASE_CHEM
+    where CHEM_CODE in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getIdAndName" resultMap="BaseResultMap">
+    select  t.chem_code,t.chem_name from QCM_BASE_CHEM t where 1=1
+  </select>
+</mapper>

+ 242 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/model/QcmBaseChem.java

@@ -0,0 +1,242 @@
+package com.steerinfo.ems.qcmbasechem.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 QcmBaseChem implements IBasePO<String> {
+    /**
+     * 元素代码(L2编码,元素类型+3位流水)(CHEM_CODE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="元素代码(L2编码,元素类型+3位流水)",required=true)
+    private String chemCode;
+
+    /**
+     * 元素名称(CHEM_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="元素名称",required=true)
+    private String chemName;
+
+    /**
+     * 元素类型(S:单一元素、M:复合元素)(CHEM_TYPE,CHAR,1)
+     */
+    @ApiModelProperty(value="元素类型(S:单一元素、M:复合元素)",required=true)
+    private String chemType;
+
+    /**
+     * 计算公式(CHEM_FORMULA,VARCHAR,200)
+     */
+    @ApiModelProperty(value="计算公式",required=false)
+    private String chemFormula;
+
+    /**
+     * 生效标志(1:有效、0:无效)(VALID_FLAG,CHAR,1)
+     */
+    @ApiModelProperty(value="生效标志(1:有效、0:无效)",required=true)
+    private String validFlag;
+
+    /**
+     * 元素来源(L3、L2)(CHEM_SOURCE,VARCHAR,10)
+     */
+    @ApiModelProperty(value="元素来源(L3、L2)",required=true)
+    private String chemSource;
+
+    /**
+     * L3代码编号(如:QMA1,代表复合元素)(L3_CODE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="L3代码编号(如:QMA1,代表复合元素)",required=false)
+    private String l3CodeNo;
+
+    /**
+     * L3元素代码(L3_CHEM_CODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="L3元素代码",required=false)
+    private String l3ChemCode;
+
+    /**
+     * 显示顺序(DISPLAY_ORDER,DECIMAL,5)
+     */
+    @ApiModelProperty(value="显示顺序",required=true)
+    private Integer displayOrder;
+
+    /**
+     * 备注(MEMO,VARCHAR,200)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 创建人(CREATE_OPR,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人",required=false)
+    private String createOpr;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private Date createTime;
+
+    /**
+     * 修改人(UPDATE_OPR,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateOpr;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.chemCode;
+    }
+
+    @Override
+    public void setId(String chemCode) {
+        this.chemCode = chemCode == null ? null : chemCode.trim();
+    }
+
+    public String getChemCode() {
+        return chemCode;
+    }
+
+    public void setChemCode(String chemCode) {
+        this.chemCode = chemCode == null ? null : chemCode.trim();
+    }
+
+    public String getChemName() {
+        return chemName;
+    }
+
+    public void setChemName(String chemName) {
+        this.chemName = chemName == null ? null : chemName.trim();
+    }
+
+    public String getChemType() {
+        return chemType;
+    }
+
+    public void setChemType(String chemType) {
+        this.chemType = chemType == null ? null : chemType.trim();
+    }
+
+    public String getChemFormula() {
+        return chemFormula;
+    }
+
+    public void setChemFormula(String chemFormula) {
+        this.chemFormula = chemFormula == null ? null : chemFormula.trim();
+    }
+
+    public String getValidFlag() {
+        return validFlag;
+    }
+
+    public void setValidFlag(String validFlag) {
+        this.validFlag = validFlag == null ? null : validFlag.trim();
+    }
+
+    public String getChemSource() {
+        return chemSource;
+    }
+
+    public void setChemSource(String chemSource) {
+        this.chemSource = chemSource == null ? null : chemSource.trim();
+    }
+
+    public String getL3CodeNo() {
+        return l3CodeNo;
+    }
+
+    public void setL3CodeNo(String l3CodeNo) {
+        this.l3CodeNo = l3CodeNo == null ? null : l3CodeNo.trim();
+    }
+
+    public String getL3ChemCode() {
+        return l3ChemCode;
+    }
+
+    public void setL3ChemCode(String l3ChemCode) {
+        this.l3ChemCode = l3ChemCode == null ? null : l3ChemCode.trim();
+    }
+
+    public Integer getDisplayOrder() {
+        return displayOrder;
+    }
+
+    public void setDisplayOrder(Integer displayOrder) {
+        this.displayOrder = displayOrder;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getCreateOpr() {
+        return createOpr;
+    }
+
+    public void setCreateOpr(String createOpr) {
+        this.createOpr = createOpr == null ? null : createOpr.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateOpr() {
+        return updateOpr;
+    }
+
+    public void setUpdateOpr(String updateOpr) {
+        this.updateOpr = updateOpr == null ? null : updateOpr.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", chemCode=").append(chemCode);
+        sb.append(", chemName=").append(chemName);
+        sb.append(", chemType=").append(chemType);
+        sb.append(", chemFormula=").append(chemFormula);
+        sb.append(", validFlag=").append(validFlag);
+        sb.append(", chemSource=").append(chemSource);
+        sb.append(", l3CodeNo=").append(l3CodeNo);
+        sb.append(", l3ChemCode=").append(l3ChemCode);
+        sb.append(", displayOrder=").append(displayOrder);
+        sb.append(", memo=").append(memo);
+        sb.append(", createOpr=").append(createOpr);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateOpr=").append(updateOpr);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 24 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/service/IQcmBaseChemService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.ems.qcmbasechem.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.qcmbasechem.model.QcmBaseChem;
+
+import java.util.List;
+
+/**
+ * QcmBaseChem服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 09:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:QcmBaseChem服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IQcmBaseChemService extends IBaseService<QcmBaseChem, String>{
+    //用于下拉框查询
+    public List<QcmBaseChem> getIdAndName();
+}

+ 41 - 0
src/main/java/com/steerinfo/ems/qcmbasechem/service/impl/QcmBaseChemServiceImpl.java

@@ -0,0 +1,41 @@
+package com.steerinfo.ems.qcmbasechem.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.qcmbasechem.model.QcmBaseChem;
+import com.steerinfo.ems.qcmbasechem.mapper.QcmBaseChemMapper;
+import com.steerinfo.ems.qcmbasechem.service.IQcmBaseChemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * QcmBaseChem服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-03 09:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-03
+ * 作者:generator
+ * 参考:
+ * 描述:QcmBaseChem服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "qcmBaseChemService")
+public class QcmBaseChemServiceImpl extends BaseServiceImpl<QcmBaseChem, String> implements IQcmBaseChemService {
+
+    @Autowired
+    private QcmBaseChemMapper qcmBaseChemMapper;
+
+    @Override
+    protected IBaseMapper<QcmBaseChem, String> getMapper() {
+        return qcmBaseChemMapper;
+    }
+
+    @Override
+    public List<QcmBaseChem> getIdAndName() {
+        return qcmBaseChemMapper.getIdAndName();
+    }
+}