| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.utils.NodeUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.expression.spel.ast.NullLiteral; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.tools.JavaCompiler; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | |
| | | private TestMastService testMastService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | TestMast testMast = testMastService.selectOne(wrapper); |
| | | if(null != testMast){ |
| | | if (testMast.getStatus()==3){ |
| | | Date date = new Date(); |
| | | testMast.setStatus(4); |
| | | testMast.setModiTime(new Date()); |
| | | testMast.setModiTime(date); |
| | | if (!testMastService.update(testMast,wrapper)){ |
| | | throw new CoolException("更改测试状态失败"); |
| | | } |
| | | locMast.setPackStatus(3); |
| | | testMast.setModiTime(date); |
| | | if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | throw new CoolException("更改产品状态失败"); |
| | | } |
| | |
| | | } |
| | | } else { |
| | | throw new CoolException("状态异常"); |
| | | } |
| | | //移库开始,查询目标库位 |
| | | LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1",2) |
| | | .eq("loc_sts","O") |
| | | .eq("fire_status", 0) |
| | | .eq("pack_status",0)); |
| | | if (targetLocNo != null){ |
| | | workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId())); |
| | | }else { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | return success; |
| | | } |