From eb1a57285bb3468a4efe051781b8cc7a13ec23c6 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期二, 14 五月 2024 14:15:06 +0800 Subject: [PATCH] 部分调整 --- inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java | 2 +- inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java | 2 +- inspect-server/src/main/resources/static/report-template.docx | 0 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 9 +++------ inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml | 25 +++++++++++++------------ framework/src/main/java/com/yuanchu/mom/common/GetLook.java | 8 +++++++- cnas-server/src/main/resources/mapper/StandardMethodMapper.xml | 1 + inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java | 2 ++ 8 files changed, 28 insertions(+), 21 deletions(-) diff --git a/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml b/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml index df2e6af..87ac14b 100644 --- a/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml +++ b/cnas-server/src/main/resources/mapper/StandardMethodMapper.xml @@ -36,6 +36,7 @@ left join user u1 on sm.create_user = u1.id left join user u2 on sm.update_user = u2.id left join structure_test_object sto on sm.structure_test_object_id = sto.id + where sm.code != '濮旀墭瑕佹眰' ) a <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} diff --git a/framework/src/main/java/com/yuanchu/mom/common/GetLook.java b/framework/src/main/java/com/yuanchu/mom/common/GetLook.java index 9920bd0..0f70017 100644 --- a/framework/src/main/java/com/yuanchu/mom/common/GetLook.java +++ b/framework/src/main/java/com/yuanchu/mom/common/GetLook.java @@ -1,6 +1,7 @@ package com.yuanchu.mom.common; import cn.hutool.json.JSONUtil; +import com.yuanchu.mom.exception.ErrorException; import com.yuanchu.mom.mapper.AuthMapper; import com.yuanchu.mom.utils.Jwt; import com.yuanchu.mom.utils.ServletUtils; @@ -17,7 +18,12 @@ private AuthMapper authMapper; public Map<String, Integer> selectPowerByMethodAndUserId(String method){ - Integer id = Integer.parseInt(JSONUtil.parseObj(new Jwt().readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id")+""); + Integer id; + try { + id = Integer.parseInt(JSONUtil.parseObj(new Jwt().readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id")+""); + }catch (NumberFormatException e){ + throw new ErrorException("鎺堟潈宸茶繃鏈熻閲嶆柊鐧婚檰"); + } Map<String, Integer> map = new HashMap<>(); map.put("userId", id); map.put("look", authMapper.countPower(id, method)); diff --git a/inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java b/inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java index 3f94d89..e9d4f44 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/mapper/StandardMethodListMapper.java @@ -21,6 +21,8 @@ List<StandardMethodList> selectStandardMethodLists(String tree); + List<StandardMethodList> selectStandardMethodListsByNull(String tree); + List<StandardMethodList> selectStandardMethodLists3(String tree); List<StandardMethodList> selectStandardMethodLists2(String data1,String data2,String data3,String data4, String data5); 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 84b4fc7..cb1ce57 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 @@ -30,7 +30,6 @@ import com.yuanchu.mom.service.InsOrderPlanService; import com.yuanchu.mom.service.InsOrderService; import com.yuanchu.mom.service.StandardTemplateService; -import com.yuanchu.mom.utils.GiveCode; import com.yuanchu.mom.utils.JackSonUtil; import com.yuanchu.mom.utils.MatrixToImageWriter; import com.yuanchu.mom.utils.QueryWrappers; @@ -57,7 +56,6 @@ * 妫�楠屼换鍔�-涓氬姟瀹炵幇灞� */ @Service -//@AllArgsConstructor public class InsOrderPlanServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> implements InsOrderPlanService { @Resource @@ -82,9 +80,6 @@ @Value("${twoCode}") private String twoCode; - - @Resource - private GiveCode giveCode; @Resource private InsReportMapper insReportMapper; @@ -526,7 +521,6 @@ } TableRenderData tableRenderData = new TableRenderData(); tableRenderData.setRows(rows); - System.out.println(rows.size()); TableStyle tableStyle = new TableStyle(); tableStyle.setColWidths(new int[]{650,1600,2000,750,2800,1100,1100}); tableStyle.setWidth("10000"); @@ -589,6 +583,7 @@ String finalModelStr = modelStr; String sampleEn = insSampleMapper.getSampleEn(insOrder.getSample()); String orderType = insOrderMapper.getEnumLabelByValue(insOrder.getOrderType()); + String formType = insOrderMapper.getEnumLabelByValue(insOrder.getFormType()); ConfigureBuilder builder = Configure.builder(); builder.useSpringEL(true); List<Map<String, String>> finalDeviceList = deviceList; @@ -626,6 +621,8 @@ put("getTimeEn", monthNames[insOrder.getExamineTime().getMonthValue() - 1] + " " + insOrder.getExamineTime().getDayOfMonth() + ", " + insOrder.getExamineTime().getYear()); put("seal1", null); put("seal2", null); + put("formTypeCh", formType); + put("formTypeEn", insOrder.getFormType()); }}); try { String name = insReport.getCode().replace("/", "") + ".docx"; diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java index 1e4de45..ff4d0bc 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java @@ -98,7 +98,7 @@ map.put("standardMethodList", null); return map; } - + standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodListsByNull(str)); map.put("standardMethodList", standardMethodLists); return map; } diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java index 270825e..d75719a 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java @@ -130,7 +130,7 @@ && Objects.equals(sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass()) && Objects.equals(sp.getModel(), pl.getModel())) { pl.setId(sp.getId()); - pl.setState(sp.getState()); + pl.setState(id==0?1:sp.getState()); pl.setMethodS(sp.getMethodS()); if(sp.getAsk()!=null&&!sp.getAsk().equals("")){ pl.setAsk(sp.getAsk()); diff --git a/inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml b/inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml index 4c9c61f..721b82c 100644 --- a/inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml +++ b/inspect-server/src/main/resources/mapper/StandardMethodListMapper.xml @@ -30,12 +30,7 @@ from standard_method where is_use = 1 and is_product = 1 - and ( - structure_test_object_id is null - OR structure_test_object_id = '' - OR structure_test_object_id = '[]' - or structure_test_object_id LIKE CONCAT('%[', #{tree}, ']%') - ) + and structure_test_object_id LIKE CONCAT('%[', #{tree}, ']%') </select> <select id="selectParameterList" resultType="standardProductList"> select inspection_item, @@ -80,16 +75,22 @@ from standard_method where is_use = 1 and is_product = 1 - and ( - structure_test_object_id is null - OR structure_test_object_id = '' - OR structure_test_object_id = '[]' - or structure_test_object_id LIKE CONCAT('%', #{tree}, '%') - ) + and structure_test_object_id LIKE CONCAT('%', #{tree}, '%') </select> <select id="selectListEnum" resultType="com.yuanchu.mom.pojo.StandardMethodList"> select id,code,name from standard_method where is_product = 1 and is_use = 1 </select> + <select id="selectStandardMethodListsByNull" resultType="com.yuanchu.mom.pojo.StandardMethodList"> + select id, code, name, remark + from standard_method + where is_use = 1 + and is_product = 1 + and ( + structure_test_object_id is null + OR structure_test_object_id = '' + OR structure_test_object_id = '[]' + ) + </select> </mapper> diff --git a/inspect-server/src/main/resources/static/report-template.docx b/inspect-server/src/main/resources/static/report-template.docx index 51a2237..4550e8e 100644 --- a/inspect-server/src/main/resources/static/report-template.docx +++ b/inspect-server/src/main/resources/static/report-template.docx Binary files differ -- Gitblit v1.9.3