| | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectDeviceParameter(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, Device itemParameter) { |
| | | public Map<String, Object> selectDeviceParameter(Page page, Device itemParameter) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(Device.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/insOrder") |
| | | public class InsOrderController { |
| | | |
| | | private InsOrderService insOrderService; |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
å表") |
| | | @PostMapping("/selectInsOrderParameter") |
| | | public Result selectInsOrderParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | | System.out.println(1); |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InsOrder itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrder.class); |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, itemParameter)); |
| | | } |
| | | } |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.dto.OrderThingDto; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-08 09:44:13 |
| | | * @Entity com.yuanchu.mom.pojo.InsOrder |
| | | */ |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-12 16:17:55 |
| | | * @Entity com.yuanchu.mom.pojo.InsOrder |
| | | */ |
| | | public interface InsOrderMapper extends BaseMapper<InsOrder> { |
| | | |
| | | List<OrderThingDto> getOrderThing(); |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | IPage<InsOrder> selectInsOrderParameter(IPage<InsOrder> page, QueryWrapper<InsOrder> ew); |
| | | } |
| | | |
| | | |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ£éªä¸å |
| | |
| | | */ |
| | | @TableName(value ="ins_order") |
| | | @Data |
| | | public class InsOrder implements Serializable { |
| | | public class InsOrder extends OrderBy implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @ValueTableShow(1) |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | /** |
| | | * æ ·åç¼ç |
| | | */ |
| | | @ValueTableShow(2) |
| | | @ApiModelProperty(value = "æ ·åç¼ç ") |
| | | private String sampleCode; |
| | | |
| | | /** |
| | | * ä¸åå®¢æ· |
| | | */ |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty(value = "ä¸å客æ·") |
| | | private String custom; |
| | | |
| | | /** |
| | | * ä¸ååä½ |
| | | */ |
| | | @ValueTableShow(4) |
| | | @ApiModelProperty(value = "ä¸ååä½") |
| | | private String company; |
| | | |
| | | /** |
| | | * å·¥åå |
| | | */ |
| | | @ValueTableShow(5) |
| | | @ApiModelProperty(value = "å·¥åå") |
| | | private String code; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ |
| | | */ |
| | | @ValueTableShow(6) |
| | | @ApiModelProperty(value = "ç´§æ¥ç¨åº¦") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * çº¦å®æ¶é´ |
| | | */ |
| | | @ValueTableShow(7) |
| | | @ApiModelProperty(value = "çº¦å®æ¶é´") |
| | | private Date appointedTime; |
| | | |
| | | /** |
| | | * å®éªå®¤åç§° |
| | | */ |
| | | @ValueTableShow(8) |
| | | @ApiModelProperty(value = "å®éªå®¤åç§°") |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ ·åç±»å |
| | | */ |
| | | @ValueTableShow(9) |
| | | @ApiModelProperty(value = "æ ·åç±»å") |
| | | private String smapleType; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @ValueTableShow(10) |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | /** |
| | | * æ ·ååç§° |
| | | */ |
| | | @ValueTableShow(11) |
| | | @ApiModelProperty(value = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | /** |
| | | * æ ·åæ°é |
| | | */ |
| | | @ValueTableShow(12) |
| | | @ApiModelProperty(value = "æ ·åæ°é") |
| | | private Double sampleNum; |
| | | |
| | | /** |
| | | * æ¯å¦çæ · |
| | | */ |
| | | @ValueTableShow(13) |
| | | @ApiModelProperty(value = "æ¯å¦çæ ·") |
| | | private Integer isLeave; |
| | | |
| | | /** |
| | | * çæ ·æ°é |
| | | */ |
| | | @ValueTableShow(14) |
| | | @ApiModelProperty(value = "çæ ·æ°é") |
| | | private Integer leaveNum; |
| | | |
| | | /** |
| | | * æ£æµè¿åº¦ |
| | | |
| | | */ |
| | | @ValueTableShow(15) |
| | | @ApiModelProperty(value = "æ£æµè¿åº¦") |
| | | private String insProgress; |
| | | |
| | | /** |
| | | * æ£æµç»æ |
| | | |
| | | */ |
| | | private String insResult; |
| | | |
| | | /** |
| | | * 1ï¼æ£éªå¤ç 0ï¼å¾
å®¡æ ¸ 2ï¼éå 3ï¼æ¤é |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * OTC订åå· |
| | | */ |
| | | private String otcCode; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.OrderThingDto; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-08 09:44:13 |
| | | */ |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | public interface InsOrderService extends IService<InsOrder> { |
| | | |
| | | List<OrderThingDto> getOrderThing(); |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | Map<String, Object> selectInsOrderParameter(IPage<InsOrder> page, InsOrder itemParameter); |
| | | |
| | | } |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.OrderThingDto; |
| | | import com.yuanchu.mom.mapper.InsOrderMapper; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.mapper.InsOrderMapper; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-08 09:44:13 |
| | | */ |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsOrderServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> |
| | | implements InsOrderService{ |
| | | implements InsOrderService { |
| | | |
| | | private GetLook getLook; |
| | | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | |
| | | public List<OrderThingDto> getOrderThing() { |
| | | return insOrderMapper.getOrderThing(); |
| | | } |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @Override |
| | | public Map<String, Object> selectInsOrderParameter(IPage<InsOrder> page, InsOrder itemParameter) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(InsOrder.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId")); |
| | | map.put("body", insOrderMapper.selectPage(page, QueryWrappers.queryWrappers(itemParameter))); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | <mapper namespace="com.yuanchu.mom.mapper.InsOrderMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsOrder"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="appointedTime" column="appointed_time" jdbcType="TIMESTAMP"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="smapleType" column="smaple_type" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="sampleNum" column="sample_num" jdbcType="INTEGER"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> |
| | | <result property="leaveNum" column="leave_num" jdbcType="INTEGER"/> |
| | | <result property="insProgress" column="ins_progress" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ins_result" jdbcType="VARCHAR"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="appointedTime" column="appointed_time" jdbcType="TIMESTAMP"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="smapleType" column="smaple_type" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="sampleNum" column="sample_num" jdbcType="DOUBLE"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> |
| | | <result property="leaveNum" column="leave_num" jdbcType="INTEGER"/> |
| | | <result property="insProgress" column="ins_progress" jdbcType="VARCHAR"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" 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"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,entrust_code,sample_code, |
| | | custom,company,type, |
| | | appointed_time,laboratory,smaple_type, |
| | | model,sample,sample_num, |
| | | is_leave,leave_num,ins_progress, |
| | | ins_result,state,create_user, |
| | | create_time,update_user,update_time |
| | | custom,company,code, |
| | | type,appointed_time,laboratory, |
| | | smaple_type,model,sample, |
| | | sample_num,is_leave,leave_num, |
| | | ins_progress,state,remark, |
| | | otc_code,create_user,create_time, |
| | | update_user,update_time |
| | | </sql> |
| | | |
| | | <resultMap id="OrderThingDto" type="com.yuanchu.mom.dto.OrderThingDto"> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="getOrderThing" resultMap="OrderThingDto"> |
| | | select * from ins_order io |
| | | left join ins_product ip on ip.ins_order_id = io.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | select * |
| | | from ins_order io |
| | | left join ins_product ip on ip.ins_order_id = io.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | </select> |
| | | |
| | | <select id="selectInsOrderParameter" resultType="com.yuanchu.mom.pojo.InsOrder"> |
| | | select * |
| | | from ( |
| | | select |
| | | id, |
| | | entrust_code, |
| | | sample_code, |
| | | custom, |
| | | company, |
| | | code, |
| | | type, |
| | | appointed_time, |
| | | laboratory, |
| | | smaple_type, |
| | | model, |
| | | sample, |
| | | sample_num, |
| | | is_leave, |
| | | leave_num, |
| | | ins_progress, |
| | | state, |
| | | remark, |
| | | otc_code, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time |
| | | from ins_order |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.yuanchu.mom.mapper.StandardTreeMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.StandardTree"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="FactoryDto" type="com.yuanchu.mom.dto.FactoryDto"> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectStandardTreeList" resultMap="FactoryDto"> |
| | | select factory, laboratory, sample_type, sample, model |
| | | from standard_tree |
| | | select factory,laboratory,sample_type,sample,model from standard_tree |
| | | </select> |
| | | |
| | | <select id="selectStandardProductById" resultType="com.yuanchu.mom.pojo.StandardProductList"> |
| | | select inspection_item, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm |
| | | select |
| | | inspection_item, |
| | | inspection_item_classify, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm |
| | | from structure_item_parameter |
| | | where id = #{id} |
| | | </select> |
| | |
| | | |
| | | |
| | | |
| | | public class TestClass { |
| | | |
| | | } |