| | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.LaboratoryDto; |
| | | import com.ruoyi.basic.dto.*; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.properties.WechatProperty; |
| | | import com.ruoyi.common.utils.LimsDateUtil; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.inspect.dto.CopperInsOrderDto; |
| | | import com.ruoyi.inspect.dto.RawMaterialStandardTreeDto; |
| | | import com.ruoyi.basic.dto.SampleTypeDto; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsReportService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderService; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper; |
| | | import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | private GetLook getLook; |
| | | private UserMapper userMapper; |
| | | private InsOrderService insOrderService; |
| | | private InsOrderMapper insOrderMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(IfsInventoryQuantity.class)); |
| | | map.put("body", standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity))); |
| | | return map; |
| | | public IPage<IfsInventoryQuantity> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity) { |
| | | return standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity)); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne"); |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | ifsInventoryQuantityDto.setCreateUser(map1.get("userId")); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // ifsInventoryQuantityDto.setOrderState(null); |
| | | map.put("head", PrintChina.printChina(IfsInventoryQuantityDto.class)); |
| | | map.put("body", standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto))); |
| | | return map; |
| | | public IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) { |
| | | return standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public int inspectionReport(List<Integer> ids) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .in(IfsInventoryQuantity::getId, ids) |
| | | .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName()) |
| | |
| | | */ |
| | | @Override |
| | | public int inspectionReportOne(IfsInventoryQuantity ifsInventoryQuantity) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .eq(IfsInventoryQuantity::getId, ifsInventoryQuantity.getId()) |
| | | .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName()) |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(IfsInventoryQuantityCheckDto.class)); |
| | | map.put("body", standardTreeMapper.selectIfsInventoryQuantity(page, QueryWrappers.queryWrappers(ifsInventoryQuantity))); |
| | | return map; |
| | | public IPage<IfsInventoryQuantityCheckDto> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity) { |
| | | return standardTreeMapper.selectIfsInventoryQuantity(page, QueryWrappers.queryWrappers(ifsInventoryQuantity)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne"); |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | ifsInventoryQuantityDto.setCreateUser(map1.get("userId")); |
| | | } |
| | | public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | // todo: 只看我 |
| | | String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate(); |
| | | String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate(); |
| | | ifsInventoryQuantityDto.setBeginDeclareDate(null); |
| | | ifsInventoryQuantityDto.setEndDeclareDate(null); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(IfsInventoryQuantitySupplierDto.class)); |
| | | map.put("body", standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate)); |
| | | return map; |
| | | IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); |
| | | return ifsByOver; |
| | | } |
| | | |
| | | /** |
| | |
| | | ifsInventoryQuantityMapper.insert(ifsInventoryQuantity); |
| | | } |
| | | |
| | | @Override |
| | | public void shiftingParking(List<Integer> ids) { |
| | | for (Integer id : ids) { |
| | | InsOrder order = insOrderService.getById(id); |
| | | // todo: ifs直接移库 |
| | | insReportService.isRawMaterial(order); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 铜单丝下单免检 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne"); |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | ifsInventoryQuantityDto.setCreateUser(map1.get("userId")); |
| | | } |
| | | public IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | |
| | | // todo: 只看我 |
| | | String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate(); |
| | | String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate(); |
| | | ifsInventoryQuantityDto.setBeginDeclareDate(null); |
| | | ifsInventoryQuantityDto.setEndDeclareDate(null); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(IfsInventoryQuantitySupplierDto.class)); |
| | | map.put("body", standardTreeMapper.getIfsByQuarter(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate)); |
| | | return map; |
| | | return standardTreeMapper.getIfsByQuarter(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); |
| | | } |
| | | |
| | | /** |
| | |
| | | DateTime parse = DateUtil.parse(localDateTime.format(formatter)); |
| | | auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//星期 |
| | | auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//周次 |
| | | auxiliaryOutputWorkingHours.setCheck(getLook.selectPowerByMethodAndUserId(null).get("userId"));//检测人 |
| | | auxiliaryOutputWorkingHours.setCheck(SecurityUtils.getUserId().intValue());//检测人 |
| | | auxiliaryOutputWorkingHours.setPrice(new BigDecimal("1"));//单价 |
| | | |
| | | auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); |