| | |
| | | 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} |
| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | * 检验任务-业务实现层 |
| | | */ |
| | | @Service |
| | | //@AllArgsConstructor |
| | | public class InsOrderPlanServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> implements InsOrderPlanService { |
| | | |
| | | @Resource |
| | |
| | | |
| | | @Value("${twoCode}") |
| | | private String twoCode; |
| | | |
| | | @Resource |
| | | private GiveCode giveCode; |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | |
| | | } |
| | | 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"); |
| | |
| | | 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; |
| | |
| | | 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"; |
| | |
| | | map.put("standardMethodList", null); |
| | | return map; |
| | | } |
| | | |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodListsByNull(str)); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | return map; |
| | | } |
| | |
| | | && 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()); |
| | |
| | | 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, |
| | |
| | | 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> |