Browse Source

计划员查询列表、计划员新增修改试验计划等

liuwj 2 years ago
parent
commit
ba0f5a00fa

+ 20 - 44
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/controller/ItdmJCXMSHJHController.java

@@ -3,21 +3,13 @@ package org.jeecg.modules.itdmTestPlan.controller;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
-import org.jeecg.modules.itdmDevice.entity.ItdmDevice;
-import org.jeecg.modules.itdmDevice.service.IItdmDeviceService;
 import org.jeecg.modules.itdmTestPlan.entity.ItdmTestPlan;
 import org.jeecg.modules.itdmTestPlan.service.IItdmJCXMSHJHService;
 import org.jeecg.modules.itdmTestPlan.service.IItdmTestPlanService;
-import org.jeecg.modules.itdmTestPlan.vo.ItdmJCXMAndSYJHVO;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJHYQueryListVO;
-import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
-import org.jeecg.modules.weituo.entity.ItdmWeituoYangpin;
-import org.jeecg.modules.weituo.mapper.ItdmWeituoYangpinMapper;
-import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
-import org.jeecg.modules.weituo.vo.ItdmWeituoInfoInfoVO;
+import org.jeecg.modules.itdmTestPlan.vo.ItdmXMJLQueryListVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -44,6 +36,18 @@ public class ItdmJCXMSHJHController {
     private IItdmJCXMSHJHService iItdmJCXMSHJHService;
 
     /**
+     * 项目经理查询列表——先看一级列表
+     */
+    @ApiOperation(value="项目经理查询列表", notes="通过委托id查询,得到委托单的检测项目、试验计划部分信息")
+    @GetMapping(value = "/XMJLList")
+    public Result<List<ItdmXMJLQueryListVO>> XMJLList(@RequestParam("weituoNo") String weituoNo) {
+        List<ItdmXMJLQueryListVO> list = new ArrayList<>();
+        list.addAll(iItdmJCXMSHJHService.getXMJLFirstList(weituoNo));
+        list.addAll(iItdmJCXMSHJHService.getXMJLSecondList(weituoNo));
+        return Result.OK(list);
+    }
+
+    /**
      * 计划员查询列表
      */
     @ApiOperation(value="计划员查询列表", notes="通过委托id查询,得到委托单的检测项目、试验计划部分信息")
@@ -61,18 +65,9 @@ public class ItdmJCXMSHJHController {
     @PostMapping(value = "/addOrUpdate")
     public Result<String> addAndUpdate(@RequestBody List<ItdmJHYQueryListVO> list) {
         List<ItdmTestPlan> vos = new ArrayList<>();
-
+        String msg = "提交成功!";
         for(ItdmJHYQueryListVO vo:list){
-            ItdmTestPlan itdmTestPlan = new ItdmTestPlan();
-            itdmTestPlan.setWeituoId(vo.getWeituoId());
-            itdmTestPlan.setTestItemsId(vo.getTestItemsId());
-            itdmTestPlan.setWeituoYangpinId(vo.getYangpinId());
-            itdmTestPlan.setShebeiId(vo.getShebeiId());
-            itdmTestPlan.setPm(vo.getPm());
-            itdmTestPlan.setJihuaStartDate(vo.getJihuaStartDate());
-            itdmTestPlan.setJihuaEndDate(vo.getJihuaEndDate());
-            itdmTestPlan.setReportNo(vo.getReportNo());
-            itdmTestPlan.setChuanganqi(vo.getChuanganqi());
+            ItdmTestPlan itdmTestPlan = ItdmJHYQueryListVO.toItdmTestPlan(vo);
             if(vo.getTestPlanId()==null){ //新增试验计划
                 itdmTestPlan.setStatus(0);//试验计划初始状态为未确认0
                 itdmTestPlanService.save(itdmTestPlan);
@@ -81,34 +76,15 @@ public class ItdmJCXMSHJHController {
                 itdmTestPlan.setId(vo.getTestPlanId());
                 itdmTestPlanService.updateById(itdmTestPlan);
                 vos.add(itdmTestPlan);
+            }else if(vo.getStatus() != 0){
+                if(msg.equals("提交成功!")) msg="检测项目"+ vo.getTestItems();
+                else msg=msg+ "和"+ vo.getTestItems();
             }
         }
-        return Result.OK("提交成功!");
+        if(msg.equals("提交成功!")) return Result.OK(msg);
+        else return Result.OK(msg+"状态已确定或完成,无法修改!");
     }
 
-
-//    /**
-//     * 项目经理查询列表
-//     */
-//    @ApiOperation(value="项目经理查询列表", notes="通过委托id查询,得到一级:检测项目和试验计划,二级:检测项目和工单master")
-//    @GetMapping(value = "/XMJLList")
-//    public Result<List<ItdmJHYQueryListVO>> XMJLList(@Param("weituoId") String weituoId) {
-//        List<ItdmJHYQueryListVO> list = iItdmJCXMSHJHService.getAll(weituoId);
-//        return Result.OK(list);
-//    }
-
-
-
-//    /**
-//     * 计划员查询列表
-//     */
-//    @ApiOperation(value="计划员查询列表", notes="通过委托id查询,得到委托单的检测项目、试验计划部分信息")
-//    @GetMapping(value = "/JHYList")
-//    public Result<List<ItdmJHYQueryListVO>> JHYList(@RequestParam("weituoNo") String weituoNo) {
-//        List<ItdmJHYQueryListVO> list = iItdmJCXMSHJHService.getAll2(weituoNo);
-//        return Result.OK(list);
-//    }
-
     /**
      * 测试
      * */

+ 38 - 15
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/mapper/ItdmJCXMSHJHMapper.java

@@ -5,31 +5,44 @@ import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.itdmDevice.entity.ItdmDevice;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJCXMAndSYJHVO;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJHYQueryListVO;
+import org.jeecg.modules.itdmTestPlan.vo.ItdmXMJLQueryListVO;
 
 import java.util.List;
 
 public interface ItdmJCXMSHJHMapper {
 
-    @Select("select a.weituo_id, a.yangpin_id, a.test_items, a.id as testItemsId, " +
-            "b.id as testPlanId, b.shebei_id, b.pm, b.jihua_start_date, b.jihua_end_date, b.status, b.report_no, b.chuanganqi " +
+
+    /**
+     * 项目经理查询列表——二级列表
+     */
+    @Select("select a.weituo_id, a.yangpin_id, a.id as testItemsId, a.test_items, " +
+            "b.id as testPlanId, b.shebei_id, b.pm, m.start_date as jihuaStartDate, m.end_date as jihuaEndDate, b.status, b.report_no, b.chuanganqi, " +
+            "d.sample_name, e.device_name, m.jihua_shiyan_id as parent, m.shiiyan_type, m.worker, m.yangpin_count, m.neirong " +
+            "from itdm_gongdan_master m " +
+            "left join itdm_test_plan b on m.jihua_shiyan_id = b.id " +
+            "left join itdm_weituo_yangpin_extend a  on m.test_items_id = a.id " +
+            "left join itdm_weituo_yangpin d on m.weituo_yangpin_id = d.id " +
+            "left join itdm_device e on b.shebei_id = e.id " +
+            "where a.weituo_id = #{weituoId}")
+    List<ItdmXMJLQueryListVO> getXMJLSecondList(@Param("weituoId") String weituoId);
+
+    /**
+     * 项目经理查询列表——一级列表
+     */
+    @Select("select a.weituo_id, a.yangpin_id, a.id as testItemsId, a.test_items, " +
+            "b.id as testPlanId, b.shebei_id, b.pm, b.jihua_start_date, b.jihua_end_date, b.status, b.report_no, b.chuanganqi, " +
+            "d.sample_name, e.device_name " +
             "from itdm_weituo_yangpin_extend a " +
             "left join itdm_test_plan b on a.id = b.test_items_id " +
+            "left join itdm_weituo_yangpin d on a.yangpin_id = d.id " +
+            "left join itdm_device e on b.shebei_id = e.id " +
             "where a.weituo_id = #{weituoId}")
-    List<ItdmJCXMAndSYJHVO> getAll(@Param("weituoId") String weituoId);
-
-
-//    @Select("select a.weituo_id, a.yangpin_id, a.id as testItemsId, a.test_items, " +
-//            "b.id as testPlanId, b.shebei_id, b.pm, b.jihua_start_date, b.jihua_end_date, b.status, b.report_no, b.chuanganqi, " +
-//            "c.weituo_no, d.sample_name, e.device_name " +
-//            "from itdm_weituo_yangpin_extend a " +
-//            "left join itdm_test_plan b on a.id = b.test_items_id " +
-//            "left join itdm_weituo_info c on a.weituo_id = c.id " +
-//            "left join itdm_weituo_yangpin d on a.yangpin_id = d.id " +
-//            "left join itdm_device e on b.shebei_id = e.id " +
-//            "where a.weituo_id = #{weituoId}")
-//    List<ItdmJHYQueryListVO> getAll2(@Param("weituoId") String weituoId);
+    List<ItdmXMJLQueryListVO> getXMJLFirstList(@Param("weituoId") String weituoId);
 
 
+    /**
+     * 计划员查询列表
+     */
     @Select("select a.weituo_id, a.yangpin_id, a.id as testItemsId, a.test_items, " +
             "b.id as testPlanId, b.shebei_id, b.pm, b.jihua_start_date, b.jihua_end_date, b.status, b.report_no, b.chuanganqi, " +
             "d.sample_name, e.device_name " +
@@ -40,4 +53,14 @@ public interface ItdmJCXMSHJHMapper {
             "where a.weituo_id = #{weituoId}")
     List<ItdmJHYQueryListVO> getAll3(@Param("weituoId") String weituoId);
 
+    /**
+     * 计划员查询列表(测试)
+     */
+    @Select("select a.weituo_id, a.yangpin_id, a.test_items, a.id as testItemsId, " +
+            "b.id as testPlanId, b.shebei_id, b.pm, b.jihua_start_date, b.jihua_end_date, b.status, b.report_no, b.chuanganqi " +
+            "from itdm_weituo_yangpin_extend a " +
+            "left join itdm_test_plan b on a.id = b.test_items_id " +
+            "where a.weituo_id = #{weituoId}")
+    List<ItdmJCXMAndSYJHVO> getAll(@Param("weituoId") String weituoId);
+
 }

+ 17 - 4
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/service/IItdmJCXMSHJHService.java

@@ -1,17 +1,30 @@
 package org.jeecg.modules.itdmTestPlan.service;
 
 import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.itdmTestPlan.vo.ItdmJCXMAndSYJHVO;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJHYQueryListVO;
+import org.jeecg.modules.itdmTestPlan.vo.ItdmXMJLQueryListVO;
 
 import java.util.List;
 
 public interface IItdmJCXMSHJHService {
 
-    public List<ItdmJHYQueryListVO> getAll(@Param("weituoNo") String weituoId);
-
-//    public List<ItdmJHYQueryListVO> getAll2(@Param("weituoNo") String weituoId);
+    /**
+     * 项目经理查询列表——一级列表
+     */
+    public List<ItdmXMJLQueryListVO> getXMJLFirstList(String weituoNo);
+    /**
+     * 项目经理查询列表——二级列表
+     */
+    public List<ItdmXMJLQueryListVO> getXMJLSecondList(String weituoNo);
 
+    /**
+     * 计划员查询列表
+     */
     public List<ItdmJHYQueryListVO> getAll3(@Param("weituoNo") String weituoId);
 
+    /**
+     * 计划员查询列表(测试)
+     */
+    public List<ItdmJHYQueryListVO> getAll(@Param("weituoNo") String weituoId);
+
 }

+ 35 - 24
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/service/impl/ItdmJCXMSHJHServiceImpl.java

@@ -1,19 +1,14 @@
 package org.jeecg.modules.itdmTestPlan.service.impl;
 
 
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.itdmDevice.entity.ItdmDevice;
 import org.jeecg.modules.itdmDevice.mapper.ItdmDeviceMapper;
-import org.jeecg.modules.itdmDevice.service.IItdmDeviceService;
 import org.jeecg.modules.itdmTestPlan.mapper.ItdmJCXMSHJHMapper;
 import org.jeecg.modules.itdmTestPlan.service.IItdmJCXMSHJHService;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJCXMAndSYJHVO;
 import org.jeecg.modules.itdmTestPlan.vo.ItdmJHYQueryListVO;
-import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
-import org.jeecg.modules.weituo.entity.ItdmWeituoYangpin;
+import org.jeecg.modules.itdmTestPlan.vo.ItdmXMJLQueryListVO;
 import org.jeecg.modules.weituo.mapper.ItdmWeituoInfoMapper;
 import org.jeecg.modules.weituo.mapper.ItdmWeituoYangpinMapper;
-import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -36,28 +31,31 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
     @SuppressWarnings("all")
     private ItdmWeituoYangpinMapper itdmWeituoYangpinMapper;
 
-
-
-    public List<ItdmJHYQueryListVO> getAll(String weituoNo){
+    /**
+     * 项目经理查询列表——一级列表
+     */
+    public List<ItdmXMJLQueryListVO> getXMJLFirstList(String weituoNo){
         String weituoId = itdmWeituoInfoMapper.selectByWeituoNo(weituoNo);
-        List<ItdmJCXMAndSYJHVO> list = itdmJCXMSHJHMapper.getAll(weituoId);
-        List<ItdmJHYQueryListVO> list1 = list.stream().map(i->
-                ItdmJHYQueryListVO.toItdmJHYQueryListVO(i,itdmWeituoInfoMapper.selectById(i.getWeituoId()).getWeituoNo(),
-                        itdmWeituoYangpinMapper.selectById(i.getYangpinId()).getSampleName(),
-                        itdmDeviceMapper.selectById(i.getShebeiId()).getDeviceName())
-        ).collect(Collectors.toList());
-        return list1;
+        List<ItdmXMJLQueryListVO> list1 = itdmJCXMSHJHMapper.getXMJLFirstList(weituoId);
+        List<ItdmXMJLQueryListVO> list2 = list1.stream().map(i->
+                ItdmXMJLQueryListVO.toItdmXMJLQueryListVO(i,weituoNo)).collect(Collectors.toList());
+        return list2;
     }
 
+    /**
+     * 项目经理查询列表——二级列表
+     */
+    public List<ItdmXMJLQueryListVO> getXMJLSecondList(String weituoNo){
+        String weituoId = itdmWeituoInfoMapper.selectByWeituoNo(weituoNo);
+        List<ItdmXMJLQueryListVO> list1 = itdmJCXMSHJHMapper.getXMJLSecondList(weituoId);
+        List<ItdmXMJLQueryListVO> list2 = list1.stream().map(i->
+                ItdmXMJLQueryListVO.toItdmXMJLQueryListVO(i,weituoNo)).collect(Collectors.toList());
+        return list2;
+    }
 
-//    public List<ItdmJHYQueryListVO> getAll2(@Param("weituoNo") String weituoNo){
-//        String weituoId = itdmWeituoInfoMapper.selectByWeituoNo(weituoNo);
-//        List<ItdmJHYQueryListVO> list = itdmJCXMSHJHMapper.getAll2(weituoId);
-//        List<ItdmJHYQueryListVO> list1 = list.stream().map(i->
-//                ItdmJHYQueryListVO.toItdmJHYQueryListVO2(i)).collect(Collectors.toList());
-//        return list1;
-//    }
-
+    /**
+     * 计划员查询列表
+     */
     public List<ItdmJHYQueryListVO> getAll3(String weituoNo){
         String weituoId = itdmWeituoInfoMapper.selectByWeituoNo(weituoNo);
         List<ItdmJHYQueryListVO> list = itdmJCXMSHJHMapper.getAll3(weituoId);
@@ -66,4 +64,17 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
         return list1;
     }
 
+    /**
+     * 计划员查询列表(测试)
+     */
+    public List<ItdmJHYQueryListVO> getAll(String weituoNo){
+        String weituoId = itdmWeituoInfoMapper.selectByWeituoNo(weituoNo);
+        List<ItdmJCXMAndSYJHVO> list = itdmJCXMSHJHMapper.getAll(weituoId);
+        List<ItdmJHYQueryListVO> list1 = list.stream().map(i->
+                ItdmJHYQueryListVO.toItdmJHYQueryListVO(i,itdmWeituoInfoMapper.selectById(i.getWeituoId()).getWeituoNo(),
+                        itdmWeituoYangpinMapper.selectById(i.getYangpinId()).getSampleName(),
+                        itdmDeviceMapper.selectById(i.getShebeiId()).getDeviceName())
+        ).collect(Collectors.toList());
+        return list1;
+    }
 }

+ 46 - 19
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/vo/ItdmJHYQueryListVO.java

@@ -4,6 +4,7 @@ package org.jeecg.modules.itdmTestPlan.vo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecg.modules.itdmTestPlan.entity.ItdmTestPlan;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -87,6 +88,10 @@ public class ItdmJHYQueryListVO {
     @Excel(name = "持续时间", width = 20)
     @ApiModelProperty(value = "持续时间")
     private java.lang.Integer lastTime;
+    /**status转化*/
+    @Excel(name = "status转化", width = 15)
+    @ApiModelProperty(value = "status转化")
+    private java.lang.String statusC;
 
 
 
@@ -226,25 +231,7 @@ public class ItdmJHYQueryListVO {
         this.lastTime = lastTime;
     }
 
-    public static ItdmJHYQueryListVO toItdmJHYQueryListVO3(ItdmJHYQueryListVO vo, String weituoNo){
-        if(vo.getJihuaEndDate()!=null && vo.getTestItemsId()!=null){
-            int days = (int) ((vo.getJihuaEndDate().getTime() - vo.getJihuaStartDate().getTime()) / (1000*3600*24));
-            vo.setLastTime(days+1);
-        }
-        vo.setWeituoNo(weituoNo);
-        return vo;
-    }
-
-
-//    public static ItdmJHYQueryListVO toItdmJHYQueryListVO2(ItdmJHYQueryListVO vo){
-//        if(vo.getJihuaEndDate()!=null && vo.getTestItemsId()!=null){
-//            int days = (int) ((vo.getJihuaEndDate().getTime() - vo.getJihuaStartDate().getTime()) / (1000*3600*24));
-//            vo.setLastTime(days+1);
-//        }
-//        return vo;
-//    }
-
-
+    /**测试*/
     public static ItdmJHYQueryListVO toItdmJHYQueryListVO(ItdmJCXMAndSYJHVO itdmVO, String weituoNo, String sampleName, String deviceName){
         ItdmJHYQueryListVO vo = new ItdmJHYQueryListVO();
         vo.setWeituoId(itdmVO.getWeituoId());
@@ -270,5 +257,45 @@ public class ItdmJHYQueryListVO {
         return vo;
     }
 
+    /**填入委托编号,计算持续时间——计划员查询列表对象*/
+    public static ItdmJHYQueryListVO toItdmJHYQueryListVO3(ItdmJHYQueryListVO vo, String weituoNo){
+        if(vo.getJihuaEndDate()!=null && vo.getTestItemsId()!=null){
+            int days = (int) ((vo.getJihuaEndDate().getTime() - vo.getJihuaStartDate().getTime()) / (1000*3600*24));
+            vo.setLastTime(days+1);
+        }else {
+            int days = 1;
+            vo.setLastTime(days);//如果没有开始时间和结束时间,初始化开始时间为今天,持续时间为1为
+            vo.setJihuaStartDate(new Date());
+        }
+        if(vo.getStatus()==0) vo.setStatusC("未确认");
+        else if(vo.getStatus()==1) vo.setStatusC("已确认");
+        else if(vo.getStatus()==2) vo.setStatusC("完成");
+        vo.setWeituoNo(weituoNo);
+        return vo;
+    }
+
+    /**转化成试验计划对象——计划员新增或修改试验计划*/
+    public static ItdmTestPlan toItdmTestPlan(ItdmJHYQueryListVO vo){
+        ItdmTestPlan itdmTestPlan = new ItdmTestPlan();
+        itdmTestPlan.setWeituoId(vo.getWeituoId());
+        itdmTestPlan.setTestItemsId(vo.getTestItemsId());
+        itdmTestPlan.setWeituoYangpinId(vo.getYangpinId());
+        itdmTestPlan.setShebeiId(vo.getShebeiId());
+        itdmTestPlan.setPm(vo.getPm());
+        itdmTestPlan.setJihuaStartDate(vo.getJihuaStartDate());
+        int lastTime = vo.getLastTime();//通过持续时间计算结束时间,注意开始时间2023-5-21,持续时间1,则结束时间为2023-5-1
+        Date jihuaEndTime = new Date(vo.getJihuaStartDate().getTime() + (lastTime-1)*1000*3600*24);
+        itdmTestPlan.setJihuaEndDate(jihuaEndTime);
+        itdmTestPlan.setReportNo(vo.getReportNo());
+        itdmTestPlan.setChuanganqi(vo.getChuanganqi());
+        return  itdmTestPlan;
+    }
 
+    public String getStatusC() {
+        return statusC;
+    }
+
+    public void setStatusC(String statusC) {
+        this.statusC = statusC;
+    }
 }

+ 287 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmTestPlan/vo/ItdmXMJLQueryListVO.java

@@ -0,0 +1,287 @@
+package org.jeecg.modules.itdmTestPlan.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+public class ItdmXMJLQueryListVO {
+
+    /**委托id*/
+    @Excel(name = "委托id", width = 15)
+    @ApiModelProperty(value = "委托id")
+    private String weituoId;
+    /**样品id*/
+    @Excel(name = "样品id", width = 15)
+    @ApiModelProperty(value = "样品id")
+    private String yangpinId;
+    /**检测项目id*/
+    @Excel(name = "检测项目id", width = 15)
+    @ApiModelProperty(value = "检测项目id")
+    private java.lang.String testItemsId;
+    /**检测项目*/
+    @Excel(name = "检测项目", width = 15)
+    @ApiModelProperty(value = "检测项目")
+    private String testItems;
+    /**试验计划id*/
+    @Excel(name = "试验计划id", width = 15)
+    @ApiModelProperty(value = "试验计划id")
+    private String testPlanId;
+    /**设备id*/
+    @Excel(name = "设备id", width = 15)
+    @ApiModelProperty(value = "设备id")
+    private java.lang.String shebeiId;
+    /**项目经理*/
+    @Excel(name = "项目经理", width = 15)
+    @ApiModelProperty(value = "项目经理")
+    private java.lang.String pm;
+    /**计划开始日期*/
+    @Excel(name = "计划开始日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "计划开始日期")
+    private java.util.Date jihuaStartDate;
+    /**计划结束日期*/
+    @Excel(name = "计划结束日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "计划结束日期")
+    private java.util.Date jihuaEndDate;
+    /**状态*/
+    @Excel(name = "状态", width = 15, dicCode = "test_plan_status")
+    @Dict(dicCode = "test_plan_status")
+    @ApiModelProperty(value = "状态")
+    private java.lang.Integer status;
+    /**报告编号*/
+    @Excel(name = "报告编号", width = 15)
+    @ApiModelProperty(value = "报告编号")
+    private java.lang.String reportNo;
+    /**传感器*/
+    @Excel(name = "传感器", width = 20)
+    @ApiModelProperty(value = "传感器")
+    private java.lang.String chuanganqi;
+    /**委托编号*/
+    @Excel(name = "委托编号", width = 15)
+    @ApiModelProperty(value = "委托编号")
+    private String weituoNo;
+    /**样品名称*/
+    @Excel(name = "样品名称", width = 15)
+    @ApiModelProperty(value = "样品名称")
+    private java.lang.String sampleName;
+    /**设备名称*/
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private java.lang.String deviceName;
+    /**父id*/
+    @Excel(name = "父id", width = 20)
+    @ApiModelProperty(value = "父id")
+    private java.lang.String parent;
+    /**持续时间*/
+    @Excel(name = "持续时间", width = 20)
+    @ApiModelProperty(value = "持续时间")
+    private java.lang.Integer lastTime;
+    /**试验类型*/
+    @Excel(name = "试验类型", width = 15)
+    @ApiModelProperty(value = "试验类型")
+    private java.lang.String shiiyanType;
+    /**试验员*/
+    @Excel(name = "试验员", width = 15)
+    @ApiModelProperty(value = "试验员")
+    private java.lang.String worker;
+    /**委托样品数量*/
+    @Excel(name = "委托样品数量", width = 15)
+    @ApiModelProperty(value = "委托样品数量")
+    private java.lang.Integer yangpinCount;
+    /**内容*/
+    @Excel(name = "内容", width = 15)
+    @ApiModelProperty(value = "内容")
+    private java.lang.String neirong;
+
+
+
+    public String getWeituoId() {
+        return weituoId;
+    }
+
+    public void setWeituoId(String weituoId) {
+        this.weituoId = weituoId;
+    }
+
+    public String getYangpinId() {
+        return yangpinId;
+    }
+
+    public void setYangpinId(String yangpinId) {
+        this.yangpinId = yangpinId;
+    }
+
+    public String getTestItems() {
+        return testItems;
+    }
+
+    public void setTestItems(String testItems) {
+        this.testItems = testItems;
+    }
+
+    public String getShebeiId() {
+        return shebeiId;
+    }
+
+    public void setShebeiId(String shebeiId) {
+        this.shebeiId = shebeiId;
+    }
+
+    public String getPm() {
+        return pm;
+    }
+
+    public void setPm(String pm) {
+        this.pm = pm;
+    }
+
+    public String getWeituoNo() {
+        return weituoNo;
+    }
+
+    public void setWeituoNo(String weituoNo) {
+        this.weituoNo = weituoNo;
+    }
+
+    public String getSampleName() {
+        return sampleName;
+    }
+
+    public void setSampleName(String sampleName) {
+        this.sampleName = sampleName;
+    }
+
+    public String getDeviceName() {
+        return deviceName;
+    }
+
+    public void setDeviceName(String deviceName) {
+        this.deviceName = deviceName;
+    }
+
+    public Date getJihuaStartDate() {
+        return jihuaStartDate;
+    }
+
+    public void setJihuaStartDate(Date jihuaStartDate) {
+        this.jihuaStartDate = jihuaStartDate;
+    }
+
+    public Date getJihuaEndDate() {
+        return jihuaEndDate;
+    }
+
+    public void setJihuaEndDate(Date jihuaEndDate) {
+        this.jihuaEndDate = jihuaEndDate;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getReportNo() {
+        return reportNo;
+    }
+
+    public void setReportNo(String reportNo) {
+        this.reportNo = reportNo;
+    }
+
+    public String getChuanganqi() {
+        return chuanganqi;
+    }
+
+    public void setChuanganqi(String chuanganqi) {
+        this.chuanganqi = chuanganqi;
+    }
+
+    public String getParent() {
+        return parent;
+    }
+
+    public void setParent(String parent) {
+        this.parent = parent;
+    }
+
+    public String getTestPlanId() {
+        return testPlanId;
+    }
+
+    public void setTestPlanId(String testPlanId) {
+        this.testPlanId = testPlanId;
+    }
+
+    public String getTestItemsId() {
+        return testItemsId;
+    }
+
+    public void setTestItemsId(String testItemsId) {
+        this.testItemsId = testItemsId;
+    }
+
+    public Integer getLastTime() {
+        return lastTime;
+    }
+
+    public void setLastTime(Integer lastTime) {
+        this.lastTime = lastTime;
+    }
+
+
+    public String getShiiyanType() {
+        return shiiyanType;
+    }
+
+    public void setShiiyanType(String shiiyanType) {
+        this.shiiyanType = shiiyanType;
+    }
+
+    public String getWorker() {
+        return worker;
+    }
+
+    public void setWorker(String worker) {
+        this.worker = worker;
+    }
+
+    public Integer getYangpinCount() {
+        return yangpinCount;
+    }
+
+    public void setYangpinCount(Integer yangpinCount) {
+        this.yangpinCount = yangpinCount;
+    }
+
+    public String getNeirong() {
+        return neirong;
+    }
+
+    public void setNeirong(String neirong) {
+        this.neirong = neirong;
+    }
+
+
+    public static ItdmXMJLQueryListVO toItdmXMJLQueryListVO(ItdmXMJLQueryListVO vo, String weituoNo){
+        vo.setWeituoNo(weituoNo);
+        if(vo.getJihuaEndDate()!=null && vo.getTestItemsId()!=null){
+            int days = (int) ((vo.getJihuaEndDate().getTime() - vo.getJihuaStartDate().getTime()) / (1000*3600*24));
+            vo.setLastTime(days+1);
+        }
+        return vo;
+    }
+
+
+
+
+}

+ 1 - 4
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/mapper/ItdmWeituoInfoMapper.java

@@ -1,12 +1,9 @@
 package org.jeecg.modules.weituo.mapper;
 
-import java.util.List;
-
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
-import org.jeecg.modules.itdmTestPlan.vo.ItdmJCXMAndSYJHVO;
 import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
  * @Description: 委托信息