| | |
| | | * @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), |
| | |
| | | @PostMapping("/addRawInspects") |
| | | public Result addRawInspects(@RequestHeader("token") String token,@Validated @RequestBody RawInspectVo rawInspectVo) throws Exception { |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | return Result.success(rawInspectService.addRawInspects(data.get("id").replaceAll("\"", ""), rawInspectVo)); |
| | | return Result.success("提交成功!",rawInspectService.addRawInspects(data.get("id").replaceAll("\"", ""), rawInspectVo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询原材料检验单列表") |
| | |
| | | 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); |
| | | } |
| | | |
| | | /*判断检测值是否满足标准值和内控值的要求,如果不满足则检验结论为不合格*/ |
| | |
| | | }).collect(Collectors.toList()); |
| | | //检验项目批量添加 |
| | | rawInsProductService.saveBatch(rawInsProductList); |
| | | return "新增检验单成功!"; |
| | | return rawInspect.getId().toString(); |
| | | } |
| | | |
| | | |
| | |
| | | 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查看详情--> |
| | | <resultMap id="oneMap" type="map"> |
| | | <id property="rcode" column="rcode"/> |
| | | <id property="code" column="rcode"/> |
| | | <result property="formTime" column="formTime"/> |
| | | <result property="creatTime" column="creatTime"/> |
| | | <result property="rname" column="rname"/> |
| | | <result property="name" column="rname"/> |
| | | <result property="specifications" column="specifications"/> |
| | | <result property="runit" column="runit"/> |
| | | <result property="number" column="number"/> |
| | |
| | | <result property="userName" column="user_name"/> |
| | | <collection property="children" resultMap="twoMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="twoMap" type="map"> |
| | | <resultMap id="twoMap" type="Map"> |
| | | <id property="rpId" column="rpId"/> |
| | | <result property="rpName" column="rpName"/> |
| | | <result property="rpUnit" column="rpUnit"/> |
| | |
| | | <result property="internal" column="internal"/> |
| | | <result property="testValue" column="test_value"/> |
| | | <result property="testState" column="test_state"/> |
| | | <result property="devName" column="devName"/> |
| | | <result property="deviceName" column="devName"/> |
| | | <result property="deviceId" column="deviceId"/> |
| | | <result property="uName" column="uName"/> |
| | | </resultMap> |
| | | |
| | |
| | | test_value, |
| | | test_state, |
| | | device.name devName, |
| | | device.`id` deviceId, |
| | | user.name uName |
| | | from mom_ocean.raw_ins_product rp |
| | | left join mom_ocean.raw_inspect r on rp.raw_inspect_id = r.id |
| | |
| | | logging: |
| | | config: classpath:logback-spring.xml |
| | | # 日志存储路径+++++++++++++++++++++++++++运维需要配置+++++++++++++++++++++++++++ |
| | | file-location: |
| | | file-location: /abc |
| | | |
| | | # 数据库备份路径 |
| | | backup: |