From 3034fcaba0301ed1f200e9c388417360422478b6 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 19 四月 2024 14:30:55 +0800 Subject: [PATCH] 数据字典添加类型+检验项目的要求值逻辑+资质bug修改 --- inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java | 10 ++++++++++ cnas-server/src/main/java/com/yuanchu/mom/service/CertificationService.java | 2 +- user-server/src/main/resources/mapper/EnumMapper.xml | 2 +- cnas-server/src/main/java/com/yuanchu/mom/controller/CertificationController.java | 2 +- cnas-server/src/main/resources/mapper/CertificationMapper.xml | 4 ++-- cnas-server/src/main/java/com/yuanchu/mom/service/impl/CertificationServiceImpl.java | 8 ++++++-- user-server/src/main/java/com/yuanchu/mom/pojo/Enums.java | 7 +++++++ inspect-server/src/main/resources/mapper/StandardTreeMapper.xml | 4 +++- inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java | 1 + cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml | 4 +++- 10 files changed, 35 insertions(+), 9 deletions(-) diff --git a/cnas-server/src/main/java/com/yuanchu/mom/controller/CertificationController.java b/cnas-server/src/main/java/com/yuanchu/mom/controller/CertificationController.java index 0cb47fe..b9ebb9c 100644 --- a/cnas-server/src/main/java/com/yuanchu/mom/controller/CertificationController.java +++ b/cnas-server/src/main/java/com/yuanchu/mom/controller/CertificationController.java @@ -43,7 +43,7 @@ @ApiOperation(value = "鍒犻櫎璧勮川鏄庣粏鍒楄〃") @PostMapping("/delCertificationDetail") - public Result<?> delCertificationDetail(@RequestBody List<Integer> ids) { + public Result<?> delCertificationDetail( String ids) { return Result.success(certificationService.delCertificationDetail(ids)); } } diff --git a/cnas-server/src/main/java/com/yuanchu/mom/service/CertificationService.java b/cnas-server/src/main/java/com/yuanchu/mom/service/CertificationService.java index 826758e..2d329a1 100644 --- a/cnas-server/src/main/java/com/yuanchu/mom/service/CertificationService.java +++ b/cnas-server/src/main/java/com/yuanchu/mom/service/CertificationService.java @@ -15,5 +15,5 @@ int addCertificationDetail(Certification certification); //鍒犻櫎璧勮川鏄庣粏鍒楄〃 - int delCertificationDetail(List<Integer> ids); + int delCertificationDetail(String ids); } diff --git a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CertificationServiceImpl.java b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CertificationServiceImpl.java index 8336cb3..dc81ca3 100644 --- a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CertificationServiceImpl.java +++ b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CertificationServiceImpl.java @@ -1,5 +1,7 @@ package com.yuanchu.mom.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yuanchu.mom.common.GetLook; @@ -17,6 +19,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service @AllArgsConstructor @@ -43,8 +46,9 @@ //鍒犻櫎璧勮川鏄庣粏鍒楄〃 @Override - public int delCertificationDetail(List<Integer> ids) { - return certificationMapper.deleteBatchIds(ids); + public int delCertificationDetail(String ids) { + List<Integer> list = JSON.parseArray(ids,Integer.class); + return certificationMapper.deleteBatchIds(list); } } diff --git a/cnas-server/src/main/resources/mapper/CertificationMapper.xml b/cnas-server/src/main/resources/mapper/CertificationMapper.xml index 2a355de..825ac46 100644 --- a/cnas-server/src/main/resources/mapper/CertificationMapper.xml +++ b/cnas-server/src/main/resources/mapper/CertificationMapper.xml @@ -13,16 +13,16 @@ expire_time, u1.name create_user_name, c.create_time, - case when now()>expire_time then 0 + case when now() > expire_time then 0 else 1 end as state, image_url, file_url from certification c left join user u1 on c.create_user = u1.id order by c.id desc) a - group by a.name <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> + group by name </select> </mapper> \ No newline at end of file diff --git a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml index 9da3cee..4999d55 100644 --- a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml +++ b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml @@ -31,7 +31,9 @@ inspection_value_type, dic, template_id, - son_laboratory + son_laboratory, + ask, + ask_tell from structure_item_parameter <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java index e90142f..5bcd02f 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java @@ -177,6 +177,7 @@ /*浠婃棩椤圭洰鍚堟牸鐜�*/ //浠婃棩瀹屾垚閲忎腑鐨勫悎鏍奸噺/浠婃棩瀹屾垚閲� Long accept = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).eq(InsProduct::getInsResult,1).apply("DATE(create_time) = CURDATE()")); + map.put("ACCEPT", accept); BigDecimal acceptRate = new BigDecimal(accept).divide(new BigDecimal(finishe == 0 ? 1 : finishe), 2, BigDecimal.ROUND_HALF_UP); map.put("ACCEPT_RATE_TODAY", acceptRate); diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java index 4e5b974..2f3ea2e 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yuanchu.mom.common.GetLook; @@ -153,6 +154,7 @@ public void reTreeBySampleType(String sampleType) { Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); CompletableFuture.supplyAsync(() -> { + //鏍规嵁鏍峰搧鍚嶇О鏌ヨ鎵�鏈夋娴嬮」鐩弬鏁�(鑳藉姏) List<StandardProductList> productList = standardTreeMapper.getStandardProductListBySample(sampleType); List<StandardProductList> productList1 = JSON.parseArray(JSON.toJSONString(productList), StandardProductList.class); List<StandardMethodList> methodList = standardTreeMapper.getStandardMethodListBySample(sampleType); @@ -169,6 +171,7 @@ sl1.setRemark(sl2.getRemark()); sl2.setId(sl1.getId()); standardMethodListMapper.updateById(sl1); + //閫氳繃妫�楠屾爣鍑唅d鏌ヨ妫�楠岄」鐩�(鏍囧噯搴�) List<StandardProductList> standardProductList = standardProductListService.selectStandardProductListByMethodId(sl1.getId()); for (StandardProductList pl1 : standardProductList) { int count2 = 0; @@ -178,6 +181,13 @@ pl2.setUpdateTime(LocalDateTime.now()); pl2.setId(pl1.getId()); pl2.setSample(tree.getSample()); + //濡傛灉鏍囧噯搴撻噷闈㈢殑瑕佹眰鏈夊�煎垯涓嶆洿鏂�,瑕佹眰涓簄ull鍒欏悓姝ユ洿鏂� + if (ObjectUtils.isNotEmpty(pl1.getAsk())){ + pl2.setAsk(null); + } + if (ObjectUtils.isNotEmpty(pl1.getTell())){ + pl2.setTell(null); + } standardProductListMapper.updateById(pl2); break; } else { diff --git a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml index 1efe402..3c2fc57 100644 --- a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml +++ b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml @@ -94,7 +94,9 @@ sample, bsm, template_id, - dic + dic, + ask, + ask_tell as tell from structure_item_parameter sp left join structure_test_object sto on sto.id = sp.sample where sto.specimen_name = #{sampleType} diff --git a/user-server/src/main/java/com/yuanchu/mom/pojo/Enums.java b/user-server/src/main/java/com/yuanchu/mom/pojo/Enums.java index 949355e..8b89147 100644 --- a/user-server/src/main/java/com/yuanchu/mom/pojo/Enums.java +++ b/user-server/src/main/java/com/yuanchu/mom/pojo/Enums.java @@ -47,6 +47,13 @@ @ApiModelProperty(value = "浼樺厛绾�") private Integer orderNum; + /** + * 绫诲瀷 + */ + @ValueTableShow(3) + @ApiModelProperty(value = "绫诲瀷") + private String type; + @ApiModelProperty(value = "鍒涘缓鐢ㄦ埛") @TableField(fill = FieldFill.INSERT) private Integer createUser; diff --git a/user-server/src/main/resources/mapper/EnumMapper.xml b/user-server/src/main/resources/mapper/EnumMapper.xml index 989c580..2fdfd9e 100644 --- a/user-server/src/main/resources/mapper/EnumMapper.xml +++ b/user-server/src/main/resources/mapper/EnumMapper.xml @@ -22,7 +22,7 @@ <select id="selectEnumPageList" resultType="com.yuanchu.mom.pojo.Enums"> select * from ( - select e.id,e.category,e.label,e.value,e.order_num, u2.name create_user_name,e.create_time, u3.name update_user_name, e.update_time + select e.id,e.category,e.label,e.value,e.order_num,e.type, u2.name create_user_name,e.create_time, u3.name update_user_name, e.update_time from enums e left join user u2 on u2.id = e.create_user left join user u3 on u3.id = e.update_user -- Gitblit v1.9.3