Merge remote-tracking branch 'origin/master'
| | |
| | | @ApiModelProperty(value = "计量单位") |
| | | private String unit; |
| | | |
| | | @ValueTableShow(15) |
| | | @ValueTableShow(18) |
| | | @ApiModelProperty(value = "试验方法") |
| | | private String method; |
| | | |
| | |
| | | @ApiModelProperty(value = "字典类型") |
| | | private String dic; |
| | | |
| | | @ValueTableShow(16) |
| | | @ApiModelProperty(value = "检验项分类") |
| | | private String inspectionItemClass; |
| | | |
| | | @ValueTableShow(17) |
| | | @ApiModelProperty(value = "检验项分类EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | } |
| | | |
| | |
| | | template_id, |
| | | son_laboratory, |
| | | ask, |
| | | ask_tell |
| | | ask_tell, |
| | | inspection_item_class, |
| | | inspection_item_class_en |
| | | from structure_item_parameter |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | |
| | | |
| | | <dependencies> |
| | | <!--word转pdf--> |
| | | <!--D:\JavaWork\center-lims-after\inspect-server\src\main\resources\lib--> |
| | | <!--mvn install:install-file -Dfile=aspose-words-15.12.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=15.12.0 -Dpackaging=jar--> |
| | | <dependency> |
| | | <groupId>com.aspose</groupId> |
| | | <artifactId>aspose-words</artifactId> |
| | | <version>15.12.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/src/main/resources/lib/aspose-words-15.12.0-jdk16.jar</systemPath> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | JSONArray jsonArray = JSON.parseArray(map.get("list")+""); |
| | | List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class); |
| | | InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class); |
| | | return Result.success(insOrderService.addInsOrder(list, insOrder)); |
| | | List<List<Integer>> pairing = JSON.parseArray(map.get("pairing")+""); |
| | | return Result.success(insOrderService.addInsOrder(list, insOrder, pairing)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询订单最长预计时间") |
| | |
| | | |
| | | private List<BushingDto> bushing; |
| | | |
| | | private List<SampleProductDto> childSampleList; |
| | | |
| | | } |
| | |
| | | |
| | | int updateInspected(@Param("id") Integer id); |
| | | |
| | | List<InsProduct> selectFiberInsProduct(List<Integer> ids); |
| | | List<InsProduct> selectFiberInsProduct(List<Integer> ids, String laboratory); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 检验项分类 |
| | | */ |
| | | private String inspectionItemClassify; |
| | | @ApiModelProperty(value = "检验项分类") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "检验项分类EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | /** |
| | | * 检验项子类 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | private Integer parentId; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Integer num; |
| | | |
| | | } |
| | |
| | | private String tree; |
| | | |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty(value = "检验项分类") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "检验项分类EN") |
| | | private String inspectionItemClassEn; |
| | | } |
| | |
| | | //修改检验下单数据 |
| | | int upInsOrder(Integer orderId,Integer sampleId, String appointed, Integer userId); |
| | | |
| | | int addInsOrder(List<SampleProductDto> list, InsOrder insOrder); |
| | | int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing); |
| | | |
| | | Map<String, Object> getInsOrder(Integer id); |
| | | |
| | |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, ids).eq(InsProduct::getSonLaboratory, laboratory).eq(InsProduct::getState, 1).isNull(InsProduct::getInsResult).isNull(InsProduct::getInsFiberId).isNull(InsProduct::getInsFibersId)); |
| | | insProducts.addAll(insProductMapper.selectFiberInsProduct(ids)); |
| | | insProducts.addAll(insProductMapper.selectFiberInsProduct(ids, laboratory)); |
| | | if (insProducts.size() > 0) { |
| | | String str = ""; |
| | | int count = 0; |
| | |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder) { |
| | | public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing) { |
| | | insOrder.setState(0); |
| | | String code = customMapper.selectById(insOrder.getCompanyId()).getCode2(); |
| | | insOrder.setEntrustCode(giveCode.giveCode("JCZX-" + code + "-", "ins_order", "-", "yyyyMMdd")); |
| | | insOrderMapper.insert(insOrder); |
| | | AtomicInteger count = new AtomicInteger(); |
| | | list.forEach(a -> { |
| | | count.getAndIncrement(); |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | if (StrUtil.isEmpty(a.getSampleCode())) { |
| | | a.setSampleCode(giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | a.setSampleCode(giveCode.giveCode("", "ins_sample", "", "yyMMdd")+"-"+count.get()); |
| | | } |
| | | insSampleMapper.insert(a); |
| | | if (ObjectUtil.isNotEmpty(a.getInsProduct())) { |
| | | addInsProductMethod(a.getId(), a.getInsProduct(), null, 0); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(a.getChildSampleList())){ |
| | | for (SampleProductDto b : a.getChildSampleList()) { |
| | | for (int i = 0; i < b.getNum(); i++) { |
| | | b.setId(null); |
| | | b.setInsOrderId(insOrder.getId()); |
| | | b.setParentId(a.getId()); |
| | | if (StrUtil.isEmpty(b.getSampleCode())) { |
| | | b.setSampleCode(giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | } |
| | | insSampleMapper.insert(b); |
| | | if (ObjectUtil.isNotEmpty(b.getInsProduct())) { |
| | | addInsProductMethod(b.getId(), b.getInsProduct(), null, 0); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (ObjectUtil.isNotEmpty(a.getBushing())) { |
| | | for (BushingDto bushingDto : a.getBushing()) { |
| | |
| | | } |
| | | } |
| | | }); |
| | | for (List<Integer> i : pairing) { |
| | | SampleProductDto sample = JSON.parseObject(JSON.toJSONString(list.get(i.get(0))), SampleProductDto.class); |
| | | sample.setSampleCode(list.get(i.get(0)-1).getSampleCode() + "/" +list.get(i.get(1)-1).getSampleCode()); |
| | | sample.setId(null); |
| | | insSampleMapper.insert(sample); |
| | | InsProduct insProduct = sample.getInsProduct().stream().filter(a -> Objects.equals(a.getInspectionItem(), "熔接损耗")).findFirst().get(); |
| | | insProduct.setId(null); |
| | | insProduct.setInsSampleId(sample.getId()); |
| | | insProductMapper.insert(insProduct); |
| | | } |
| | | return insOrder.getId(); |
| | | } |
| | | |
| | | private void addInsProductMethod(Integer sampleId, List<InsProduct> productList, Integer id, Integer type) { |
| | | for (InsProduct product : productList) { |
| | | if(product.getState()==1){ |
| | | if(product.getState()==1 && !product.getInspectionItem().equals("熔接损耗")){ |
| | | switch (type){ |
| | | case 1: |
| | | product.setInsFibersId(id); |
| | |
| | | try { |
| | | //凭证 不然切换后有水印 |
| | | // InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml"); |
| | | /*String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("找不到模板文件"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | }*/ |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | |
| | | <select id="selectFibersByBushingId" resultMap="FibersDto"> |
| | | select |
| | | fs.id, fs.code, fs.model, fs.standard, fs.num, fs.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_classify, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fibers fs |
| | | left join ins_product p on p.ins_fibers_id = fs.id |
| | |
| | | |
| | | <select id="selectFiberByBushingId" resultMap="FiberDto"> |
| | | select f.id, f.bush_color, f.color, f.model, f.standard, f.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_classify, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fiber f |
| | | left join ins_product p on p.ins_fiber_id = f.id |
| | |
| | | |
| | | <select id="selectFiberByFibersId" resultMap="FiberDto"> |
| | | select f.id, f.bush_color, f.color, f.model, f.standard, f.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_classify, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fiber f |
| | | left join ins_product p on p.ins_fiber_id = f.id |
| | |
| | | <resultMap id="product" type="com.yuanchu.mom.pojo.InsProduct"> |
| | | <id property="id" column="pid" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | |
| | | where state = 1 |
| | | and (ins_fibers_id is not null or ins_fiber_id is not null) |
| | | and ins_result is null |
| | | and son_laboratory = #{laboratory} |
| | | and ins_sample_id in |
| | | <foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
| | | <foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_classify, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | |
| | | <id property="id" column="ip_id" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemEn" column="inspection_item_en" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclassEn" column="inspection_item_subclass_en" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClass" column="inspection_item_class" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassEn" column="inspection_item_class_en" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="ip_factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="ip_laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="ip_sample_type" jdbcType="VARCHAR"/> |
| | |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | method, |
| | | son_laboratory, |
| | | unit, |
| | |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | method, |
| | | son_laboratory, |
| | | unit, |
| | |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | method, |
| | | son_laboratory, |
| | | unit, |