| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | 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 WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private TestMastService testMastService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | |
| | | } |
| | | |
| | | /*...........................赣州新增..............以下.............赣州新增...........................*/ |
| | | @Override |
| | | @Transactional |
| | | public void combPACK(CombParam param) { |
| | |
| | | } |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | java.util.Date date=null; |
| | | java.util.Date date1=null; |
| | | try { |
| | | date= sdf.parse(param.getRequestTime()); |
| | | date1= sdf.parse(param.getRequestTime()); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | java.sql.Date requestTime = new java.sql.Date(date.getTime()); |
| | | java.sql.Date requestTime = new java.sql.Date(date1.getTime()); |
| | | |
| | | // 生成入库通知档 |
| | | Mat mat = matService.selectByMatnr(param.getPackName()); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void infoReview(Review review) { |
| | | Wrapper wrapper = new EntityWrapper<TestMast>() |
| | | .eq("loc_no", review.getLocNo()); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo())); |
| | | if (locMast.getPackStatus()!=1){ |
| | | throw new CoolException("产品状态不是 1:待测试"); |
| | | } |
| | | TestMast testMast = testMastService.selectOne(wrapper); |
| | | if(null != testMast){ |
| | | if (testMast.getStatus()==1){ |
| | | testMast.setStatus(2); |
| | | testMast.setModiTime(new Date()); |
| | | if (!testMastService.update(testMast,wrapper)){ |
| | | |
| | | } |
| | | }else if (Cools.isEmpty(testMast.getStatus())){ |
| | | throw new CoolException("状态异常"); |
| | | }else { |
| | | throw new CoolException("状态不是 1:申请中"); |
| | | } |
| | | } else { |
| | | throw new CoolException("测试申请失败"); |
| | | } |
| | | } |
| | | /*...........................赣州新增..............以上.............赣州新增...........................*/ |
| | | |
| | | } |