数据字典添加类型+检验项目的要求值逻辑+资质bug修改
| | |
| | | |
| | | @ApiOperation(value = "删除资质明细列表") |
| | | @PostMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail(@RequestBody List<Integer> ids) { |
| | | public Result<?> delCertificationDetail( String ids) { |
| | | return Result.success(certificationService.delCertificationDetail(ids)); |
| | | } |
| | | } |
| | |
| | | int addCertificationDetail(Certification certification); |
| | | |
| | | //删除资质明细列表 |
| | | int delCertificationDetail(List<Integer> ids); |
| | | int delCertificationDetail(String ids); |
| | | } |
| | |
| | | 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; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | |
| | | //删除资质明细列表 |
| | | @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); |
| | | } |
| | | |
| | | } |
| | |
| | | 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> |
| | |
| | | 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} |
| | |
| | | /*今日项目合格率*/ |
| | | //今日完成量中的合格量/今日完成量 |
| | | 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); |
| | | |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | sl1.setRemark(sl2.getRemark()); |
| | | sl2.setId(sl1.getId()); |
| | | standardMethodListMapper.updateById(sl1); |
| | | //通过检验标准id查询检验项目(标准库) |
| | | List<StandardProductList> standardProductList = standardProductListService.selectStandardProductListByMethodId(sl1.getId()); |
| | | for (StandardProductList pl1 : standardProductList) { |
| | | int count2 = 0; |
| | |
| | | pl2.setUpdateTime(LocalDateTime.now()); |
| | | pl2.setId(pl1.getId()); |
| | | pl2.setSample(tree.getSample()); |
| | | //如果标准库里面的要求有值则不更新,要求为null则同步更新 |
| | | if (ObjectUtils.isNotEmpty(pl1.getAsk())){ |
| | | pl2.setAsk(null); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(pl1.getTell())){ |
| | | pl2.setTell(null); |
| | | } |
| | | standardProductListMapper.updateById(pl2); |
| | | break; |
| | | } else { |
| | |
| | | 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} |
| | |
| | | @ApiModelProperty(value = "优先级") |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty(value = "类型") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | |
| | | |
| | | <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 |