| | |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public Result selectDevicePrincipal() { |
| | | return Result.success(deviceService.selectDevicePrincipal()); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿è®¾å¤åç±»è·å设å¤å表") |
| | | @PostMapping("/selectDeviceByCategory") |
| | | @ValueAuth |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "category", value = "设å¤åç±»"), |
| | | }) |
| | | public Result selectDeviceByCategory(String category) { |
| | | return Result.success(deviceService.selectDeviceByCategory(category)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | @ValueTableShow(6) |
| | | @ApiModelProperty(value = "设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | private Integer deviceStatus; |
| | | |
| | | @ValueTableShow(19) |
| | | @ApiModelProperty(value = "åæ¾ç¹") |
| | |
| | | @ApiModelProperty(value = "设å¤ç»") |
| | | private String deviceGroup; |
| | | |
| | | @ValueTableShow(11) |
| | | @ApiModelProperty(value = "æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | |
| | | |
| | | List<Device> selectDevicePrincipal(); |
| | | |
| | | List<Device> selectDeviceByCategory(String category); |
| | | |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | |
| | | public List<Device> selectDevicePrincipal() { |
| | | return deviceMapper.selectDevicePrincipal(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDeviceByCategory(String category) { |
| | | return deviceMapper.selectList(Wrappers.<Device>lambdaQuery().eq(Device::getLargeCategory, category).eq(Device::getDeviceStatus, 0)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | Integer userId = null; |
| | | try { |
| | | userId = Integer.parseInt(JSONUtil.parseObj(jwt.readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id") + ""); |
| | | }catch (Exception ignored){} |
| | | this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now()); // èµ·å§çæ¬ 3.3.0(æ¨è使ç¨) |
| | | this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); // èµ·å§çæ¬ 3.3.0(æ¨è使ç¨) |
| | | this.strictInsertFill(metaObject, "createUser", Integer.class, Integer.parseInt(JSONUtil.parseObj(jwt.readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id") + "")); |
| | | this.strictInsertFill(metaObject, "updateUser", Integer.class, Integer.parseInt(JSONUtil.parseObj(jwt.readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id") + "")); |
| | | this.strictInsertFill(metaObject, "createUser", Integer.class, userId); |
| | | this.strictInsertFill(metaObject, "updateUser", Integer.class, userId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | Integer userId = null; |
| | | try { |
| | | userId = Integer.parseInt(JSONUtil.parseObj(jwt.readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id") + ""); |
| | | }catch (Exception ignored){} |
| | | // updateçæ¶å使ç¨ï¼æ´æ°çæ¶å强å¶è¿è¡å¡«å
|
| | | this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); // èµ·å§çæ¬ 3.3.0(æ¨è) |
| | | this.strictUpdateFill(metaObject, "updateUser", Integer.class, Integer.parseInt(JSONUtil.parseObj(jwt.readJWT(ServletUtils.getRequest().getHeader("token")).get("data")).get("id") + "")); |
| | | this.strictUpdateFill(metaObject, "updateUser", Integer.class, userId); |
| | | } |
| | | } |
| | |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto2; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.pojo.InsOrderTemplate; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | |
| | | return Result.success(insOrderTemplateService.delInsOrderTemplate(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªåæ¥è¯¢æ£éªæ°æ®ï¼æ°æ®æ¥çï¼") |
| | | @PostMapping("/selectSampleAndProductByOrderId") |
| | | @ValueAuth |
| | | public Result<?> selectSampleAndProductByOrderId(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | SampleProductDto2 sampleProductDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleProductDto2.class); |
| | | return Result.success(insOrderService.selectSampleAndProductByOrderId(page, sampleProductDto)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.service.InsOrderPlanService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory); |
| | | return num==1?Result.success():Result.fail("æäº¤å¤±è´¥ï¼é¨å项ç®è¿æªè¿è¡æ£éª"); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿åæ£éªå
容") |
| | | @PostMapping("/saveInsContext") |
| | | @ValueAuth |
| | | public Result<?> saveInsContext(@RequestBody Map<String, Object> param){ |
| | | insOrderPlanService.saveInsContext(param); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class SampleProductDto2 extends OrderBy implements Serializable { |
| | | |
| | | private Integer id; |
| | | |
| | | @ValueTableShow(name = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ValueTableShow(value = 2, name = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ValueTableShow(value = 4, name = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ValueTableShow(value = 5, name = "æ ·åç¶æ") |
| | | private Integer insState; |
| | | |
| | | @ValueTableShow(value = 15, name = "åä½") |
| | | private String unit; |
| | | |
| | | @ValueTableShow(value = 7, name = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ValueTableShow(value = 8, name = "æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ValueTableShow(value = 17, name = "å®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | private String inspectionItemType; |
| | | |
| | | @ValueTableShow(value = 11, name = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | @ValueTableShow(value = 12, name = "è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @ValueTableShow(value = 13, name = "æç»å¼") |
| | | private String lastValue; |
| | | |
| | | @ValueTableShow(value = 14, name = "æ¯å¦åæ ¼") |
| | | private Integer insResult; |
| | | |
| | | @ValueTableShow(value = 16, name = "设å¤") |
| | | private String equipValue; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto2; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | String getLaboratoryCode(String name); |
| | | |
| | | IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, QueryWrapper<SampleProductDto2> ew); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product_resultãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-08 09:45:20 |
| | | * @description é对表ãins_product_result(æ£éªé¡¹ç®çç»æ)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-28 10:29:37 |
| | | * @Entity com.yuanchu.mom.pojo.InsProductResult |
| | | */ |
| | | public interface InsProductResultMapper extends BaseMapper<InsProductResult> { |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private Map<String, Object> style; |
| | | |
| | | @TableField(exist = false) |
| | | private InsProductResult insProductResult; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * æ£éªé¡¹ç®çç»æ |
| | | * @TableName ins_product_result |
| | | */ |
| | | @TableName(value ="ins_product_result") |
| | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | |
| | | private String insValue; |
| | | |
| | | /** |
| | | * 1ï¼åæ ¼ 0ï¼ä¸åæ ¼ |
| | | * 计ç®å¼ |
| | | */ |
| | | private Integer insResult; |
| | | private String comValue; |
| | | |
| | | /** |
| | | * æç»å¼ |
| | | * 设å¤å¼ |
| | | */ |
| | | private String lastValue; |
| | | private String equipValue; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | |
| | | boolean claimInsOrderPlan(InsOrderPlanDTO entity); |
| | | |
| | | void saveInsContext(Map<String, Object> insContext); |
| | | |
| | | Map<String, Object> doInsOrder(Integer id, String laboratory); |
| | | |
| | | int upPlanUser(Integer userId, Integer orderId); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.InsOderDto; |
| | | import com.yuanchu.mom.dto.OrderThingDto; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | Map<String, Object> getInsOrderAndSample(Integer id, String laboratory); |
| | | |
| | | Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.yuanchu.mom.pojo.InsProductResult; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product_result(æ£éªé¡¹ç®çç»æ)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-28 10:29:37 |
| | | */ |
| | | public interface InsProductResultService extends IService<InsProductResult> { |
| | | |
| | | } |
| | |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.service.InsOrderPlanService; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.service.StandardTemplateService; |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-ä¸å¡å®ç°å± |
| | |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | | |
| | | private InsProductResultMapper insProductResultMapper; |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | |
| | | } |
| | | } |
| | | if (tableData.size() > 0) { |
| | | if (Integer.parseInt(o.get("r") + "") == r + 1 || Integer.parseInt(o.get("r") + "") == r) { |
| | | if ((Integer.parseInt(o.get("r") + "") == r + 1 || Integer.parseInt(o.get("r") + "") == r) && !(o.get("v") + "").equals("{\"ht\":\"0\"}")) { |
| | | r = Integer.parseInt(o.get("r") + ""); |
| | | tableData.add(o); |
| | | } else { |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveInsContext(Map<String, Object> insContext) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | CompletableFuture.supplyAsync(() -> { |
| | | AtomicInteger count = new AtomicInteger(); |
| | | insContext.forEach((k, v) -> { |
| | | JSONObject jo = JSON.parseObject(JSON.toJSONString(v)); |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setId(Integer.parseInt(k)); |
| | | InsProductResult result = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | if (BeanUtil.isEmpty(result)) { |
| | | result = new InsProductResult(); |
| | | } |
| | | result.setInsProductId(Integer.parseInt(k)); |
| | | JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(jo.get("insValue"))); |
| | | List<Map<String, Object>> iv = new ArrayList<>(); |
| | | for (Object o : jsonArray) { |
| | | JSONObject insValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v")); |
| | | if (insValue.get("u") == null && StrUtil.isNotEmpty(JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v").toString())) { |
| | | map.put("u", userId); |
| | | }else { |
| | | map.put("u", insValue.get("u")); |
| | | } |
| | | iv.add(map); |
| | | } |
| | | result.setInsValue(JSON.toJSONString(iv)); |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("comValue"))); |
| | | List<Map<String, Object>> cv = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject comValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(comValue.get("v"))).get("v")); |
| | | cv.add(map); |
| | | } |
| | | result.setComValue(JSON.toJSONString(cv)); |
| | | JSONObject resValue = JSON.parseObject(JSON.toJSONString(jo.get("resValue"))); |
| | | insProduct.setLastValue(JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v") + ""); |
| | | JSONObject equipValue = JSON.parseObject(JSON.toJSONString(jo.get("equipValue"))); |
| | | try { |
| | | result.setEquipValue(JSON.parseObject(JSON.toJSONString(equipValue.get("v"))).get("v") + ""); |
| | | }catch (Exception ignored){ |
| | | result.setEquipValue(null); |
| | | } |
| | | JSONObject insResult = JSON.parseObject(JSON.toJSONString(jo.get("insResult"))); |
| | | insProduct.setInsResult(Integer.parseInt(JSON.parseObject(JSON.toJSONString(insResult.get("v"))).get("v") + "")); |
| | | if (BeanUtil.isEmpty(result.getId())) { |
| | | result.setCreateUser(userId); |
| | | result.setUpdateUser(userId); |
| | | insProductResultMapper.insert(result); |
| | | } else { |
| | | result.setUpdateUser(userId); |
| | | result.setUpdateTime(LocalDateTime.now()); |
| | | insProductResultMapper.updateById(result); |
| | | } |
| | | insProduct.setUpdateUser(userId); |
| | | insProductMapper.updateById(insProduct); |
| | | if(count.get() == 0){ |
| | | InsSample insSample = insSampleMapper.selectById(insProductMapper.selectById(insProduct.getId()).getInsSampleId()); |
| | | insSample.setInsState(1); |
| | | count.addAndGet(1); |
| | | } |
| | | }); |
| | | return null; |
| | | }).thenAccept(res -> { |
| | | }).exceptionally(e -> { |
| | | e.printStackTrace(); |
| | | return null; |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public int upPlanUser(Integer userId, Integer orderId) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setUserId(userId); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.InsOderDto; |
| | | import com.yuanchu.mom.dto.OrderThingDto; |
| | | import com.yuanchu.mom.dto.SampleOrderDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | |
| | | map.put("sampleProduct", list); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(SampleProductDto2.class)); |
| | | map.put("body", insOrderMapper.selectSampleAndProductByOrderId(page, QueryWrappers.queryWrappers(sampleProductDto))); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.pojo.InsProductResult; |
| | | import com.yuanchu.mom.service.InsProductResultService; |
| | | import com.yuanchu.mom.mapper.InsProductResultMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product_result(æ£éªé¡¹ç®çç»æ)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-28 10:29:37 |
| | | */ |
| | | @Service |
| | | public class InsProductResultServiceImpl extends ServiceImpl<InsProductResultMapper, InsProductResult> |
| | | implements InsProductResultService{ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_sample isa ON io.id = isa.ins_order_id |
| | | LEFT JOIN ( SELECT id, ins_order_id, is_ratify FROM ins_report WHERE is_ratify = 1 ) ir ON io.id = ir.ins_order_id |
| | | LEFT JOIN ( SELECT id, ins_order_id, is_ratify FROM ins_report WHERE is_ratify = 1 ) ir ON io.id = |
| | | ir.ins_order_id |
| | | GROUP BY |
| | | io.id |
| | | ) a |
| | |
| | | </if> |
| | | </select> |
| | | <select id="getLaboratoryCode" resultType="java.lang.String"> |
| | | select laboratory_number from laboratory |
| | | select laboratory_number |
| | | from laboratory |
| | | where laboratory_name = #{name} |
| | | </select> |
| | | <select id="selectSampleAndProductByOrderId" resultType="com.yuanchu.mom.dto.SampleProductDto2"> |
| | | select * |
| | | from ( |
| | | select i.id,isa.sample_code,isa.sample,isa.model,ip.state,ip.unit,ip.inspection_item,ip.inspection_item_subclass, |
| | | ip.son_laboratory,ip.inspection_item_type,ip.inspection_value_type,ip.ask,ip.`last_value`,ip.ins_result,ipr.equip_value |
| | | from ins_sample isa |
| | | left join ins_order i on isa.ins_order_id = i.id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ip.state = 1 |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <update id="upInsOrderParameter" parameterType="com.yuanchu.mom.pojo.InsOrder"> |
| | | UPDATE ins_order |
| | |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insProductId" column="ins_product_id" jdbcType="INTEGER"/> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,ins_product_id,ins_value, |
| | | ins_result,last_value,create_user, |
| | | update_user,create_time,update_time |
| | | </sql> |
| | | </mapper> |
| | |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and state = 1 |
| | | </select> |
| | |
| | | <result property="createTime" column="ip_create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="ip_update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="templateId" column="template_id" jdbcType="INTEGER"/> |
| | | <collection property="insProductResult" resultMap="insProductResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="insProductResult" type="com.yuanchu.mom.pojo.InsProductResult"> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | |
| | | @ValueAuth |
| | | @GetMapping("/getUserNow") |
| | | @ApiOperation(value = "è·åå½åç»å½çç¨æ·ä¿¡æ¯") |
| | | @ApiOperation(value = "è·åå½åç»å½ç客æ·ä¿¡æ¯") |
| | | public Result<?> getUserNow(){ |
| | | return Result.success(userService.getUserNow()); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @GetMapping("/getUserInfo") |
| | | @ApiOperation(value = "è·åå½åç»å½çç¨æ·ä¿¡æ¯") |
| | | public Result<?> getUserInfo(){ |
| | | return Result.success(userService.getUserInfo()); |
| | | } |
| | | } |
| | |
| | | |
| | | User getUserNow(); |
| | | |
| | | User getUserInfo(); |
| | | |
| | | } |
| | |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | return userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getId, map1.get("userId")).eq(User::getIsCustom, 1).select(User::getId,User::getCompany,User::getName,User::getCode)); |
| | | } |
| | | |
| | | @Override |
| | | public User getUserInfo() { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | return userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getId, map1.get("userId")).select(User::getId,User::getCompany,User::getName,User::getCode)); |
| | | } |
| | | } |