Merge remote-tracking branch 'origin/master'
# Conflicts:
# inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | IPage<StandardProductList> standardProductListIPage(Integer id, String tree, IPage<StandardProductList> iPage, String laboratory, String item, String items); |
| | | |
| | | StandardProductList getOne(Integer standardMethodListId, String inspectionItem, String sample, String inspectionItemSubclass, String model); |
| | | |
| | | List<StandardProductList> selectDetail(@Param("standardMethodListId") Integer standardMethodListId, @Param("state") int state, @Param("model") String model); |
| | | |
| | | List<StandardProductList> selectDetail2(@Param("standardMethodListId") Integer standardMethodListId, @Param("state") int state, @Param("tree") String tree); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | private Long companyId; |
| | | |
| | | @ValueTableShow(value = 15, name = "制单人") |
| | | private String prepareUser; |
| | | |
| | | } |
| | |
| | | } catch (Exception e) { |
| | | throw new ErrorException("找不到检验人的签名"); |
| | | } |
| | | Custom custom = customMapper.selectById(user.get("company")); |
| | | //Custom custom = customMapper.selectById(user.get("company")); |
| | | Custom custom = customMapper.selectById(insOrder.getCompanyId()); |
| | | if (!resultCh.get().equals("")) { |
| | | resultCh.set("依据委托要求," + resultCh.get().replaceFirst("、", "") + "等所检项目不符合要求,其余所检项目均符合要求。"); |
| | | resultEn.set("According to commissioned requirements," + resultEn.get().replaceFirst("、", "") + " these inspected items do not meet the requirements, all other inspected items meet the requirements."); |
| | |
| | | and model = #{model} |
| | | </if> |
| | | </select> |
| | | <select id="selectDetail" resultType="com.yuanchu.mom.pojo.StandardProductList"> |
| | | select * from standard_product_list |
| | | where standard_method_list_id = #{standardMethodListId} |
| | | and state =#{state} |
| | | and model=#{model} |
| | | order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), |
| | | man_hour_group REGEXP '^[0-9]', id asc |
| | | </select> |
| | | <select id="selectDetail2" resultType="com.yuanchu.mom.pojo.StandardProductList"> |
| | | select * from standard_product_list |
| | | where standard_method_list_id = #{standardMethodListId} |
| | | and state =#{state} |
| | | and tree=#{tree} |
| | | order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), |
| | | man_hour_group REGEXP '^[0-9]', id asc |
| | | </select> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <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"/> |
| | |
| | | or sample = '[]' |
| | | OR sample LIKE CONCAT('%[', #{tree}, ']%') |
| | | ) |
| | | order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), |
| | | man_hour_group REGEXP '^[0-9]', id asc |
| | | </select> |
| | | |
| | | <select id="selectStandardProductListByTree2" resultType="com.yuanchu.mom.pojo.StandardProductList"> |
| | |
| | | id structure_item_parameter_id |
| | | from structure_item_parameter |
| | | where sample LIKE CONCAT('%[', #{tree}, ']%') |
| | | order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), |
| | | man_hour_group REGEXP '^[0-9]', id asc |
| | | </select> |
| | | |
| | | <select id="getStandardTree2" resultMap="SampleTypeDto"> |
| | |
| | | or sample = '[]' |
| | | OR sample LIKE CONCAT('%', #{tree}, '%') |
| | | ) |
| | | order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED), |
| | | man_hour_group REGEXP '^[0-9]', id asc |
| | | </select> |
| | | <select id="getStandardTree3" resultType="com.yuanchu.mom.dto.SampleDto"> |
| | | select model label, |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.AuxiliaryWorkingHours; |
| | | import com.yuanchu.mom.pojo.Evaluate; |
| | | import com.yuanchu.mom.service.EvaluateService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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 javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/evaluate") |
| | | public class EvaluateController { |
| | | |
| | | |
| | | @Resource |
| | | private EvaluateService evaluateService; |
| | | |
| | | @ValueClassify("人员考评") |
| | | @ApiOperation(value="考评分页查询") |
| | | @PostMapping("/page") |
| | | public Result page(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | Evaluate entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Evaluate.class); |
| | | return Result.success(evaluateService.getPage(page,entity)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | |
| | | |
| | | @ApiModelProperty("月份") |
| | | private String month; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.Evaluate; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface EvaluateService extends IService<Evaluate> { |
| | | |
| | | Map<String,Object> getPage(Page page, Evaluate entity); |
| | | } |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.pojo.Evaluate; |
| | | import com.yuanchu.mom.mapper.EvaluateMapper; |
| | | import com.yuanchu.mom.service.EvaluateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class EvaluateServiceImpl extends ServiceImpl<EvaluateMapper, Evaluate> implements EvaluateService { |
| | | |
| | | @Resource |
| | | EvaluateMapper evaluateMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Override |
| | | public Map<String, Object> getPage(Page page, Evaluate evaluate) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(Evaluate.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getPage"); |
| | | if(map1.get("look")==1) evaluate.setCreateUser(map1.get("userId")); |
| | | //map.put("body", evaluateMapper.getPage(page, QueryWrappers.queryWrappers(evaluate))); |
| | | return map; |
| | | } |
| | | } |