| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.ManualTechnologyMapper; |
| | | import com.yuanchu.mom.mapper.ManufactureOrderMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | |
| | | import com.yuanchu.mom.service.ManualTechnologyService; |
| | | import com.yuanchu.mom.service.ManufactureOrderProcessService; |
| | | import com.yuanchu.mom.service.ManufactureSchedulingService; |
| | | import com.yuanchu.mom.service.TechnologyService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Resource |
| | | ManufactureOrderMapper manufactureOrderMapper; |
| | | |
| | | @Autowired |
| | | private TechnologyService technologyService; |
| | | |
| | | @Autowired |
| | | private ManufactureSchedulingService manufactureSchedulingService; |
| | |
| | | |
| | | // 更新订单的已排产数量 |
| | | manufactureOrderMapper.updateManufacture(manualTechnologyDto.getManOrdId(), manualTechnologyDto.getSchedulingNumber()); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateTime(Integer technologyId, String startTime) { |
| | | // // Hutool 工具类计算间隔小时 |
| | | // DateTime startTime1 = DateUtil.parse(startTime); |
| | | // DateTime endTime1 = DateUtil.parse(endTime); |
| | | // long between = DateUtil.between(startTime1, endTime1, DateUnit.HOUR); |
| | | // // 更新 |
| | | // LambdaUpdateWrapper<ManualTechnology> updateWrapper = Wrappers.<ManualTechnology>lambdaUpdate() |
| | | // .eq(ManualTechnology::getId, technologyId); |
| | | // return manualTechnologyMapper.update(new ManualTechnology(), updateWrapper); |
| | | return null; |
| | | } |
| | | |
| | | // 根据排产数量计算工艺周期 |