From 2298b0125d761930e07ec7b482146fda32887725 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期二, 16 四月 2024 18:02:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java | 3 +++ inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java | 2 +- framework/src/main/java/com/yuanchu/mom/utils/QueryWrappers.java | 5 +++++ inspect-server/src/main/resources/mapper/InsOrderMapper.xml | 8 ++++---- cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java | 4 ++++ inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 2 ++ system-run/src/main/resources/application-prod.yml | 8 ++++++-- inspect-server/src/main/resources/mapper/StandardTreeMapper.xml | 1 + cnas-server/src/main/resources/mapper/StandardMethodMapper.xml | 8 ++------ 9 files changed, 28 insertions(+), 13 deletions(-) diff --git a/cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java b/cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java index 9f36aab..d099dc5 100644 --- a/cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java +++ b/cnas-server/src/main/java/com/yuanchu/mom/pojo/StandardMethod.java @@ -79,4 +79,8 @@ @TableField(fill = FieldFill.INSERT_UPDATE) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; + + @ValueTableShow(3) + @ApiModelProperty(value = "鏄惁浜у搧鏍囧噯") + private Integer isProduct; } \ No newline at end of file diff --git a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java index a1ac1ec..8652c20 100644 --- a/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java +++ b/cnas-server/src/main/java/com/yuanchu/mom/service/impl/CapacityScopeServiceImpl.java @@ -48,6 +48,9 @@ @Override public int addItemParameter(StructureItemParameter itemParameter) { + if (itemParameter.getBsm().equals("")||itemParameter.getBsm()==null){ + itemParameter.setBsm("0"); + } return structureItemParameterMapper.insert(itemParameter); } diff --git a/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml b/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml index 6bb36b0..1dfd0d1 100644 --- a/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml +++ b/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml @@ -15,11 +15,6 @@ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> </resultMap> - <sql id="Base_Column_List"> - id,code,name, - remark,create_user,create_time, - update_user,update_time - </sql> <select id="selectStandardMethodList" resultType="com.yuanchu.mom.pojo.StandardMethod"> select * from ( select sm.id, @@ -31,7 +26,8 @@ u1.name create_user_name, sm.create_time, u2.name update_user_name, - sm.update_time + sm.update_time, + sm.is_product from standard_method sm left join user u1 on sm.create_user = u1.id left join user u2 on sm.update_user = u2.id diff --git a/framework/src/main/java/com/yuanchu/mom/utils/QueryWrappers.java b/framework/src/main/java/com/yuanchu/mom/utils/QueryWrappers.java index b9b34a0..8a3998f 100644 --- a/framework/src/main/java/com/yuanchu/mom/utils/QueryWrappers.java +++ b/framework/src/main/java/com/yuanchu/mom/utils/QueryWrappers.java @@ -3,6 +3,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -48,6 +49,10 @@ if(value == null || value.equals("")){ continue; } + /*boolean bool = field.isAnnotationPresent(TableField.class); + if (bool){ + if(field.getAnnotation(TableField.class).exist()==false)continue; + }*/ if (!field.getName().equals("orderBy")) { if(value.getClass()== LocalDateTime.class){ wrapper.like(StrUtil.toUnderlineCase(field.getName()), ((LocalDateTime) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java index 9b15c05..a3bbde2 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java @@ -64,7 +64,7 @@ pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); urlString = realpath + "/" + pathName; file.transferTo(new File(urlString)); - return Result.success(insReportService.inReport("/word/" + pathName, id)); + return Result.success(insReportService.inReport("/word/"+pathName, id)); } catch (Exception e) { throw new ErrorException("鏂囦欢涓婁紶澶辫触"); } diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java index 41312ec..85b7357 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java @@ -456,6 +456,8 @@ template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); insReport.setUrl("/word/" + name); insReportMapper.insert(insReport); + insOrder.setState(4); + insOrderMapper.updateById(insOrder); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml index b11f9b9..cc2e865 100644 --- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml @@ -125,7 +125,7 @@ isa.sample, isa.model, c.price, - ip.inspection_item, + c.inspection_item, u.company, u.`name`, i.create_user, @@ -133,10 +133,10 @@ FROM ins_order i LEFT JOIN ins_sample isa ON isa.ins_order_id = i.id - LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id LEFT JOIN `user` u ON u.id = i.user_id - LEFT JOIN (select SUM(b.price) price,b.ins_sample_id from (select * from ins_product where state = 1 GROUP BY ins_sample_id,man_hour_group) b GROUP BY b.ins_sample_id) c ON c.ins_sample_id = isa.id - where ip.state = 1 + LEFT JOIN (select SUM(b.price) price,b.ins_sample_id,GROUP_CONCAT(b.inspection_item SEPARATOR ',') + inspection_item from (select * from ins_product where state = 1 GROUP BY ins_sample_id,man_hour_group) b GROUP + BY b.ins_sample_id) c ON c.ins_sample_id = isa.id ) a <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} diff --git a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml index ed98876..fd9986f 100644 --- a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml +++ b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml @@ -102,5 +102,6 @@ select sm.code,sm.name,sm.remark from standard_method sm left join structure_test_object sto on sm.structure_test_object_id = sto.id where sto.specimen_name = #{sampleType} + and is_product = 1 </select> </mapper> diff --git a/system-run/src/main/resources/application-prod.yml b/system-run/src/main/resources/application-prod.yml index d1dc538..bb8421b 100644 --- a/system-run/src/main/resources/application-prod.yml +++ b/system-run/src/main/resources/application-prod.yml @@ -5,7 +5,7 @@ logging: config: classpath:logback-spring.xml # 鏃ュ織瀛樺偍璺緞+++++++++++++++++++++++++++杩愮淮闇�瑕侀厤缃�+++++++++++++++++++++++++++ - file-location: /javaWork/center-lims/img + file-location: /javaWork/center-lims/log # 鏁版嵁搴撳浠借矾寰� backup: @@ -19,10 +19,14 @@ # 鐓х墖璺緞+++++++++++++++++++++++++++杩愮淮闇�瑕侀厤缃�+++++++++++++++++++++++++++ file: path: /javaWork/center-lims/img + allowed: png,jpg,jpeg,gif + +wordUrl: /javaWork/center-lims/word +twoCode: /javaWork/center-lims/two_code mybatis-plus: configuration: - log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl # 鍏抽棴mybatis-plus鏃ュ織 + log-impl: #org.apache.ibatis.logging.nologging.NoLoggingImpl # 鍏抽棴mybatis-plus鏃ュ織 # 鏁版嵁婧愰厤缃� spring: -- Gitblit v1.9.3