| | |
| | | private String unit; |
| | | |
| | | @ValueTableShow(5) |
| | | @ApiModelProperty(value = "è¯éªæ¹æ³") |
| | | @ApiModelProperty(value = "æ£éªæ å") |
| | | private String method; |
| | | |
| | | @ValueTableShow(6) |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | | import com.yuanchu.mom.service.StandardMethodListService; |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StandardTreeService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | @ApiOperation(value = "è·åæ åæ ") |
| | | @GetMapping("/selectStandardTreeList") |
| | |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çè¦æ±å¼") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(@RequestBody StandardProductList list){ |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id){ |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids){ |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree){ |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree){ |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.yuanchu.mom.pojo.StandardMethodList; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists(String data1,String data2,String data3,String data4, String data5); |
| | | |
| | | List<StandardProductList> selectParameterList(String code); |
| | | |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-05 10:33:29 |
| | | * @Entity com.yuanchu.mom.pojo.StandardProductList |
| | | */ |
| | | public interface StandardProductListMapper extends BaseMapper<StandardProductList> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.dto.FactoryDto; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | |
| | | |
| | | List<FactoryDto> selectStandardTreeList(); |
| | | |
| | | StandardProductList selectStandardProductById(Integer id); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sample_type; |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ åæ ä¸çæ£éªé¡¹ç® |
| | | * @TableName standard_product_list |
| | | */ |
| | | @TableName(value ="standard_product_list") |
| | | @Data |
| | | public class StandardProductList implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | /** |
| | | * æ£éªé¡¹åç±» |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹åç±»") |
| | | private String inspectionItemClassify; |
| | | |
| | | /** |
| | | * æ£éªé¡¹å°ç±» |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹å°ç±»") |
| | | private String inspectionItemSubclass; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * 计éåä½ |
| | | */ |
| | | @ApiModelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * åä»·(å
) |
| | | */ |
| | | @ApiModelProperty("åä»·") |
| | | private BigDecimal price; |
| | | |
| | | /** |
| | | * å·¥æ¶(H) |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶") |
| | | private Integer manHour; |
| | | |
| | | /** |
| | | * å·¥æ¶åç» |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | /** |
| | | * æ£éªå¼ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | /** |
| | | * 设å¤ç» |
| | | */ |
| | | @ApiModelProperty("设å¤ç»") |
| | | private String deviceGroup; |
| | | |
| | | /** |
| | | * æ£éªæ¬¡æ° |
| | | */ |
| | | @ApiModelProperty("æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | | /** |
| | | * åºé´ |
| | | */ |
| | | @ApiModelProperty("åºé´") |
| | | private String section; |
| | | |
| | | /** |
| | | * åå¼ç±»å |
| | | */ |
| | | @ApiModelProperty("åå¼ç±»å") |
| | | private String valueType; |
| | | |
| | | /** |
| | | * æ¹æ³ |
| | | */ |
| | | @ApiModelProperty("æ¹æ³") |
| | | private String method; |
| | | |
| | | /** |
| | | * é¢è®¡æ¶é´(天) |
| | | */ |
| | | @ApiModelProperty("é¢è®¡æ¶é´") |
| | | private Integer manDay; |
| | | |
| | | /** |
| | | * ç¹æ®æ è¯ |
| | | */ |
| | | @ApiModelProperty("ç¹æ®æ è¯") |
| | | private String bsm; |
| | | |
| | | /** |
| | | * è¦æ±å¼ |
| | | */ |
| | | @ApiModelProperty("è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ åæ¹æ³id |
| | | */ |
| | | @ApiModelProperty("æ åæ¹æ³id") |
| | | private Integer standardMethodListId; |
| | | |
| | | @ApiModelProperty("å·¥å") |
| | | private String factory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
| | |
| | | |
| | | import com.yuanchu.mom.pojo.StandardMethodList; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | int addStandardMethodList(Integer standardId, String tree); |
| | | |
| | | List<StandardMethodList> selectsStandardMethodByFLSSM(String tree); |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM(String tree); |
| | | |
| | | int delStandardMethodByFLSSM(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | public interface StandardProductListService extends IService<StandardProductList> { |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | | |
| | | int delStandardProduct(JSONArray list); |
| | | |
| | | } |
| | |
| | | |
| | | int addStandardTree(StandardTree standardTree); |
| | | |
| | | int delStandardTree(String tree); |
| | | |
| | | int addStandardProduct(String ids, String tree); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.StandardProductListMapper; |
| | | import com.yuanchu.mom.pojo.StandardMethodList; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.service.StandardMethodListService; |
| | | import com.yuanchu.mom.mapper.StandardMethodListMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | private StandardMethodListMapper standardMethodListMapper; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardMethodList(Integer standardId, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | Map<String, String> map = standardMethodListMapper.selectStandardMethodById(standardId); |
| | |
| | | list.setName(map.get("name")); |
| | | list.setRemark(map.get("remark")); |
| | | list.setFactory(trees[0]); |
| | | list.setLaboratory(trees[1]); |
| | | list.setSample_type(trees[2]); |
| | | list.setSample(trees[3]); |
| | | try { |
| | | list.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | return standardMethodListMapper.insert(list); |
| | | standardMethodListMapper.insert(list); |
| | | List<StandardProductList> standardProductLists = standardMethodListMapper.selectParameterList(list.getCode()); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | standardProductList.setStandardMethodListId(list.getId()); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethodList> selectsStandardMethodByFLSSM(String tree) { |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | List<StandardMethodList> standardMethodLists = null; |
| | | List<StandardProductList> standardProductLists = null; |
| | | switch (trees.length){ |
| | | case 5: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],trees[4]); |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2]).eq(StandardProductList::getSample, trees[3]).eq(StandardProductList::getModel, trees[4])); |
| | | break; |
| | | case 4: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],null); |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2]).eq(StandardProductList::getSample, trees[3])); |
| | | break; |
| | | case 3: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],null,null); |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1]).eq(StandardProductList::getSampleType, trees[2])); |
| | | break; |
| | | case 2: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],null,null,null); |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0]).eq(StandardProductList::getLaboratory, trees[1])); |
| | | break; |
| | | case 1: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],null,null,null,null); |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getFactory, trees[0])); |
| | | break; |
| | | } |
| | | return standardMethodLists; |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | map.put("standardProductList", standardProductLists); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delStandardMethodByFLSSM(Integer id) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id)); |
| | | return standardMethodListMapper.deleteById(id); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.mapper.StandardProductListMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardProductListServiceImpl extends ServiceImpl<StandardProductListMapper, StandardProductList> |
| | | implements StandardProductListService{ |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Override |
| | | public int upStandardProductList(StandardProductList list) { |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardProduct(JSONArray list) { |
| | | return standardProductListMapper.deleteBatchIds(list); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.dto.FactoryDto; |
| | | import com.yuanchu.mom.mapper.StandardMethodListMapper; |
| | | import com.yuanchu.mom.mapper.StandardProductListMapper; |
| | | import com.yuanchu.mom.pojo.StandardMethodList; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | | import com.yuanchu.mom.service.StandardMethodListService; |
| | | import com.yuanchu.mom.service.StandardTreeService; |
| | | import com.yuanchu.mom.mapper.StandardTreeMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_tree(æ åæ )ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-01 15:06:44 |
| | | */ |
| | | * @author Administrator |
| | | * @description é对表ãstandard_tree(æ åæ )ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-01 15:06:44 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardTreeServiceImpl extends ServiceImpl<StandardTreeMapper, StandardTree> |
| | | implements StandardTreeService{ |
| | | implements StandardTreeService { |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardMethodListMapper standardMethodListMapper; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Override |
| | | public List<FactoryDto> selectStandardTreeList() { |
| | |
| | | public int addStandardTree(StandardTree standardTree) { |
| | | return standardTreeMapper.insert(standardTree); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delStandardTree(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | switch (trees.length) { |
| | | case 5: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]).eq(StandardTree::getModel, trees[4])); |
| | | break; |
| | | case 4: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3])); |
| | | break; |
| | | case 3: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2])); |
| | | break; |
| | | case 2: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1])); |
| | | break; |
| | | case 1: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0])); |
| | | break; |
| | | } |
| | | Map<String, List<?>> listMap = standardMethodListService.selectsStandardMethodByFLSSM(tree); |
| | | if(listMap.get("standardMethodList").size() != 0){ |
| | | standardMethodListMapper.deleteBatchIds(listMap.get("standardMethodList")); |
| | | } |
| | | if(listMap.get("standardProductList").size() != 0){ |
| | | standardProductListMapper.deleteBatchIds(listMap.get("standardProductList")); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardProduct(String ids, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | JSONArray jsonArray = JSON.parseArray(ids); |
| | | for (Object o : jsonArray) { |
| | | StandardProductList standardProductList = standardTreeMapper.selectStandardProductById(Integer.parseInt("" + o)); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="standardTreeId" column="standard_tree_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | |
| | | and model = #{data5} |
| | | </if> |
| | | </select> |
| | | <select id="selectParameterList" resultType="standardProductList"> |
| | | select |
| | | inspection_item, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm |
| | | from structure_item_parameter |
| | | where method = #{code} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.yuanchu.mom.mapper.StandardProductListMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.StandardProductList"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | <result property="price" column="price" jdbcType="DECIMAL"/> |
| | | <result property="manHour" column="man_hour" jdbcType="INTEGER"/> |
| | | <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/> |
| | | <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/> |
| | | <result property="deviceGroup" column="device_group" jdbcType="VARCHAR"/> |
| | | <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/> |
| | | <result property="section" column="section" jdbcType="VARCHAR"/> |
| | | <result property="valueType" column="value_type" jdbcType="VARCHAR"/> |
| | | <result property="method" column="method" jdbcType="VARCHAR"/> |
| | | <result property="manDay" column="man_day" jdbcType="INTEGER"/> |
| | | <result property="bsm" column="bsm" jdbcType="VARCHAR"/> |
| | | <result property="ask" column="ask" jdbcType="VARCHAR"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,inspection_item,inspection_item_classify, |
| | | inspection_item_subclass,laboratory,unit, |
| | | price,man_hour,man_hour_group, |
| | | inspection_item_type,inspection_value_type,device_group, |
| | | checkout_number,section,value_type, |
| | | method,man_day,bsm, |
| | | ask,standard_method_list_id,create_user, |
| | | update_user,create_time,update_time |
| | | </sql> |
| | | </mapper> |
| | |
| | | <select id="selectStandardTreeList" resultMap="FactoryDto"> |
| | | select factory,laboratory,sample_type,sample,model from standard_tree |
| | | </select> |
| | | |
| | | <select id="selectStandardProductById" resultType="com.yuanchu.mom.pojo.StandardProductList"> |
| | | select |
| | | inspection_item, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm |
| | | from structure_item_parameter |
| | | where id = #{id} |
| | | </select> |
| | | </mapper> |