| | |
| | | |
| | | @ApiOperation(value = "新增工艺路线维护-->选择工序") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "type", value = "类型(为空=0橡胶连接器)", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "type", value = "类型(为空=0橡胶连接器)", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseTech") |
| | | public Result chooseTech(Integer type) { |
| | |
| | | |
| | | @ApiOperation(value = "查询工艺路线列表-->左边二级展示") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "type", value = "类型(为空=0橡胶连接器)", dataTypeClass = Integer.class,required = true), |
| | | @ApiImplicitParam(name = "type", value = "类型(为空=0橡胶连接器)", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "message", value = "搜索内容", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllTechTem") |
| | | public Result selectAllTechTem(Integer type,String message) { |
| | | return Result.success(technologyTemplateService.selectAllTechTem(type,message)); |
| | | public Result selectAllTechTem(Integer type, String message) { |
| | | return Result.success(technologyTemplateService.selectAllTechTem(type, message)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询工艺路线列表-->右边展示工艺和设备") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "father", value = "工序(父类)", dataTypeClass = String.class,required = true) |
| | | @ApiImplicitParam(name = "father", value = "工序(父类)", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/selectAllTechNam") |
| | | public Result selectAllTechNam(String father) { |
| | |
| | | |
| | | @ApiOperation(value = "根据id查询详情") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/selecTechById") |
| | | public Result selecTechById(Integer id) { |
| | |
| | | |
| | | @ApiOperation(value = "编辑") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/writeTechById") |
| | | public Result writeTechById(Integer id,@Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | technologyTemplateService.writeTechById(id,technologyTemplateDto); |
| | | return Result.success("修改"+id+"成功!"); |
| | | public Result writeTechById(Integer id, @Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | technologyTemplateService.writeTechById(id, technologyTemplateDto); |
| | | return Result.success("修改" + id + "成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delTechById") |
| | | public Result delTechById(Integer id) { |
| | | technologyTemplateService.delTechById(id); |
| | | return Result.success("删除"+id+"成功!"); |
| | | return Result.success("删除" + id + "成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "工艺路线id", dataTypeClass = String.class,required = true) |
| | | @ApiImplicitParam(name = "ids", value = "工艺路线id", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @PostMapping("/delAllTech") |
| | | public Result delAllTech(String ids) { |
| | |
| | | |
| | | //根据工艺路线id批量删除 |
| | | void delAllByTechId(String ids); |
| | | |
| | | //根据技术指标id批量删除 |
| | | void delTechById(Integer id); |
| | | |
| | | //根据技术指标id批量删除 |
| | | void delAllTech(String ids); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.TechnicalModelMapper; |
| | | import com.yuanchu.mom.mapper.TechniqueModelMapper; |
| | | import com.yuanchu.mom.pojo.TechnicalModel; |
| | | import com.yuanchu.mom.pojo.dto.TechnicalModelDto; |
| | | import com.yuanchu.mom.service.TechnicalModelService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | @Resource |
| | | TechnicalModelMapper technicalModelMapper; |
| | | |
| | | @Resource |
| | | TechniqueModelMapper techniqueModelMapper; |
| | | |
| | | //查询技术指标维护列表-->左边二级展示工序和工艺 |
| | | @Override |
| | |
| | | |
| | | //删除 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delTechById(Integer id) { |
| | | //删除技术指标 |
| | | TechnicalModel technicalModel = new TechnicalModel(); |
| | | technicalModel.setState(0); |
| | | technicalModel.setId(id); |
| | | technicalModelMapper.updateById(technicalModel); |
| | | //删除生产工艺 |
| | | techniqueModelMapper.delTechById(id); |
| | | } |
| | | |
| | | //批量删除 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delAllTech(String ids) { |
| | | technicalModelMapper.delAllTech(ids); |
| | | techniqueModelMapper.delAllTech(ids); |
| | | } |
| | | } |
| | | |
| | |
| | | WHERE d.state = 1 |
| | | AND d.type = #{type} |
| | | <if test="search_class !=null and search_class != ''"> |
| | | AND d.`name` like concat('%',#{search_class},'%') |
| | | AND d.`father` like concat('%',#{search_class},'%') |
| | | </if> |
| | | </select> |
| | | <!--查询设备维护 右侧列表展示该设备组下的所有设备--> |
| | |
| | | </if> |
| | | <if test="message!=null and message!=''"> |
| | | and code like concat('%',#{message},'%') |
| | | or device.name like concat('%',#{message},'%') |
| | | and device.name like concat('%',#{message},'%') |
| | | </if> |
| | | </select> |
| | | <!--根据设备分组查询设备--> |
| | |
| | | <result property="unit" column="unit"/> |
| | | <result property="name" column="name"/> |
| | | </resultMap> |
| | | <!--根据技术指标id批量删除--> |
| | | <update id="delTechById"> |
| | | update mom_ocean.technique_model |
| | | set state=0 |
| | | where technical_model_id = #{id} |
| | | </update> |
| | | <!--根据技术指标id批量删除--> |
| | | <update id="delAllTech"> |
| | | update mom_ocean.technique_model |
| | | set state=0 |
| | | where technical_model_id in (${id}) |
| | | </update> |
| | | <select id="selectAllTeque" resultMap="selectAllTequeMap"> |
| | | select d.name dname, |
| | | qm.id, |
| | |
| | | |
| | | @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), |
| | | @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); |
| | | 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()); |
| | |
| | | |
| | | @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) |
| | | @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){ |
| | | int countSize, |
| | | String formTime, |
| | | String productName, |
| | | String supplier, |
| | | Integer processingStatus) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnqualifiedRawMaterials( |
| | | new Page<Object>(pageSize, countSize), |
| | | formTime, |
| | |
| | | |
| | | @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) |
| | | @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){ |
| | | 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("评审成功!"); |
| | |
| | | |
| | | @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 = "specificationModel",value = "规格型号",dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productName",value = "产品名称",dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productCategories",value = "产品大类",dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "state",value = "状态",dataTypeClass = Integer.class) |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "specificationModel", value = "规格型号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productName", value = "产品名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productCategories", value = "产品大类", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "state", value = "状态", dataTypeClass = Integer.class) |
| | | }) |
| | | @GetMapping("/selectDisposal") |
| | | public Result<?> selectDisposal(int pageSize, |
| | |
| | | String specificationModel, |
| | | String productName, |
| | | Integer productCategories, |
| | | Integer state){ |
| | | Integer state) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectDisposal( |
| | | new Page<Object>(pageSize, countSize), |
| | | specificationModel, |
| | |
| | | |
| | | @ApiOperation(value = "查看编辑意见", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId",value = "不合格品处置Id",dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/viewEditorial") |
| | | public Result<?> viewEditorialComments(Integer rawUnacceptedId) { |
| | |
| | | |
| | | @ApiOperation(value = "失焦更新现像描述", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId",value = "不合格品处置Id",dataTypeClass = Integer.class,required = true), |
| | | @ApiImplicitParam(name = "tell",value = "现象描述",dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "tell", value = "现象描述", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/descriptionUpdate") |
| | | public Result<?> descriptionUpdate(Integer rawUnacceptedId, String tell) { |
| | |
| | | |
| | | @ApiOperation(value = "点击编辑意见触发查询", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId",value = "不合格品处置Id",dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/clickEditing") |
| | | public Result<?> clickEditingTriggerQuery(@RequestParam("rawUnacceptedId") Integer rawUnacceptedId) { |
| | |
| | | */ |
| | | Integer descriptionUpdate(Integer rawUnacceptedId, String tell); |
| | | |
| | | //评审 |
| | | Integer rawEvaluate(Integer rawId, Integer passOrNo); |
| | | } |
| | | |
| | |
| | | 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.mapper.OpinionMapper; |
| | | import com.yuanchu.mom.pojo.InspectUnaccepted; |
| | | import com.yuanchu.mom.pojo.Opinion; |
| | | import com.yuanchu.mom.service.InspectUnacceptedService; |
| | | import com.yuanchu.mom.service.OpinionService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | InspectUnacceptedMapper inspectUnacceptedMapper; |
| | | |
| | | @Resource |
| | | OpinionService opinionService; |
| | | |
| | | //查询成品不合格品检验单列表 |
| | | @Override |
| | |
| | | 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, passOrNo); |
| | | .set(InspectUnaccepted::getDealState, 1); |
| | | //如果是评审不通过则新增不合格处理意见表 |
| | | if (passOrNo==0) { |
| | | List<Opinion> opinions = new ArrayList<>(); |
| | | for (int i = 0; i <= 3; i++) { |
| | | Opinion opinion = new Opinion(); |
| | | opinion.setType(i); |
| | | opinion.setRawUnacceptedId(rawId); |
| | | opinions.add(opinion); |
| | | } |
| | | opinionService.saveBatch(opinions); |
| | | } |
| | | return inspectUnacceptedMapper.update(new InspectUnaccepted(), updateWrapper); |
| | | } |
| | | } |
| | |
| | | @Resource |
| | | private OpinionMapper opinionMapper; |
| | | |
| | | @Resource |
| | | private InspectUnacceptedService inspectUnacceptedService; |
| | | |
| | | @Override |
| | | public List<UpdateInspectUnacceptedDto> clickEditingTriggerQuery(Integer rawUnacceptedId) { |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | MyUtil.PrintLog(list.get(1).getRawUnacceptedId().toString()); |
| | | return opinionMapper.updateOpinion(list); |
| | | } |
| | | |
| | |
| | | |
| | | //根据id查看详情 |
| | | List<Map<String, Object>> selTeqById(Integer id); |
| | | |
| | | //根据技术指标id删除 |
| | | void delByProId(Integer id); |
| | | |
| | | //根据技术指标id批量删除 |
| | | void delAll(String ids); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.TechniqueMapper; |
| | | import com.yuanchu.mom.mapper.TechnologyMapper; |
| | | import com.yuanchu.mom.pojo.Product; |
| | | import com.yuanchu.mom.pojo.dto.ProductDto; |
| | |
| | | import com.yuanchu.mom.mapper.ProductMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Resource |
| | | TechnologyMapper technologyMapper; |
| | | |
| | | @Resource |
| | | TechniqueMapper techniqueMapper; |
| | | |
| | | //根据型号id查询项目(技术指标) |
| | | @Override |
| | |
| | | |
| | | //删除 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delProById(Integer id) { |
| | | //删除技术指标 |
| | | Product product = new Product(); |
| | | product.setId(id); |
| | | product.setState(0); |
| | | productMapper.updateById(product); |
| | | //删除生产工艺 |
| | | techniqueMapper.delByProId(id); |
| | | } |
| | | |
| | | //批量删除 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void delAllPro(String ids) { |
| | | //批量删除技术指标 |
| | | productMapper.delAllPro(ids); |
| | | //删除生产工艺 |
| | | techniqueMapper.delAll(ids); |
| | | } |
| | | |
| | | //查询标准BOM技术指标中该型号工艺下最新版本的检验项目 |
| | |
| | | <?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.TechniqueMapper"> |
| | | <!--根据技术指标id删除--> |
| | | <update id="delByProId"> |
| | | update mom_ocean.technique |
| | | set state=0 |
| | | where technology_id = (select technology_id from mom_ocean.product where product.id = #{id}) |
| | | and product_father = (select father from mom_ocean.product where product.id = #{id}) |
| | | and product = (select name from mom_ocean.product where product.id = #{id}) |
| | | </update> |
| | | <!--根据技术指标id批量删除--> |
| | | <update id="delAll"> |
| | | update mom_ocean.technique |
| | | set state=0 |
| | | where technology_id in (select technology_id from mom_ocean.product where product.id in (${ids})) |
| | | and product_father in (select father from mom_ocean.product where product.id in (${ids})) |
| | | and product in (select name from mom_ocean.product where product.id in (${ids})) |
| | | </update> |
| | | <!--根据型号id查询所有版本--> |
| | | <select id="selectVerByTeq" resultType="java.lang.Integer"> |
| | | select distinct version |