|
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -111,10 +112,18 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
|
|
|
model.setCreatetime(new Date());
|
|
|
model.setCreateman(userId);
|
|
|
model.setWorkprocType(model.getWorkprocType());
|
|
|
- emsProdplanRoundService.add(model);
|
|
|
emsGmPcJh.setState("3");
|
|
|
emsGmPcJh.setReceiveTime(new Date());
|
|
|
emsGmPcJhMapper.updateByPrimaryKeySelective(emsGmPcJh);
|
|
|
+ emsProdplanRoundService.add(model);
|
|
|
+ EmsGmPcJh prodplan = emsGmPcJhMapper.selectByPrimaryKey(model.getParentid());
|
|
|
+ int a = prodplan.getPlanWeight().intValue()*2;
|
|
|
+ if (a>=emsProdplanRoundMapper.getPlanCount(model.getParentid()).intValue()){
|
|
|
+
|
|
|
+ }else {
|
|
|
+ return failed("请检查新增的计划!");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
return success();
|
|
|
}
|
|
@@ -404,8 +413,8 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
|
|
|
return failed();
|
|
|
}
|
|
|
@GetMapping("getstdchem")
|
|
|
- public RESTfulResult getstdchem(){
|
|
|
- List<EmsProdplanRound> emsProdplanRounds = emsProdplanRoundService.getchemicalStandard();
|
|
|
+ public RESTfulResult getstdchem(@RequestParam("workprocType") String workprocType){
|
|
|
+ List<EmsProdplanRound> emsProdplanRounds = emsProdplanRoundService.getchemicalStandard(workprocType);
|
|
|
return success(emsProdplanRounds);
|
|
|
}
|
|
|
|