Merge remote-tracking branch 'origin/master'
# Conflicts:
# sys/src/main/resources/application-dev.yml
| | |
| | | @GetMapping("/getTestSampleStatistics") |
| | | @AuthHandler |
| | | public Result<?> getTestSampleStatistics(SelectQualificationRateDto dto){ |
| | | System.out.println("getTestSampleStatistics______________>"+dto); |
| | | return Result.success(service.getTestSampleStatistics(dto)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/getSupplierNoPassStatistics") |
| | | @AuthHandler |
| | | public Result<?> getSupplierNoPassStatistics(SelectQualificationRateDto dto){ |
| | | System.out.println("getSupplierNoPassStatistics++++++++++++++++>"+dto); |
| | | return Result.success(service.getSupplierNoPassStatistics(dto)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/getNoPassProjectStatistics") |
| | | @AuthHandler |
| | | public Result<?> getNoPassProjectStatistics(SelectQualificationRateDto dto){ |
| | | System.out.println("getNoPassProjectStatistics===============>"+dto); |
| | | return Result.success(service.getNoPassProjectStatistics(dto)); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | import com.yuanchu.limslaboratory.pojo.RawMaterial; |
| | | import com.yuanchu.limslaboratory.service.RawMaterialService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | map.put("total", iPage.getTotal()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation("原材料报检添加") |
| | | @PostMapping("/add") |
| | | @AuthHandler(type = InterfaceType.ADD,menuId = MenuEnums.reportForInspection,isAdd = true) |
| | | public Result<?> insertRawMaterial(@Validated @RequestBody RawMaterial rawMaterial) { |
| | | Integer integer = rawMaterialService.insertRawMaterial(rawMaterial); |
| | | if (integer >= 1) { |
| | | return Result.success("添加成功"); |
| | | } |
| | | return Result.fail("添加失败"); |
| | | } |
| | | |
| | | @ApiOperation("原材料报检删除") |
| | | @PostMapping("/delete") |
| | | @AuthHandler(type = InterfaceType.DELETE,menuId = MenuEnums.reportForInspection,isAdd = true) |
| | | public Result<?> deleteRawMaterial(String deleteId) { |
| | | Integer integer = rawMaterialService.deleteRawMaterial(deleteId); |
| | | if (integer >= 1) { |
| | | return Result.success("删除成功"); |
| | | } |
| | | return Result.fail("删除失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @ApiModelProperty(value = "主键", hidden = true) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "供应商名称") |
| | | @ApiModelProperty(value = "供应商名称", required = true, example = "江苏鵷雏") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty(value = "材料编码") |
| | | @ApiModelProperty(value = "材料编码", required = true, example = "YCL202308290000002") |
| | | private String materialCoding; |
| | | |
| | | @ApiModelProperty(value = "材料名称") |
| | | @ApiModelProperty(value = "材料名称", required = true, example = "光纤") |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "规格型号") |
| | | @ApiModelProperty(value = "规格型号", required = true, example = "GGXH2023") |
| | | private String specificationsModels; |
| | | |
| | | @ApiModelProperty(value = "单位") |
| | | @ApiModelProperty(value = "单位", required = true, example = "KB") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | @ApiModelProperty(value = "数量", example = "100", required = true) |
| | | private Integer quantity; |
| | | |
| | | @ApiModelProperty(value = "报检日期") |
| | | @ApiModelProperty(value = "报检日期", example = "2023-08-29", required = true, dataType = "date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date inspectionDate; |
| | | |
| | | @ApiModelProperty(value = "检验人") |
| | | @ApiModelProperty(value = "检验人", example = "李华", required = true) |
| | | private String surveyor; |
| | | |
| | | @ApiModelProperty(value = "检验日期") |
| | | @ApiModelProperty(value = "检验日期", required = true, example = "2023-08-29", dataType = "date") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date dateSurvey; |
| | | |
| | | @ApiModelProperty(value = "状态0:待检测;1:已检测") |
| | | @ApiModelProperty(value = "状态0:待检测;1:已检测", required = true, example = "1") |
| | | private Integer type; |
| | | |
| | | // @TableLogic(value = "1", delval = "0") |
| | | @ApiModelProperty(value = "逻辑删除 正常>=1,删除<=0", hidden = true) |
| | | private Integer state; |
| | | |
| | |
| | | List<Map<String, Object>> selectRawmaAll(); |
| | | |
| | | |
| | | Integer insertRawMaterial(RawMaterial rawMaterial); |
| | | |
| | | Integer deleteRawMaterial(String deleteId); |
| | | } |
| | |
| | | list.add(mapNoPass); |
| | | mapResult.put("series",list); |
| | | mapResult.put("noData",true); |
| | | //System.out.println(mapResult); |
| | | return mapResult; |
| | | } |
| | | |
| | |
| | | supplierDistinct.forEach(l -> { |
| | | supplierList.add(String.valueOf(l.get("supplier"))); |
| | | }); |
| | | //x轴 |
| | | allMap.put("xAxis", supplierList); |
| | | List<SeriesDto> seriesDtoList = new ArrayList<SeriesDto>(2); |
| | | //title |
| | | SeriesDto seriesDto = new SeriesDto("合格数量"); |
| | | SeriesDto seriesDto2 = new SeriesDto("不合格数量"); |
| | | // 取出对应合格数量不合格数量 |
| | |
| | | .forEach(l -> { |
| | | if (Objects.equals(l.get("inspectionStatus"), 1)) { |
| | | integerPass.incrementAndGet(); |
| | | } else { |
| | | } else if(Objects.equals(l.get("inspectionStatus"), 0)) { |
| | | integerNoPass.incrementAndGet(); |
| | | } |
| | | }); |
| | |
| | | public Map<String, Object> getNoPassProjectStatistics(SelectQualificationRateDto dto) { |
| | | Map<String, Object> allMap = new HashMap<>(16); |
| | | List<ImInfo> imInfos = qualificationRateStatisticsMapper.selectProjectionsByCondition(dto); |
| | | List<String>NameList = new ArrayList<>(); |
| | | List<SelectProjectByCodeAndNameDto>projectByCodeAndNameDtos=new ArrayList<>(); |
| | | if(imInfos.size()<=0){ |
| | | allMap.put("noData",false); |
| | | return allMap; |
| | | } |
| | | List<String>NameList = new ArrayList<>(); |
| | | List<SelectProjectByCodeAndNameDto>projectByCodeAndNameDtos=new ArrayList<>(); |
| | | imInfos.forEach(l->{ |
| | | NameList.add(l.getImCode()+"-"+l.getImName()); |
| | | projectByCodeAndNameDtos.add(new SelectProjectByCodeAndNameDto(l.getImCode(),l.getImName())); |
| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.RawMaterial; |
| | |
| | | * 分页查询 |
| | | * @param materialCoding |
| | | * @param materialName |
| | | * @param condition |
| | | * @param createTime |
| | | * @param page |
| | | * @return |
| | |
| | | return rawMaterialMapper.selectRawmaAll(); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertRawMaterial(RawMaterial rawMaterial) { |
| | | return rawMaterialMapper.insert(rawMaterial); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteRawMaterial(String deleteId) { |
| | | LambdaUpdateWrapper<RawMaterial> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(RawMaterial::getId, deleteId); |
| | | updateWrapper.set(RawMaterial::getState, 0); |
| | | return rawMaterialMapper.update(new RawMaterial(), updateWrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | //分配-->选择设备 |
| | | List<Map<String, Object>> chooseinstum(); |
| | | |
| | | List<Instrument> getInstrument(); |
| | | List<Map<String, String>> getInstrument(); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "当前页", example = "1", required = true) |
| | | private Long currentPage; |
| | | |
| | | @ApiModelProperty(value = "每页多少条", example = "10", required = true) |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "计划单号", required = false) |
| | | private String plannedOrderNumber; |
| | | } |
| | |
| | | left join lims_laboratory.classify c on c.id = instrument.classify_id |
| | | where conditions in(1,5) |
| | | </select> |
| | | <select id="getInstrument" resultType="com.yuanchu.limslaboratory.pojo.Instrument"> |
| | | select id,equipment_name name from instrument where 1=1 and state=1 and conditions=5 |
| | | <select id="getInstrument" resultType="map"> |
| | | select id,equipment_name equipmentName from instrument where 1=1 and state=1 and conditions=5 |
| | | </select> |
| | | </mapper> |
| | |
| | | from metering_plan |
| | | where 1=1 |
| | | <if test="dto.plannedOrderNumber!=null and dto.plannedOrderNumber!=''"> |
| | | and planned_order_number=#{plannedOrderNumber} |
| | | and planned_order_number like concat('%',#{dto.plannedOrderNumber},'%') |
| | | </if> |
| | | LIMIT #{limitPage.start},#{limitPage.end}) p |
| | | LEFT JOIN metrical_information i ON p.id = i.plan |
| | |
| | | <select id="getTotal" resultType="java.util.Map"> |
| | | select count(id) num from metering_plan where 1=1 |
| | | <if test="dto.plannedOrderNumber!=null and dto.plannedOrderNumber!=''"> |
| | | and planned_order_number=#{plannedOrderNumber} |
| | | and planned_order_number like concat('%',#{dto.plannedOrderNumber},'%') |
| | | </if> |
| | | </select> |
| | | <select id="getPlanMeasureInstrument" |
| | |
| | | )); |
| | | }); |
| | | if(roleMenuList.size()<1){ |
| | | roleMenuList.add(new RoleMenu(null,nextId,39L,false,false,false,false,createTime)); |
| | | roleMenuList.add(new RoleMenu(null,nextId,39L,true,false,false,false,createTime)); |
| | | } |
| | | //roleMenuAddList.forEach(System.out::println); |
| | | int i = roleManageMapper.insertBatchRoleMenu(roleMenuList); |
| | |
| | | from menu |
| | | where state = 1 |
| | | and id != 39 |
| | | and parent_id != 39 |
| | | and parent_id != 39 |
| | | </select> |
| | | <select id="getMenuNameAndId" resultType="map"> |
| | | select url, id, name |
| | |
| | | |
| | | <select id="getNewPersonnelPage" resultType="map"> |
| | | SELECT u.`id`, u.`name` username, r.`name` roleName, DATE_FORMAT(u.`create_time`, '%Y-%m-%d') createTime, |
| | | u.`age`, |
| | | u.`age`, CONCAT(r.`id`, '') roleId, |
| | | u.`phone`, u.`email`, u.`job_state` jobState, o.`department`, u.`account`, o.`id` departmentId |
| | | FROM `user` u |
| | | LEFT JOIN role r |