| | |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | insOrderService.export(costStatisticsDto,response); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate issueTime; |
| | | |
| | | @ApiModelProperty("判定规则:不考虑不确定度/考虑不确定度(%)") |
| | | private String rule; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | private String equipName; |
| | | |
| | | private String beforeCheck; |
| | | |
| | | private String afterCheck; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | |
| | | if (BeanUtil.isEmpty(order.getInsTime())) { |
| | | insOrder.setInsTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(insOrder); |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, id).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, LocalDateTime.now()).set(InsOrderState::getInsState, 1)); |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, id) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsTime, LocalDateTime.now()) |
| | | .set(InsOrderState::getInsState, 1)); |
| | | } |
| | | Map<String, Object> map = insOrderService.getInsOrderAndSample(id, laboratory); |
| | | List<SampleProductDto> list = JSON.parseArray(JSON.toJSONString(map.get("sampleProduct")), SampleProductDto.class); |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | insProduct.setLastValue("");//'' |
| | | } |
| | | //试验前样品检查 |
| | | try { |
| | | JSONObject resValue = JSON.parseObject(JSON.toJSONString(jo.get("beforeCheck"))); |
| | | if (resValue.get("v") != null) { |
| | | Object o = JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v"); |
| | | result.setBeforeCheck(o.equals("") ? null : (o.toString())); |
| | | } |
| | | } catch (Exception e) { |
| | | result.setBeforeCheck("");//'' |
| | | } |
| | | //试验后样品检查 |
| | | try { |
| | | JSONObject resValue = JSON.parseObject(JSON.toJSONString(jo.get("afterCheck"))); |
| | | if (resValue.get("v") != null) { |
| | | Object o = JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v"); |
| | | result.setAfterCheck(o.equals("") ? null : (o.toString())); |
| | | } |
| | | } catch (Exception e) { |
| | | result.setAfterCheck("");//'' |
| | | } |
| | | //设备编号 |
| | | if (jo.get("equipValue") != null) { |
| | |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsTime, now) |
| | | .set(InsOrderState::getInsState, 6) |
| | | .set(InsOrderState::getVerifyTell, tell) |
| | | .set(InsOrderState::getVerifyUser, userId)); |
| | |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsTime, now) |
| | | .set(InsOrderState::getInsState, 5) |
| | | .set(InsOrderState::getVerifyTell, tell) |
| | | .set(InsOrderState::getVerifyUser, userId)); |
| | |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsTime, LocalDateTime.now()) |
| | | .set(InsOrderState::getInsState, 3) |
| | | .set(InsOrderState::getVerifyUser, verifyUser)); |
| | | /*这个情况先关闭----如果是C类订单且是下发到质量部,则直接复核通过(结束试验)*/ |
| | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSample insSample) { |
| | | String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】 |
| | | String[] models1 = insSample.getModel().split(";(?=[^;]*$)");//拆分最后一个【-】 |
| | | List<Integer> ids = Arrays.stream(insSample.getStandardMethodListId().split(",")) |
| | | .map(String::trim).map(Integer::parseInt).collect(Collectors.toList()); |
| | | List<StandardProductList> list = standardProductListMapper.selectDetail(ids, 1, models[0]); |
| | |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | isIf = getIsIf(split[0], models[1]) && getIsIf(split[1], models[1]); |
| | | isIf = getIsIf(split[0], models1[1]) && getIsIf(split[1], models[1].split(";")[0]); |
| | | } else { |
| | | isIf = getIsIf(sections.get(i), models[1]); |
| | | if (ObjectUtils.isNotEmpty(models[1].split(";")[0])){ |
| | | isIf = getIsIf(sections.get(i), models[1].split(";")[0]); |
| | | if (!isIf) { |
| | | isIf = getIsIf(sections.get(i), models1[1]); |
| | | } |
| | | }else { |
| | | isIf = getIsIf(sections.get(i), models1[1]); |
| | | } |
| | | } |
| | | if (isIf) { |
| | | a.setSection(sections.get(i)); |
| | |
| | | private boolean getIsIf(String str, String model) { |
| | | Matcher matcher = Pattern.compile("\\d+(\\.\\d+)?").matcher(model); |
| | | String model2 = ""; |
| | | while (matcher.find()) { |
| | | if (matcher.find()) { |
| | | model2 += matcher.group(); |
| | | break; |
| | | }else { |
| | | model2=model; |
| | | } |
| | | if (str.contains("≥") || str.contains(">=")) { |
| | | String param = str.replace("≥", "").replace(">=", ""); |
| | |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 0; |
| | | } else if (str.contains("=")) { |
| | | String param = str.replace("=", ""); |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) == 0; |
| | | if (matcher.find()) { |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) == 0; |
| | | }else { |
| | | return model2.equals(param); |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | |
| | | @ValueTableShow(value = 8,name = "检验开始时间") |
| | | private String insTime; |
| | | |
| | | @ValueTableShow(value = 9,name = "检验结束时间") |
| | | private String submitTime; |
| | | |
| | | @ValueTableShow(value = 6,name = "约定时间") |
| | | private String appointed; |
| | | |
| | | @ValueTableShow(value = 7,name = "下发时间") |
| | | private String sendTime; |
| | | |
| | | @ValueTableShow(value = 8,name = "理由") |
| | | @ValueTableShow(value = 10,name = "理由") |
| | | private String verifyTell; |
| | | |
| | | |
| | |
| | | <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="rule" column="rule" jdbcType="VARCHAR"/> |
| | | <result property="otcCode" column="otc_code" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | |
| | | <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO"> |
| | | select * from(select * from( |
| | | SELECT |
| | | a.*,ios.ins_state,ios.verify_tell,verify_user,ios.id |
| | | orderStateId,ios.create_time,ios.sort,sort_time,version,ios.num-1 num1 |
| | | a.*, |
| | | ios.ins_state, |
| | | ios.verify_tell, |
| | | verify_user, |
| | | ios.id orderStateId, |
| | | ios.create_time, |
| | | (SELECT ins_time FROM ins_order_state WHERE ins_order_id = a.id AND laboratory = a.son_laboratory ORDER BY ins_time DESC LIMIT 1) AS ins_time , |
| | | iou.submit_time , |
| | | ios.sort, |
| | | sort_time, |
| | | version, |
| | | ios.num-1 num1 |
| | | FROM |
| | | ( |
| | | SELECT |
| | |
| | | userName, |
| | | checkName, |
| | | ip.son_laboratory, |
| | | io.ins_time, |
| | | io.laboratory |
| | | FROM |
| | | ins_order io |
| | |
| | | io.id |
| | | ) a |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory |
| | | LEFT JOIN ins_order_user iou ON ios.id = iou.ins_order_state_id and ios.num=iou.num |
| | | ORDER BY |
| | | ios.sort, |
| | | sort_time desc, |
| | |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="beforeCheck" column="before_check" jdbcType="VARCHAR"/> |
| | | <result property="afterCheck" column="after_check" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equip_name" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | <resultMap id="insProductResult2" type="com.yuanchu.mom.pojo.InsProductResult2"> |
| | |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | where son_laboratory = '电路试验' |
| | | and state=1 |
| | | and ins_order_id=#{insOrderId} |
| | | and state = 1 |
| | | and ins_order_id = #{insOrderId} |
| | | </select> |
| | | </mapper> |