| | |
| | | @Autowired |
| | | private InspectUnacceptedService inspectUnacceptedService; |
| | | |
| | | @Autowired |
| | | private Jwt jwt; |
| | | |
| | | @ApiOperation(value = "不合格品管理列表", tags = "QMS管理-->不合格品管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "formTime", value = "来料日期", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "dealState", value = "处理状态(为空=全部)", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "productCategories", value = "产品大类", dataTypeClass = Integer.class), |
| | | }) |
| | | @GetMapping("/selectUnRawInspectsList") |
| | | public Result<?> selectUnRawInspectsList(int pageSize, int countSize, String formTime, Integer dealState, Integer productCategories) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnRawInspectsList(new Page<Object>(pageSize, countSize), formTime, dealState, productCategories); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", inspectionPage.getTotal()); |
| | | map.put("row", inspectionPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询原材料不合格品检验单列表", tags = "QMS管理-->原材料不合格品") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "formTime", value = "来料日期", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productName", value = "产品名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "supplier", value = "供应商", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "processingStatus", value = "处理状态", dataTypeClass = Integer.class) |
| | | }) |
| | | @GetMapping("/selectURawMaterials") |
| | | public Result<?> selectUnqualifiedRawMaterials(int pageSize, |
| | | int countSize, |
| | | String formTime, |
| | | String productName, |
| | | String supplier, |
| | | Integer processingStatus) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnqualifiedRawMaterials( |
| | | new Page<Object>(pageSize, countSize), |
| | | formTime, |
| | | productName, |
| | | supplier, |
| | | processingStatus); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", inspectionPage.getTotal()); |
| | | map.put("row", inspectionPage.getRecords()); |
| | | 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) { |
| | | if (inspectUnacceptedService.getById(rawId).getDealState() == 1) { |
| | | return Result.fail("已经评审过了不能再次评审!"); |
| | | } |
| | | 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), |
| | |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "opinionTell", value = "处置意见", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "way", value = "处理方式", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "type", value = "不合格类型", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "type", value = "不合格类型", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/editDisposalOpinion") |
| | | public Result<?> editDisposalOpinionConfirmation(Integer rawUnacceptedId, String opinionTell, Integer way, Integer type) { |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.FinishedInspect; |
| | | import com.yuanchu.mom.pojo.InspectUnaccepted; |
| | | import com.yuanchu.mom.pojo.vo.RawInspectVo; |
| | | |
| | |
| | | */ |
| | | public interface InspectUnacceptedMapper extends BaseMapper<InspectUnaccepted> { |
| | | |
| | | |
| | | //查询成品检验中不合格品检验单列表 |
| | | IPage<Map<String, Object>> selectInsList(Page<Object> page, String formTime, Integer dealState, Integer productCategories); |
| | | |
| | | IPage<Map<String, Object>> selectUnqualifiedRawMaterials(Page<Object> page, String formTime, String productName, String supplier, Integer processingStatus); |
| | | |
| | | //分页查询不合格品处置 |
| | | IPage<Map<String, Object>> selectDisposal(Page<Object> page, String specificationModel, String productName, Integer productCategories, Integer state); |
| | | |
| | | //根据Id查询原材料检验信息 |
| | | RawInspectVo editDisposalOpinionConfirmation(Integer rawUnacceptedId); |
| | | |
| | | } |
| | | |
| | |
| | | List<InspectionItemDto> selectInspectionItem(Integer id, Integer type); |
| | | |
| | | |
| | | //批量修改,把原有的检验项目的数据清空 |
| | | void updateBatch(List<InspectionItem> inspectionItems); |
| | | |
| | | } |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.RawInsProduct; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * 原材料申请单中的项目列表(RawInsProduct)表数据库访问层 |
| | |
| | | */ |
| | | public interface RawInsProductMapper extends MyBaseMapper<RawInsProduct> { |
| | | |
| | | |
| | | //根据原材料检验单id查询检验项目 |
| | | List<Integer> getresult(Integer id); |
| | | |
| | | |
| | | //批量清空检验值 |
| | | void updateBatch(List<RawInsProduct> rawInsProductList); |
| | | } |
| | | |
| | |
| | | private Integer dealState; |
| | | |
| | | /** |
| | | * 处理结果 0:不通过;1:通过 |
| | | **/ |
| | | private Integer dealReasult; |
| | | |
| | | /** |
| | | * 处理日期 |
| | | **/ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | public interface InspectUnacceptedService extends IService<InspectUnaccepted> { |
| | | |
| | | /** |
| | | *查询成品不合格品检验单列表 |
| | | * @param |
| | | * @param formTime |
| | | * @param dealState |
| | | * @return |
| | | */ |
| | | IPage<Map<String, Object>> selectUnRawInspectsList(Page<Object> page, String formTime, Integer dealState, Integer productCategories); |
| | | |
| | | /** |
| | | * 查询原材料不合格品检验单列表 |
| | | * @param page |
| | | * @param formTime |
| | | * @param productName |
| | | * @param supplier |
| | | * @param processingStatus |
| | | * @return |
| | | */ |
| | | IPage<Map<String, Object>> selectUnqualifiedRawMaterials(Page<Object> page, String formTime, String productName, String supplier, Integer processingStatus); |
| | | |
| | | /** |
| | | * 不合格品处置分页列表 |
| | | * @param page |
| | | * @param specificationModel |
| | |
| | | */ |
| | | Integer descriptionUpdate(Integer rawUnacceptedId, String tell); |
| | | |
| | | //评审 |
| | | Integer rawEvaluate(Integer rawId, Integer passOrNo); |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | Integer editDisposalOpinionConfirmation(Integer rawUnacceptedId, String opinionTell, Integer way, Integer type); |
| | |
| | | */ |
| | | Integer addProcessInspectionSheet(String username, UpdateInspectionItemDto updateInspectionItemDto); |
| | | |
| | | /** |
| | | * 新增按钮-->选择设备 |
| | | * @param technologyId |
| | | * @param father |
| | | * @param name |
| | | * @return |
| | | */ |
| | | //List<Map<String, Object>> chooseDev(Integer technologyId, String father, String name); |
| | | |
| | | |
| | | /** |
| | | * 更改设备 |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.InspectUnacceptedMapper; |
| | | import com.yuanchu.mom.pojo.InspectUnaccepted; |
| | | import com.yuanchu.mom.pojo.RawInspect; |
| | | import com.yuanchu.mom.mapper.InspectionItemMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.pojo.dto.InspectionItemDto; |
| | | import com.yuanchu.mom.pojo.vo.RawInspectVo; |
| | | import com.yuanchu.mom.service.*; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 不合格品检验表(InspectUnaccepted)表服务实现类 |
| | |
| | | @Autowired |
| | | private ProcessInspectService processInspectService; |
| | | |
| | | //查询成品不合格品检验单列表 |
| | | @Override |
| | | public IPage<Map<String, Object>> selectUnRawInspectsList(Page<Object> page, String formTime, Integer dealState, Integer productCategories) { |
| | | return inspectUnacceptedMapper.selectInsList(page, formTime, dealState, productCategories); |
| | | } |
| | | @Resource |
| | | InspectionItemMapper inspectionItemMapper; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> selectUnqualifiedRawMaterials(Page<Object> page, String formTime, String productName, String supplier, Integer processingStatus) { |
| | | return inspectUnacceptedMapper.selectUnqualifiedRawMaterials(page, formTime, productName, supplier, processingStatus); |
| | | } |
| | | @Resource |
| | | InspectionItemService inspectionItemService; |
| | | |
| | | //不合格处置列表 |
| | | @Override |
| | | public IPage<Map<String, Object>> selectDisposal(Page<Object> page, String specificationModel, String productName, Integer productCategories, Integer state) { |
| | | return inspectUnacceptedMapper.selectDisposal(page, specificationModel, productName, productCategories, state); |
| | | } |
| | | |
| | | //现象描述失焦保存 |
| | | @Override |
| | | public Integer descriptionUpdate(Integer rawUnacceptedId, String tell) { |
| | | LambdaUpdateWrapper<InspectUnaccepted> updateWrapper = Wrappers.<InspectUnaccepted>lambdaUpdate() |
| | |
| | | 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); |
| | | return inspectUnacceptedMapper.update(new InspectUnaccepted(), updateWrapper); |
| | | } |
| | | |
| | | //编辑处置意见确定按钮 |
| | | @Override |
| | | public Integer editDisposalOpinionConfirmation(Integer rawUnacceptedId, String opinionTell, Integer way, Integer type) { |
| | | //根据不合格品id查询不合格品信息 |
| | | InspectUnaccepted inspectUnaccepted = inspectUnacceptedMapper.selectById(rawUnacceptedId); |
| | | LambdaUpdateWrapper<InspectUnaccepted> updateWrapper = Wrappers.<InspectUnaccepted>lambdaUpdate() |
| | | .eq(InspectUnaccepted::getId, rawUnacceptedId) |
| | | .set(InspectUnaccepted::getWay, way) |
| | | .set(InspectUnaccepted::getDealState, 1) |
| | | .set(InspectUnaccepted::getDealTime, new Date()) |
| | | .set(InspectUnaccepted::getOpinionTell, opinionTell); |
| | | if (way == 1){ |
| | | if (way == 1) { |
| | | // 等于0:原材料 |
| | | if (type == 0){ |
| | | // 根据Id查询原材料检验信息信息 |
| | | if (type == 0) { |
| | | // 根据Id查询原材料检验信息 |
| | | RawInspectVo map = inspectUnacceptedMapper.editDisposalOpinionConfirmation(rawUnacceptedId); |
| | | RawInspect rawInspect = new RawInspect(); |
| | | BeanUtils.copyProperties(map, rawInspect); |
| | |
| | | // 批量保存子级 |
| | | rawInsProductService.batchAddInsProduct(rawInspect.getId(), map.getRawInsProducts()); |
| | | } |
| | | // 等于1:产品 |
| | | // 等于1:产品检验(半成品) |
| | | else if (type == 1) { |
| | | // TODO 该接口只剩余这两处 |
| | | //根据id查询产品检验信息 |
| | | FinishedInspect finishedInspect = finishedInspectService.getById(inspectUnaccepted.getRawInspectId()); |
| | | //根据产品检验单id查询检验项目 |
| | | List<InspectionItem> inspectionItems = inspectionItemMapper.selectList(Wrappers.<InspectionItem>query() |
| | | .eq("inspect_id", finishedInspect.getId()) |
| | | .eq("type", 2)); |
| | | //保存产品单 |
| | | finishedInspect.setId(null); |
| | | finishedInspect.setResult(null); |
| | | finishedInspectService.save(finishedInspect); |
| | | //保存产品项目 |
| | | List<InspectionItem> inspectionItemList = inspectionItems.stream().map(inspectionItem -> { |
| | | inspectionItem.setId(null); |
| | | inspectionItem.setInspectionValue(null); |
| | | inspectionItem.setDeviceId(null); |
| | | inspectionItem.setResult(null); |
| | | inspectionItem.setInspectId(finishedInspect.getId()); |
| | | inspectionItem.setUsername(null); |
| | | return inspectionItem; |
| | | }).collect(Collectors.toList()); |
| | | inspectionItemService.saveBatch(inspectionItemList); |
| | | } |
| | | // 等于2:过程 |
| | | // 等于2:过程检验(在制品) |
| | | else if (type == 2) { |
| | | // TODO 该接口只剩余这两处 |
| | | //根据id查询产品检验信息 |
| | | ProcessInspect processInspect = processInspectService.getById(inspectUnaccepted.getRawInspectId()); |
| | | //根据产品检验单id查询检验项目 |
| | | List<InspectionItem> inspectionItems = inspectionItemMapper.selectList(Wrappers.<InspectionItem>query() |
| | | .eq("inspect_id", processInspect.getId()) |
| | | .eq("type", 1)); |
| | | //保存产品单 |
| | | processInspect.setId(null); |
| | | processInspect.setResult(null); |
| | | processInspectService.save(processInspect); |
| | | //保存产品项目 |
| | | List<InspectionItem> inspectionItemList = inspectionItems.stream().map(inspectionItem -> { |
| | | inspectionItem.setId(null); |
| | | inspectionItem.setInspectionValue(null); |
| | | inspectionItem.setDeviceId(null); |
| | | inspectionItem.setResult(null); |
| | | inspectionItem.setInspectId(processInspect.getId()); |
| | | inspectionItem.setUsername(null); |
| | | return inspectionItem; |
| | | }).collect(Collectors.toList()); |
| | | inspectionItemService.saveBatch(inspectionItemList); |
| | | } |
| | | } else if (way == 2 || way == 3 || way == 4){ |
| | | } else if (way == 2 || way == 3 || way == 4) { |
| | | updateWrapper.set(InspectUnaccepted::getFaultyMaterials, 1); |
| | | } |
| | | return inspectUnacceptedMapper.update(new InspectUnaccepted(), updateWrapper); |
| | |
| | | @Resource |
| | | private InspectionItemMapper inspectionItemMapper; |
| | | |
| | | @Resource |
| | | TechniqueMapper techniqueMapper; |
| | | |
| | | |
| | | |
| | |
| | | public List<InspectionItemDto> selectInspectionItem(Integer id, Integer type) { |
| | | return inspectionItemMapper.selectInspectionItem(id,type); |
| | | } |
| | | |
| | | |
| | | //新增过程检验单-->选择设备 |
| | | /*@Override |
| | | public List<Map<String, Object>> chooseDev(Integer technologyId, String father, String name) { |
| | | //该工艺id下生产工艺最新版本 |
| | | Integer ver = techniqueMapper.selectVerByTeId(technologyId).get(0); |
| | | return techniqueMapper.selDevByVerTecIdFaNam(technologyId, father, name, ver); |
| | | }*/ |
| | | |
| | | //更改设备 |
| | | @Override |
| | |
| | | .reason(rawInspectMapper.selectById(id).getName() + "不合格") //暂且定义为原材料不合格 |
| | | .number(number) |
| | | .rawInspectId(id) |
| | | .dealReasult(1) |
| | | .type(0) //类型为原材料 |
| | | .build(); |
| | | inspectUnacceptedMapper.insert(rawUnaccepted); |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.InspectUnacceptedMapper"> |
| | | <!--不合格管理--> |
| | | <select id="selectInsList" resultType="java.util.Map"> |
| | | SELECT ru.id, |
| | | ru.reason, |
| | | u.`name`, |
| | | ru.deal_state, |
| | | ru.deal_reasult, |
| | | DATE_FORMAT(fi.dateArrival, '%Y-%m-%d') dateArrival, |
| | | fi.material_code, |
| | | fi.project_name, |
| | | fi.specifications_model, |
| | | fi.unit, |
| | | number quantity, |
| | | DATE_FORMAT(fi.inspectionDate, '%Y-%m-%d') inspectionDate, |
| | | DATE_FORMAT(fi.processingDate, '%Y-%m-%d') processingDate |
| | | FROM mom_ocean.inspect_unaccepted ru, mom_ocean.`user` u, ( |
| | | SELECT p.id, DATE_FORMAT(p.`create_time`, '%Y-%m-%d') dateArrival, p.`material_code`, p.`material` project_name, |
| | | p.`specifications_model`, |
| | | p.`unit`, p.`quantity`,DATE_FORMAT(p.`create_time`, '%Y-%m-%d') inspectionDate, DATE_FORMAT(p.`update_time`, |
| | | '%Y-%m-%d') processingDate, p.`user_id`, 2 AS |
| | | classify |
| | | FROM mom_ocean.process_inspect p |
| | | WHERE p.`state` = 1 |
| | | UNION ALL |
| | | SELECT fi.id, DATE_FORMAT(fi.create_time, '%Y-%m-%d') |
| | | dateArrival,material_code, material project_name,specifications_model, |
| | | unit,quantity,DATE_FORMAT(fi.create_time, '%Y-%m-%d') inspectionDate,DATE_FORMAT(fi.update_time, '%Y-%m-%d') |
| | | processingDate, fi.`user_id`, 1 AS classify |
| | | FROM mom_ocean.finished_inspect fi |
| | | WHERE fi.`state` = 1) fi |
| | | WHERE fi.id = ru.raw_inspect_id |
| | | AND ru.`type` = fi.`classify` |
| | | AND ru.type != 0 |
| | | AND ru.state=1 |
| | | AND fi.`user_id` = u.`id` |
| | | <if test="dealState!=null"> |
| | | and ru.deal_state = #{dealState} |
| | | </if> |
| | | <if test="formTime!=null and formTime!=''"> |
| | | and fi.dateArrival=#{formTime} |
| | | </if> |
| | | <if test="productCategories != null"> |
| | | and ru.`type` = #{productCategories} |
| | | </if> |
| | | order by ru.id desc |
| | | </select> |
| | | |
| | | <!--原材料不合格品--> |
| | | <select id="selectUnqualifiedRawMaterials" resultType="map"> |
| | | SELECT i.id, |
| | | DATE_FORMAT(r.form_time, '%Y-%m-%d') dateArrival, |
| | | i.`reason`, |
| | | r.`code`, |
| | | r.`name`, |
| | | r.`specifications`, |
| | | r.`unit`, |
| | | i.number, |
| | | DATE_FORMAT(r.`create_time`,'%Y-%m-%d') inspectionDate, |
| | | r.`user_name`, |
| | | DATE_FORMAT(r.`ins_time`,'%Y-%m-%d') processingDate, |
| | | r.`supplier`, |
| | | i.`deal_state`, |
| | | i.`deal_reasult` |
| | | FROM mom_ocean.inspect_unaccepted i |
| | | LEFT JOIN mom_ocean.raw_inspect r ON i.`raw_inspect_id` = r.`id` |
| | | WHERE i.`state` = 1 |
| | | AND i.`type` = 0 |
| | | <if test="formTime != null and formTime != ''"> |
| | | AND r.form_time = #{formTime} |
| | | </if> |
| | | <if test="productName != null and productName != ''"> |
| | | AND r.name LIKE CONCAT('%', #{productName}, '%') |
| | | </if> |
| | | <if test="supplier != null and supplier != ''"> |
| | | AND r.supplier LIKE CONCAT('%', #{supplier}, '%') |
| | | </if> |
| | | <if test="processingStatus != null"> |
| | | AND i.deal_state = #{processingStatus} |
| | | </if> |
| | | ORDER BY i.`id` DESC |
| | | </select> |
| | | |
| | | <!--不合格处置--> |
| | | <select id="selectDisposal" resultType="map"> |
| | |
| | | </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> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InspectionItemMapper"> |
| | | <!--把原有的检验项目的数据清空--> |
| | | <update id="updateBatch"> |
| | | UPDATE mom_ocean.inspection_item o |
| | | <trim prefix="set" suffixOverrides=","> |
| | | <trim prefix="inspection_value=case" suffix="end,"> |
| | | <foreach collection="inspectionItems" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="device_id=case" suffix="end,"> |
| | | <foreach collection="inspectionItems" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="result=case" suffix="end,"> |
| | | <foreach collection="inspectionItems" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="username=case" suffix="end,"> |
| | | <foreach collection="inspectionItems" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | </trim> |
| | | WHERE o.id in |
| | | <foreach collection="inspectionItems" index="index" item="item" separator="," open="(" close=")"> |
| | | #{item.id, jdbcType=BIGINT} |
| | | </foreach> |
| | | </update> |
| | | <resultMap id="selectInspectionItemMap" type="inspectionItemDto"> |
| | | <id property="father" column="ifather"/> |
| | | <association property="children" resultMap="selectInspectionItemDto2Map"/> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.RawInsProductMapper"> |
| | | <!--批量清空检验状态--> |
| | | <update id="updateBatch"> |
| | | UPDATE mom_ocean.raw_ins_product o |
| | | <trim prefix="set" suffixOverrides=","> |
| | | <trim prefix="test_value=case" suffix="end,"> |
| | | <foreach collection="rawInsProductList" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="device_id=case" suffix="end,"> |
| | | <foreach collection="rawInsProductList" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="test_state=case" suffix="end,"> |
| | | <foreach collection="rawInsProductList" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | <trim prefix="user_id=case" suffix="end,"> |
| | | <foreach collection="rawInsProductList" item="item" index="index"> |
| | | WHEN o.id = #{item.id} THEN null |
| | | </foreach> |
| | | </trim> |
| | | </trim> |
| | | WHERE o.id in |
| | | <foreach collection="rawInsProductList" index="index" item="item" separator="," open="(" close=")"> |
| | | #{item.id, jdbcType=BIGINT} |
| | | </foreach> |
| | | </update> |
| | | <!--根据原材料检验单id查询检验项目--> |
| | | <select id="getresult" resultType="java.lang.Integer"> |
| | | select test_state |
| | |
| | | |
| | | private static final String IMPORT_POL_RECEIVE = "http://192.168.20.47:8081/ErpServices/PurchaseReceiptService/importPolReceive"; |
| | | |
| | | private static final String IFS_UPDATE="http://192.168.20.47:8081/ErpServices/PurchaseReceiptService/importPolReceive"; |
| | | |
| | | private static final Map<String, String> GET_TOKEN_HEADER = new HashMap<>(2); |
| | | |
| | | private static final Map<String, Object> USER_INFO = new HashMap<>(4); |
| | |
| | | System.out.println(importPolReceive(batchInfos)); |
| | | } |
| | | |
| | | public static void ifsUpdate(){ |
| | | |
| | | } |
| | | } |