cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
@@ -41,12 +41,16 @@ @ApiModelProperty(value = "实验室") private String laboratory; @ValueTableShow(4) @ApiModelProperty(value = "子实验室") private String sonLaboratory; @ValueTableShow(5) @ApiModelProperty(value = "计量单位") private String unit; @ValueTableShow(5) @ApiModelProperty(value = "检验标准") @ApiModelProperty(value = "标准方法") private String method; @ValueTableShow(6) @@ -55,7 +59,7 @@ @ValueTableShow(7) @ApiModelProperty(value = "工时(H)") private Integer manHour; private Double manHour; @ValueTableShow(7) @ApiModelProperty(value = "预计时间(天)") @@ -85,18 +89,22 @@ @ApiModelProperty(value = "区间") private String section; @ValueTableShow(13) /*@ValueTableShow(13) @ApiModelProperty(value = "取值类型") private String valueType; private String valueType;*/ @ValueTableShow(13) @ApiModelProperty(value = "特殊标识") private String bsm; @ValueTableShow(5) @ApiModelProperty(value = "样品名称") @ApiModelProperty(value = "检验对象") private String sample; @ValueTableShow(14) @ApiModelProperty(value = "原始记录模板") private Integer templateId; @ApiModelProperty(value = "创建人id") @TableField(fill = FieldFill.INSERT) private Integer createUser; cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -28,7 +28,9 @@ man_day, bsm, sample, inspection_value_type inspection_value_type, template_id, son_laboratory from structure_item_parameter <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} inspect-server/src/main/java/com/yuanchu/mom/controller/StandardTemplateController.java
@@ -1,27 +1,27 @@ package com.yuanchu.mom.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yuanchu.mom.annotation.ValueAuth; import com.yuanchu.mom.pojo.StandardTemplate; import com.yuanchu.mom.service.StandardTemplateService; import com.yuanchu.mom.utils.JackSonUtil; import com.yuanchu.mom.vo.Result; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import java.util.Map; @RequestMapping("/StandardTemplate") @RestController @AllArgsConstructor @Api("原始记录模板") public class StandardTemplateController { private StandardTemplateService standardTemplateService; @ApiOperation(value = "获取检验模板列表") @ApiOperation(value = "获取原始记录模板列表") @PostMapping("/selectStandardTemplatePageList") public Result selectStandardTemplatePageList(@RequestBody Map<String, Object> data) throws Exception { Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); @@ -29,22 +29,29 @@ return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); } @ApiOperation(value = "添加检验模板") @ApiOperation(value = "添加原始记录模板") @PostMapping("/addStandardTemplate") public Result addStandardTemplate(@RequestBody StandardTemplate standardTemplate) { return Result.success(standardTemplateService.addStandardTemplate(standardTemplate)); } @ApiOperation(value = "修改检验模板") @ApiOperation(value = "修改原始记录模板") @PostMapping("/upStandardTemplate") public Result<?> upStandardTemplate(@RequestBody StandardTemplate standardTemplate) { return Result.success(standardTemplateService.upStandardTemplate(standardTemplate)); } @ApiOperation(value = "删除检验模板") @ApiOperation(value = "删除原始记录模板") @PostMapping("/delStandardTemplate") public Result<?> delStandardTemplate(Integer id) { return Result.success(standardTemplateService.delStandardTemplate(id)); } @ApiOperation(value = "查询原始记录模板枚举") @GetMapping("/getStandardTemplate") @ValueAuth public Result<?> getStandardTemplate() { return Result.success(standardTemplateService.getStandardTemplate()); } } inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
@@ -64,6 +64,9 @@ */ private String model; @ApiModelProperty("子实验室") private String sonLaboratory; /** * 计量单位 */ @@ -139,6 +142,9 @@ */ private Integer state; @ApiModelProperty("型号") private Integer templateId; @ApiModelProperty("") @TableField(fill = FieldFill.INSERT) private Integer createUser; inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
@@ -48,6 +48,9 @@ @ApiModelProperty("实验室") private String laboratory; @ApiModelProperty("子实验室") private String sonLaboratory; /** * 计量单位 */ @@ -64,7 +67,7 @@ * 工时(H) */ @ApiModelProperty("工时") private Integer manHour; private Double manHour; /** * 工时分组 @@ -150,6 +153,9 @@ @ApiModelProperty("型号") private String model; @ApiModelProperty("型号") private Integer templateId; @ApiModelProperty("") @TableField(fill = FieldFill.INSERT) private Integer createUser; inspect-server/src/main/java/com/yuanchu/mom/service/StandardTemplateService.java
@@ -4,6 +4,7 @@ import com.yuanchu.mom.pojo.StandardTemplate; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; import java.util.Map; /** @@ -21,4 +22,6 @@ int delStandardTemplate(Integer id); List<StandardTemplate> getStandardTemplate(); } inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTemplateServiceImpl.java
@@ -1,6 +1,7 @@ package com.yuanchu.mom.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yuanchu.mom.common.GetLook; import com.yuanchu.mom.common.PrintChina; @@ -12,6 +13,7 @@ import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.List; import java.util.Map; /** @@ -52,6 +54,11 @@ public int delStandardTemplate(Integer id) { return standardTemplateMapper.deleteById(id); } @Override public List<StandardTemplate> getStandardTemplate() { return standardTemplateMapper.selectList(Wrappers.<StandardTemplate>lambdaQuery().select(StandardTemplate::getId,StandardTemplate::getName)); } } inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -48,7 +48,7 @@ @Transactional(rollbackFor = Exception.class) public int addStandardTree(StandardTree standardTree) { if(standardTree.getSample()!=null){ List<StandardProductList> list = standardTreeMapper.getStandardProductListBySample(standardTree.getSample()); List<StandardProductList> list = standardTreeMapper.getStandardProductListBySample(standardTree.getSampleType()); for (StandardProductList standardProductList : list) { standardProductList.setFactory(standardTree.getFactory()); standardProductList.setLaboratory(standardTree.getLaboratory()); inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml
@@ -66,7 +66,9 @@ value_type, method, man_day, bsm bsm, template_id, son_laboratory from structure_item_parameter where method = #{code} </select> inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -56,6 +56,7 @@ inspection_item_classify, inspection_item_subclass, laboratory, son_laboratory, unit, price, man_hour, @@ -68,7 +69,8 @@ value_type, method, man_day, bsm bsm, template_id from structure_item_parameter where id = #{id} </select> @@ -77,6 +79,7 @@ inspection_item_classify, inspection_item_subclass, laboratory, son_laboratory, unit, price, man_hour, @@ -90,7 +93,8 @@ method, man_day, sample, bsm bsm, template_id from structure_item_parameter where sample = #{sample} </select>