| | |
| | | * @author zss |
| | | * @since 2023-08-07 10:04:01 |
| | | */ |
| | | @Api(tags = "QMS管理-->不合格品管理") |
| | | @RestController |
| | | @RequestMapping("/inspectUnaccepted") |
| | | public class InspectUnacceptedController { |
| | |
| | | @Autowired |
| | | private OpinionService opinionService; |
| | | |
| | | @ApiOperation(value = "查询成品不合格品检验单列表", tags = "QMS管理-->不合格品管理") |
| | | @ApiOperation(value = "不合格品管理列表", tags = "QMS管理-->不合格品管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize",value = "页数",dataTypeClass = Integer.class,required = true), |
| | | @ApiImplicitParam(name = "countSize",value = "条数/页",dataTypeClass = Integer.class,required = true), |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "评审", tags = "QMS管理-->原材料不合格品") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawId",value = "原材料Id",dataTypeClass = Integer.class,required = true), |
| | | @ApiImplicitParam(name = "passOrNo",value = "是否通过:0:不通过;1:通过",dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/evaluatePassOrNo") |
| | | public Result<?> rawEvaluate(Integer rawId, Integer passOrNo){ |
| | | Integer integer = inspectUnacceptedService.rawEvaluate(rawId, passOrNo); |
| | | if (integer >= 1) { |
| | | return Result.success("评审成功!"); |
| | | } |
| | | return Result.fail("评审失败!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "不合格品分页列表", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize",value = "页数",dataTypeClass = Integer.class,required = true), |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.InspectUnaccepted; |
| | | import com.yuanchu.mom.vo.Result; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Integer descriptionUpdate(Integer rawUnacceptedId, String tell); |
| | | |
| | | Integer rawEvaluate(Integer rawId, Integer passOrNo); |
| | | } |
| | | |
| | |
| | | import com.yuanchu.mom.mapper.InspectUnacceptedMapper; |
| | | import com.yuanchu.mom.pojo.InspectUnaccepted; |
| | | import com.yuanchu.mom.service.InspectUnacceptedService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | .set(InspectUnaccepted::getTell, tell); |
| | | return inspectUnacceptedMapper.update(new InspectUnaccepted(), updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Integer rawEvaluate(Integer rawId, Integer passOrNo) { |
| | | LambdaUpdateWrapper<InspectUnaccepted> updateWrapper = Wrappers.<InspectUnaccepted>lambdaUpdate() |
| | | .eq(InspectUnaccepted::getId, rawId) |
| | | .set(InspectUnaccepted::getDealReasult, passOrNo) |
| | | .set(InspectUnaccepted::getDealState, 1); |
| | | return inspectUnacceptedMapper.update(new InspectUnaccepted(), updateWrapper); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.RawInsProductMapper; |
| | | import com.yuanchu.mom.mapper.RawInspectMapper; |
| | | import com.yuanchu.mom.pojo.RawInsProduct; |
| | | import com.yuanchu.mom.pojo.RawInspect; |
| | | import com.yuanchu.mom.service.RawInsProductService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.sql.Wrapper; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | //只更改设备,之前的检验值删掉 |
| | | @Override |
| | | public void updateDevByRpId(Integer rpId, Integer devId) { |
| | | RawInsProduct rawInsProduct = new RawInsProduct(); |
| | | rawInsProduct.setId(rpId); |
| | | rawInsProduct.setDeviceId(devId); |
| | | rawInsProduct.setTestValue(null); |
| | | rawInsProduct.setTestState(null); |
| | | rawInsProductMapper.updateById(rawInsProduct); |
| | | LambdaUpdateWrapper<RawInsProduct> updateWrapper = Wrappers.<RawInsProduct>lambdaUpdate() |
| | | .eq(RawInsProduct::getId, rpId) |
| | | .set(RawInsProduct::getDeviceId, devId) |
| | | .set(RawInsProduct::getTestState, null) |
| | | .set(RawInsProduct::getTestValue, null); |
| | | rawInsProductMapper.update(new RawInsProduct(), updateWrapper); |
| | | } |
| | | |
| | | /*判断检测值是否满足标准值和内控值的要求,如果不满足则检验结论为不合格*/ |
| | |
| | | //根据检验单id查询原材料检验单详情 |
| | | @Override |
| | | public Map<String, Object> selectRawInspectsListById(Integer id) { |
| | | Map<String, Object> map = rawInspectMapper.selectRawInspectsListById(id); |
| | | MyUtil.PrintLog(map.toString()); |
| | | return rawInspectMapper.selectRawInspectsListById(id); |
| | | } |
| | | |
| | |
| | | order by ru.id desc |
| | | </select> |
| | | |
| | | <!--原材料不合格--> |
| | | <!--原材料不合格品--> |
| | | <select id="selectUnqualifiedRawMaterials" resultType="map"> |
| | | SELECT i.id, |
| | | DATE_FORMAT(r.form_time, '%Y-%m-%d') dateArrival, |
| | |
| | | </if> |
| | | )AS s ON s.`id` = i.`raw_inspect_id` AND s.`type` = i.type |
| | | WHERE i.`state` = 1 |
| | | AND i.`deal_reasult` = 0 |
| | | <if test="state != null"> |
| | | AND i.`deal_state` = #{state} |
| | | </if> |
| | |
| | | <if test="name!=null and name!=''"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | ORDER BY id DESC |
| | | </select> |
| | | |
| | | <!--根据原材料检验单id查看详情--> |