| | |
| | | package org.jeecg.modules.dnc.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.dnc.dto.ComponentExt; |
| | | |
| | | import org.jeecg.modules.dnc.entity.*; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | | import org.jeecg.modules.dnc.mapper.ComponentInfoMapper; |
| | | import org.jeecg.modules.dnc.mapper.ProductInfoMapper; |
| | |
| | | import org.jeecg.modules.dnc.response.ComponentInfoCode; |
| | | import org.jeecg.modules.dnc.response.ProductInfoCode; |
| | | import org.jeecg.modules.dnc.response.UcenterCode; |
| | | |
| | | import org.jeecg.modules.dnc.service.*; |
| | | import org.jeecg.modules.dnc.ucenter.Department; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.dnc.entity.*; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.dnc.entity.ComponentInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private IProcessStreamService processStreamService; |
| | | @Autowired |
| | | private IDocInfoService docInfoService; |
| | | private IProductMixService productMixService; |
| | | @Autowired |
| | | private IDocRelativeService iDocRelativeService; |
| | | @Autowired |
| | |
| | | if (!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); |
| | | } |
| | | //去除默认新增工序,转为手动添加 |
| | | //添加结构树 |
| | | ProductMix productMix = new ProductMix(Long.parseLong(componentInfo.getComponentId()),Long.parseLong(productInfo.getProductId()) |
| | | ,componentInfo.getComponentName(),componentInfo.getComponentCode(),"2"); |
| | | productMixService.save(productMix); |
| | | //添加权限 |
| | | PermissionStreamNew stream = new PermissionStreamNew(); |
| | | stream.setUserId(userId); |
| | |
| | | b = permissionStreamNewService.deletePermissionStreamNewByBusinessId(componentInfo.getComponentId(),"2","1"); |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | b = productMixService.removeById(id); |
| | | if (!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | return super.removeById(id); |
| | | } |
| | | |