|
@@ -260,15 +260,16 @@ public class AdminMachineController {
|
|
|
public ModelAndView producedAbnormalityStatistics(HttpServletRequest request, PtsMachine ptsMachine) {
|
|
|
ModelAndView mv = new ModelAndView("pts/machine/producedAbnormalityStatistics");
|
|
|
String produceId = request.getParameter("produceId");//1.产品id
|
|
|
+ Produce produce = new Produce();
|
|
|
if (produceId == null || produceId.equals("")) {
|
|
|
- produceId = "1";//默认为第一个产品
|
|
|
+ produce = produceService.getProduceByOne();//默认为第一个产品
|
|
|
+
|
|
|
+ }else{
|
|
|
+ produce.setProduceId(Integer.valueOf(produceId));
|
|
|
+ produce = produceService.getProduce(produce);
|
|
|
}
|
|
|
- mv.addObject("produceId", produceId);
|
|
|
+ mv.addObject("produceId", produce.getProduceId());
|
|
|
//根据产品id查询产品类型
|
|
|
- Produce produce = new Produce();
|
|
|
- produce.setProduceId(Integer.valueOf(produceId));
|
|
|
- produce = produceService.getProduce(produce);
|
|
|
-
|
|
|
PtsMachineStatistics ptsMachineStatistics = new PtsMachineStatistics();
|
|
|
Calendar date = Calendar.getInstance();
|
|
|
String year = String.valueOf(date.get(Calendar.YEAR));//年
|