liuwj 1 år sedan
förälder
incheckning
9bb4f39b97
14 ändrade filer med 171 tillägg och 29 borttagningar
  1. 38 8
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/controller/ItdmGongdanDetailController.java
  2. 0 2
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/controller/ItdmJCXMSHJHController.java
  3. 4 1
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/convert/GongDanDetailConvert.java
  4. 4 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmGongdanDetailMapper.java
  5. 9 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmGongdanMasterMapper.java
  6. 35 2
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/xml/ItdmGongdanDetailMapper.xml
  7. 5 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/IItdmGongdanDetailService.java
  8. 7 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/impl/ItdmGongdanDetailServiceImpl.java
  9. 7 3
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/impl/ItdmJCXMSHJHServiceImpl.java
  10. 8 5
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/vo/ItdmGongdanDetailListVO.java
  11. 22 6
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/controller/ItdmWeituoInfoController.java
  12. 11 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/mapper/ItdmWeituoInfoMapper.java
  13. 8 0
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/service/IItdmWeituoInfoService.java
  14. 13 2
      itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/service/impl/ItdmWeituoInfoServiceImpl.java

+ 38 - 8
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/controller/ItdmGongdanDetailController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.itdmGongDan.controller;
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -14,18 +15,20 @@ import org.jeecg.modules.itdmGongDan.convert.GongDanDetailConvert;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
 import org.jeecg.modules.itdmGongDan.entity.ItdmTestPlan;
+import org.jeecg.modules.itdmGongDan.mapper.ItdmGongdanMasterMapper;
 import org.jeecg.modules.itdmGongDan.service.IItdmGongdanDetailService;
 import org.jeecg.modules.itdmGongDan.service.IItdmGongdanMasterService;
 import org.jeecg.modules.itdmGongDan.service.IItdmTestPlanService;
 import org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
+import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -40,28 +43,55 @@ import java.util.stream.Collectors;
 @Slf4j
 public class ItdmGongdanDetailController extends JeecgController<ItdmGongdanDetail, IItdmGongdanDetailService> {
 	@Autowired
+	@SuppressWarnings("all")
 	private IItdmGongdanDetailService itdmGongdanDetailService;
 	@Autowired
+	@SuppressWarnings("all")
 	private IItdmGongdanMasterService iItdmGongdanMasterService;
 	@Autowired
+	@SuppressWarnings("all")
 	private IItdmTestPlanService itdmTestPlanService;
+	@Autowired
+	@SuppressWarnings("all")
+	private ItdmGongdanMasterMapper itdmGongdanMasterMapper;
+	@Autowired
+	@SuppressWarnings("all")
+	private IItdmWeituoInfoService iItdmWeituoInfoService;
+
 
 	@ApiOperation(value="工单detail-分页列表查询", notes="工单detail-分页列表查询")
 	@GetMapping(value = "/list")
 	public Result<Page<ItdmGongdanDetailListVO>> queryPageList1(ItdmGongdanDetail itdmGongdanDetail,
+															@RequestParam(name="weituoId", defaultValue="") String weituoId,
 														   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 														   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 														   HttpServletRequest req) {
+
 		QueryWrapper<ItdmGongdanDetail> queryWrapper = QueryGenerator.initQueryWrapper(itdmGongdanDetail, req.getParameterMap());
+
+		List<String> woIdList = new ArrayList<>();
+		if(!weituoId.equals("")){ //前端有传过来委托单id
+			woIdList = itdmGongdanMasterMapper.selectWoIdListByWeituoId(weituoId);
+			if(woIdList != null && !woIdList.isEmpty() && woIdList.get(0)!=null){
+				queryWrapper.in("wo_id",woIdList);
+			}else return Result.OK(new Page<ItdmGongdanDetailListVO>());
+		}//否则直接查询所有
+
 		Page<ItdmGongdanDetail> page = new Page<ItdmGongdanDetail>(pageNo, pageSize);
 		Page<ItdmGongdanDetail> pageList = itdmGongdanDetailService.page(page, queryWrapper);
 
-		List<ItdmGongdanDetailListVO> list=pageList.getRecords().stream().map(i -> {
-			ItdmGongdanMaster master = iItdmGongdanMasterService.getById(i.getWoId());
-			ItdmTestPlan itdmTestPlan = itdmTestPlanService.getById(master.getJihuaShiyanId());
-			return GongDanDetailConvert.INSTANCE.toList(i, master,itdmTestPlan);
-		}).collect(Collectors.toList());
-		return Result.OK(GongDanDetailConvert.INSTANCE.converter(pageList,list));
+//		Page<ItdmGongdanDetail> page = new Page<ItdmGongdanDetail>(pageNo, pageSize);
+//		Page<ItdmGongdanDetail> pageList = itdmGongdanDetailService.getDetailListByWoIdList(page,woIdList);
+
+		if(pageList != null ){
+			List<ItdmGongdanDetailListVO> list=pageList.getRecords().stream().map(i -> {
+				ItdmGongdanMaster master = iItdmGongdanMasterService.getById(i.getWoId());
+				ItdmTestPlan itdmTestPlan = master==null?null:itdmTestPlanService.getById(master.getJihuaShiyanId());
+				ItdmWeituoInfo itdmWeituoInfo = itdmTestPlan==null?null:iItdmWeituoInfoService.getById(itdmTestPlan.getWeituoId());
+				return GongDanDetailConvert.INSTANCE.toList(i, master,itdmTestPlan,itdmWeituoInfo);
+			}).collect(Collectors.toList());
+			return Result.OK(GongDanDetailConvert.INSTANCE.converter(pageList,list));
+		}else return Result.OK(new Page<ItdmGongdanDetailListVO>());
 	}
 
 

+ 0 - 2
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/controller/ItdmJCXMSHJHController.java

@@ -59,8 +59,6 @@ public class ItdmJCXMSHJHController {
     @ApiOperation(value="项目经理新增或修改工单master", notes="项目经理新增或修改工单master")
     @PostMapping(value = "/XMJLAddOrUpdate")
     public Result<String> XMJLAddOrUpdate(@RequestBody ItdmXMJLQueryListVO vo) {
-        System.out.println("项目经理新增或修改工单master");
-//        System.out.println(JSON.toJSON(vo));
         return Result.OK(iItdmJCXMSHJHService.XMJLAddOrUpdate(vo));
     }
 

+ 4 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/convert/GongDanDetailConvert.java

@@ -9,6 +9,7 @@ import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
 import org.jeecg.modules.itdmGongDan.entity.ItdmTestPlan;
 import org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 import org.mapstruct.Mapper;
 import org.mapstruct.Mapping;
 import org.mapstruct.ReportingPolicy;
@@ -40,5 +41,7 @@ public interface GongDanDetailConvert {
     @Mapping(target ="weituoYangpinId",source ="master.weituoYangpinId")
     @Mapping(target ="shebeiId",source ="master.shebeiId")
     @Mapping(target ="createTime",source ="detail.createTime")
-    ItdmGongdanDetailListVO toList(ItdmGongdanDetail detail, ItdmGongdanMaster master, ItdmTestPlan itdmTestPlan);
+    @Mapping(target ="weituoClient",source ="itdmWeituoInfo.weituoClient")
+    @Mapping(target ="weituoNo",source ="itdmWeituoInfo.weituoNo")
+    ItdmGongdanDetailListVO toList(ItdmGongdanDetail detail, ItdmGongdanMaster master, ItdmTestPlan itdmTestPlan, ItdmWeituoInfo itdmWeituoInfo);
 }

+ 4 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmGongdanDetailMapper.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.itdmGongDan.mapper;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO;
@@ -15,4 +16,7 @@ import java.util.List;
  */
 public interface ItdmGongdanDetailMapper extends BaseMapper<ItdmGongdanDetail> {
     List<ItdmGongdanDetailListVO> getDetailList (Page<ItdmGongdanDetailListVO> page, String woId);
+
+    Page<ItdmGongdanDetail> getDetailListByWoIdList(Page<ItdmGongdanDetail> page,@Param("list") List<String> list);
+
 }

+ 9 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmGongdanMasterMapper.java

@@ -1,8 +1,12 @@
 package org.jeecg.modules.itdmGongDan.mapper;
 
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanMaster;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
+import java.util.List;
+
 /**
  * @Description: 工单master
  * @Author: jeecg-boot
@@ -11,4 +15,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ItdmGongdanMasterMapper extends BaseMapper<ItdmGongdanMaster> {
 
+    @Select("select m.id from itdm_gongdan_master m " +
+            "right join itdm_test_plan t on t.id = m.jihua_shiyan_id " +
+            "where t.weituo_id = #{weituoId}")
+    public List<String> selectWoIdListByWeituoId(@Param("weituoId") String weituoId);
+
 }

+ 35 - 2
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/xml/ItdmGongdanDetailMapper.xml

@@ -2,7 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.itdmGongDan.mapper.ItdmGongdanDetailMapper">
 
-    <resultMap id="ItdmGongdanDetailListVO" type="org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO" >
+    <resultMap id="ItdmGongdanDetailResult" type="org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail" >
+        <result column="id" property="id" jdbcType="VARCHAR"/>
+        <result column="wo_id" property="woId" jdbcType="VARCHAR"/>
+        <result column="shiji_shebei_id" property="shijiShebeiId" jdbcType="VARCHAR"/>
+        <result column="shiji_shiiyan_type" property="shijiShiiyanType" jdbcType="VARCHAR"/>
+        <result column="work_date" property="workDate" jdbcType="DATE"/>
+        <result column="start_time" property="startTime" jdbcType="VARCHAR"/>
+        <result column="end_time" property="endTime" jdbcType="VARCHAR"/>
+        <result column="shiji_work_date" property="shijiWorkDate" jdbcType="VARCHAR"/>
+        <result column="shiji_start_time" property="shijiStartTime" jdbcType="VARCHAR"/>
+        <result column="shiji_end_time" property="shijiEndTime" jdbcType="VARCHAR"/>
+        <result column="chuanganqi" property="chuanganqi" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <resultMap id="ItdmGongdanDetailListVOResult" type="org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO" >
         <result column="id" property="id" jdbcType="VARCHAR"/>
         <result column="wo_id" property="woId" jdbcType="VARCHAR"/>
         <result column="shiji_shebei_id" property="shijiShebeiId" jdbcType="VARCHAR"/>
@@ -28,7 +42,7 @@
     </resultMap>
 
 
-    <select id="getDetailList" parameterType="String"  resultMap="ItdmGongdanDetailListVO">
+    <select id="getDetailList" parameterType="String"  resultMap="ItdmGongdanDetailListVOResult">
         select d.id, d.wo_id, d.shiji_shebei_id, d.shiji_shiiyan_type, d.work_date, d.start_time, d.end_time,
                d.shiji_work_date, d.shiji_start_time, d.shiji_end_time, d.chuanganqi,
                m.jihua_shiyan_id, m.test_items_id, m.weituo_yangpin_id, m.shebei_id, m.shiiyan_type, m.worker, m.yangpin_count,
@@ -43,4 +57,23 @@ left join itdm_test_plan t on m.jihua_shiyan_id = t.id
     </select>
 
 
+    <select id="getDetailListByWoIdList" resultMap="ItdmGongdanDetailResult">
+
+        select id,wo_id,shiji_shebei_id,shiji_shiiyan_type,work_date,start_time,end_time,
+               shiji_work_date,shiji_start_time,shiji_end_time,chuanganqi
+
+        from itdm_gongdan_detail
+
+        <if test="list!=null and list.size()>0">
+
+        where wo_id in
+        <foreach item="item" collection="list" separator="," open="(" close=")" index="">
+            #{item}
+        </foreach>
+
+        </if>
+
+    </select>
+
+
 </mapper>

+ 5 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/IItdmGongdanDetailService.java

@@ -1,10 +1,13 @@
 package org.jeecg.modules.itdmGongDan.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.itdmGongDan.vo.ItdmGongdanDetailListVO;
 
+import java.util.List;
+
 /**
  * @Description: 工单detail
  * @Author: jeecg-boot
@@ -15,4 +18,6 @@ public interface IItdmGongdanDetailService extends IService<ItdmGongdanDetail> {
 
     public Page<ItdmGongdanDetailListVO> getDetailList(Page<ItdmGongdanDetailListVO> page, String woId);
 
+    public Page<ItdmGongdanDetail> getDetailListByWoIdList(Page<ItdmGongdanDetail> page,@Param("list") List<String> list);
+
 }

+ 7 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/impl/ItdmGongdanDetailServiceImpl.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.itdmGongDan.service.impl;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.itdmGongDan.entity.ItdmGongdanDetail;
 import org.jeecg.modules.itdmGongDan.mapper.ItdmGongdanDetailMapper;
 import org.jeecg.modules.itdmGongDan.service.IItdmGongdanDetailService;
@@ -10,6 +11,8 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import java.util.List;
+
 /**
  * @Description: 工单detail
  * @Author: jeecg-boot
@@ -27,4 +30,8 @@ public class ItdmGongdanDetailServiceImpl extends ServiceImpl<ItdmGongdanDetailM
         return page.setRecords(itdmGongdanDetailMapper.getDetailList(page, woId));
     }
 
+    public Page<ItdmGongdanDetail> getDetailListByWoIdList(Page<ItdmGongdanDetail> page,@Param("list") List<String> list){
+        return itdmGongdanDetailMapper.getDetailListByWoIdList(page,list);
+    }
+
 }

+ 7 - 3
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/service/impl/ItdmJCXMSHJHServiceImpl.java

@@ -91,6 +91,7 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
             if(gongdanMaster==null){//是新增的数据
                 ItdmGongdanMaster itdmGongdanMaster = ItdmXMJLQueryListVO.toItdmGongdanMaster(vo);
                 itdmGongdanMasterMapper.insert(itdmGongdanMaster);//新增一条工单master
+                System.out.println("======================================项目经理新增master" + itdmGongdanMaster.getId());
 
                 //修改工单master对应的试验计划,将状态改为已确认
                 ItdmTestPlan itdmTestPlan = itdmTestPlanMapper.selectById(vo.getParent());
@@ -102,7 +103,7 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
                 for (int i=1;i<=lastDay;i++){
                     Date workDate = new Date(startDate.getTime() + (i-1)*1000*3600*24);
                     ItdmGongdanDetail detail = new ItdmGongdanDetail();
-                    detail.setWoId(vo.getId());
+                    detail.setWoId(itdmGongdanMaster.getId());
                     detail.setWorkDate(workDate);
                     detail.setStartTime("00:00");
                     detail.setEndTime("23:59");
@@ -114,6 +115,7 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
                     //先修改工单master
                     ItdmGongdanMaster itdmGongdanMaster = ItdmXMJLQueryListVO.toItdmGongdanMaster(vo);
                     itdmGongdanMasterMapper.updateById(itdmGongdanMaster);
+                    System.out.println("======================================项目经理修改master" + vo.getId());
 
                     //修改工单master对应的试验计划,将状态改为已确认
                     ItdmTestPlan itdmTestPlan = itdmTestPlanMapper.selectById(vo.getParent());
@@ -181,13 +183,14 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
                 //同时新增一条一样的工单master
                 ItdmGongdanMaster master = ItdmJHYQueryListVO.toItdmGongdanMaster(vo);
                 itdmGongdanMasterMapper.insert(master);
+                System.out.println("======================================计划员新增试验计划新增master" + master.getId());
                 //再拆成工单detail,再插入新的工单detail
                 Date startDate = vo.getJihuaStartDate();
                 int lastDay = vo.getLastTime();
                 for (int i=1;i<=lastDay;i++){
                     Date workDate = new Date(startDate.getTime() + (i-1)*1000*3600*24);
                     ItdmGongdanDetail detail = new ItdmGongdanDetail();
-                    detail.setWoId(vo.getId());
+                    detail.setWoId(master.getId());
                     detail.setWorkDate(workDate);
                     detail.setStartTime("00:00");
                     detail.setEndTime("23:59");
@@ -215,13 +218,14 @@ public class ItdmJCXMSHJHServiceImpl implements IItdmJCXMSHJHService {
                 //新增一条一样的工单master
                 ItdmGongdanMaster master = ItdmJHYQueryListVO.toItdmGongdanMaster(vo);
                 itdmGongdanMasterMapper.insert(master);
+                System.out.println("======================================计划员修改试验计划新增master" + master.getId());
                 //再拆成工单detail,再插入新的工单detail
                 Date startDate = vo.getJihuaStartDate();
                 int lastDay = vo.getLastTime();
                 for (int i=1;i<=lastDay;i++){
                     Date workDate = new Date(startDate.getTime() + (i-1)*1000*3600*24);
                     ItdmGongdanDetail detail = new ItdmGongdanDetail();
-                    detail.setWoId(vo.getId());
+                    detail.setWoId(master.getId());
                     detail.setWorkDate(workDate);
                     detail.setStartTime("00:00");
                     detail.setEndTime("23:59");

+ 8 - 5
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/vo/ItdmGongdanDetailListVO.java

@@ -150,11 +150,14 @@ public class ItdmGongdanDetailListVO implements Serializable {
     @Dict(dictTable = "itdm_weituo_info", dicText = "weituo_no", dicCode = "id")
     private String weituoId;
 
-//    //来自于委托表(itdm_weituo_info),通过委托id(weituoId)查询
-//    /**委托编号*/
-//    @Excel(name = "委托编号", width = 15)
-//    @ApiModelProperty(value = "委托编号")
-//    private String weituoNo;
+    //来自于委托表(itdm_weituo_info),通过委托id(weituoId)查询
+    @Excel(name = "委托单位", width = 15)
+    @ApiModelProperty(value = "委托单位")
+    private String weituoClient;
+    /**委托编号*/
+    @Excel(name = "委托编号", width = 15)
+    @ApiModelProperty(value = "委托编号")
+    private String weituoNo;
 //
 //    //来自于样品表(itdm_weituo_yangpin),通过样品id(weituoYangpinId)查询
 //    /**样品名称*/

+ 22 - 6
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/controller/ItdmWeituoInfoController.java

@@ -56,7 +56,23 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, IItdmWeituoInfoService> {
 	@Autowired
 	private IItdmWeituoInfoService itdmWeituoInfoService;
-	
+
+
+
+	/**根据委托单位查询委托信息列表*/
+	@ApiOperation(value="根据委托单位查询委托信息列表", notes="根据委托单位查询委托信息列表")
+	@GetMapping(value = "/weituoNoList")
+	public Result<List<ItdmWeituoInfo>> selectWTListByClient(@RequestParam(name="weituoClient") String weituoClient){
+		return Result.OK(itdmWeituoInfoService.selectWTListByClient(weituoClient));
+	}
+
+	 /**查询委托单位名称(不重复)*/
+	@ApiOperation(value="查询委托单位列表", notes="查询委托单位列表")
+	@GetMapping(value = "/distinctClientList")
+	public Result<List<String>> selectDistinctClientList(){
+		return Result.OK(itdmWeituoInfoService.selectDistinctClientList());
+	}
+
 	/**
 	 * 分页列表查询
 	 *
@@ -78,7 +94,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
 		IPage<ItdmWeituoInfo> pageList = itdmWeituoInfoService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
-	
+
 	/**
 	 *   添加
 	 *
@@ -93,7 +109,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
 		itdmWeituoInfoService.saveWeituo(itdmWeituoInfo);
 		return Result.OK("添加成功!");
 	}
-	
+
 	/**
 	 *  编辑
 	 *
@@ -109,7 +125,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
 
 		return Result.OK("编辑成功!");
 	}
-	
+
 	/**
 	 *   通过id删除
 	 *
@@ -124,7 +140,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
 		itdmWeituoInfoService.deleteById(id);
 		return Result.OK("删除成功!");
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -139,7 +155,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
 		this.itdmWeituoInfoService.deleteByIds(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *

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

@@ -5,6 +5,8 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 
+import java.util.List;
+
 /**
  * @Description: 委托信息
  * @Author: jeecg-boot
@@ -13,6 +15,15 @@ import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
  */
 public interface ItdmWeituoInfoMapper extends BaseMapper<ItdmWeituoInfo> {
 
+
+    /**根据委托单位查询委托信息列表*/
+    @Select("select * from itdm_weituo_info where weituo_client = #{weituoClient}")
+    public List<ItdmWeituoInfo> selectWTListByClient(@Param("weituoClient") String weituoClient);
+
+    /**查询委托单位名称(不重复)*/
+    @Select("select distinct weituo_client from itdm_weituo_info")
+    public List<String> selectDistinctClientList();
+
     /**根据委托查询委托id*/
     @Select("select id from itdm_weituo_info where weituo_no = #{weituoNo}")
     String selectByWeituoNo(@Param("weituoNo") String weituoNo);

+ 8 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/service/IItdmWeituoInfoService.java

@@ -1,11 +1,13 @@
 package org.jeecg.modules.weituo.service;
 
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.weituo.dto.WeituoInsertCommand;
 import org.jeecg.modules.weituo.dto.WeituoUpdateCommand;
 import org.jeecg.modules.weituo.vo.ItdmWeituoInfoInfoVO;
 
 import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
@@ -18,6 +20,12 @@ import java.util.List;
 public interface IItdmWeituoInfoService extends IService<ItdmWeituoInfo> {
 
 
+    /**根据委托单位查询委托信息列表*/
+    public List<ItdmWeituoInfo> selectWTListByClient(String weituoClient);
+
+    /**查询委托单位名称(不重复)*/
+    public List<String> selectDistinctClientList();
+
     public void saveWeituo(WeituoInsertCommand command);
 
 

+ 13 - 2
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/service/impl/ItdmWeituoInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.weituo.service.impl;
 
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.modules.weituo.common.ShenheStatus;
 import org.jeecg.modules.weituo.convert.WeituoConvert;
@@ -16,8 +17,6 @@ import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
 import org.jeecg.modules.weituo.vo.ItdmWeituoInfoInfoVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
@@ -40,6 +39,18 @@ public class ItdmWeituoInfoServiceImpl extends ServiceImpl<ItdmWeituoInfoMapper,
     @Autowired
     private ItdmWeituoYangpinExtendMapper yangpinExtendMapper;
 
+    @Autowired
+    private ItdmWeituoInfoMapper itdmWeituoInfoMapper;
+
+    /**根据委托单位查询委托信息列表*/
+    public List<ItdmWeituoInfo> selectWTListByClient(String weituoClient){
+        return itdmWeituoInfoMapper.selectWTListByClient(weituoClient);
+    }
+
+    /**查询委托单位名称(不重复)*/
+    public List<String> selectDistinctClientList(){
+        return itdmWeituoInfoMapper.selectDistinctClientList();
+    }
 
     @Transactional
     @Override