Browse Source

fix 数据确认、附件确认 等 bug

32197351@qq.com 1 year ago
parent
commit
67f977dbef

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/baogao/service/impl/ItdmBaogaoServiceImpl.java

@@ -216,7 +216,7 @@ public class ItdmBaogaoServiceImpl extends ServiceImpl<ItdmBaogaoMapper, ItdmBao
     private List<String> getBaogaoImage(ItdmBaogaoCreateDTO dto) {
 
 
-        return tdmTestPlanMapper.getImageByShiyanid(dto.getTestItemsIds())
+        return tdmTestPlanMapper.getImageByShiyanid(dto.getWeituoId())
                 .stream().distinct().collect(Collectors.toList());
     }
 

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/ItdmTestPlanMapper.java

@@ -22,7 +22,7 @@ public interface ItdmTestPlanMapper extends BaseMapper<ItdmTestPlan> {
     public List<String> geSBByShiyanid(@Param("list") List<String> list);
 
 
-    public  List<String> getImageByShiyanid(@Param("list") List<String> list);
+    public  List<String> getImageByShiyanid(@Param("weituoId") String weituoId);
 
 
     public List<Map<String, Object>> getShujuByShiyanid(@Param("list") List<String> list);

+ 3 - 11
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmGongDan/mapper/xml/ItdmTestPlanMapper.xml

@@ -43,16 +43,8 @@
 
 
         select c.extra_pic
-        from itdm_gongdan_master as b
-
-        inner join itdm_gongdan_image c on b.id = c.wo_id
-
-        where b.test_items_id in
-
-
-        <foreach item="item" collection="list" separator="," open="(" close=")" index="">
-            #{item}
-        </foreach>
+        from itdm_gongdan_image as c
+        where b.weituo_id =#{weituoId}
         and c.extra_pic is not null
 
     </select>
@@ -69,7 +61,7 @@
         <foreach item="item" collection="list" separator="," open="(" close=")" index="">
             #{item}
         </foreach>
-        order by c.shiyan_date_time,c.shiyan_time
+        order by c.shiyan_date_time,c.shiyan_time,c.shiyan_type
     </select>
     <select id="getByweituoNO" resultType="java.lang.String">
 

+ 7 - 14
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmgongdanshuju/controller/ItdmGongdanshujuController.java

@@ -1,27 +1,20 @@
 package org.jeecg.modules.itdmgongdanshuju.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
+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.common.system.query.QueryGenerator;
+import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanDto;
 import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanEditListDto;
 import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanUploadDto;
-import org.jeecg.modules.weituo.dto.WeituoInsertCommand;
-import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
-import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
-import org.jeecg.modules.weituochaxun.vo.ItdmWeituoAllVO;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-
-import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanDto;
 import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanShuju;
 import org.jeecg.modules.itdmgongdanshuju.service.ItdmGongdanShujuService;
+import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.Api;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
@@ -126,9 +119,9 @@ public class ItdmGongdanshujuController {
     @ApiOperation(value = "工单数据-查询图片", notes = "工单数据-查询图片")
     //@RequiresPermissions("org.jeecg.modules:itdm_gongdan_shuju:edit")
     @RequestMapping(value = "/getUpdate", method = {RequestMethod.GET})
-    public Result<String> getUpdate(String woId) {
+    public Result<String> getUpdate(String weituoId) {
 
-        return Result.OK(itdmGongdanShujuService.getUpdate(woId));
+        return Result.OK(itdmGongdanShujuService.getUpdate(weituoId));
     }
 
 

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmgongdanshuju/dto/ItdmGongdanUploadDto.java

@@ -15,7 +15,7 @@ public class ItdmGongdanUploadDto implements Serializable {
     private static final long serialVersionUID = 1L;
 
 	/**工单id*/
-    private String woId;
+    private String weituoId;
 
 	/**实绩试验类型*/
     private String images;

+ 5 - 5
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmgongdanshuju/entity/ItdmGongdanImage.java

@@ -21,7 +21,7 @@ import lombok.experimental.Accessors;
 /**
  * @Description: 工单图片附件
  * @Author: jeecg-boot
- * @Date:   2023-06-12
+ * @Date:   2023-06-14
  * @Version: V1.0
  */
 @Data
@@ -55,10 +55,10 @@ public class ItdmGongdanImage implements Serializable {
 	/**所属部门*/
     @ApiModelProperty(value = "所属部门")
     private String sysOrgCode;
-	/**工单id*/
-	@Excel(name = "工单id", width = 15)
-    @ApiModelProperty(value = "工单id")
-    private String woId;
+	/**委托id*/
+	@Excel(name = "委托id", width = 15)
+    @ApiModelProperty(value = "委托id")
+    private String weituoId;
 	/**图片附件*/
 	@Excel(name = "图片附件", width = 15)
     @ApiModelProperty(value = "图片附件")

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmgongdanshuju/service/ItdmGongdanShujuService.java

@@ -19,7 +19,7 @@ public interface ItdmGongdanShujuService extends IService<ItdmGongdanShuju> {
 
     public void editList(ItdmGongdanEditListDto itdmGongdanShuju);
 
-    String getUpdate(String woId);
+    String getUpdate(String weituoId);
 
 }
 

+ 12 - 11
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/itdmgongdanshuju/service/impl/ItdmGongdanShujuServiceImpl.java

@@ -7,21 +7,17 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 import org.apache.commons.lang3.StringUtils;
-import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.modules.itdmDataHistory.entity.ItdmWenxiang;
 import org.jeecg.modules.itdmDataHistory.mapper.ItdmWenxiangMapper;
 import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanDto;
 import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanEditListDto;
 import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanUploadDto;
-import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanDetail;
 import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanImage;
 import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanShuju;
-import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanDetail1Mapper;
 import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanImageMapper;
 import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanShujuMapper;
 import org.jeecg.modules.itdmgongdanshuju.service.ItdmGongdanShujuService;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -30,7 +26,6 @@ import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * @Description: 委托信息
@@ -57,7 +52,11 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
     public Boolean generate(ItdmGongdanDto itdmGongdanDto) {
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
         List<ItdmGongdanShuju> detail = itdmGongdanShujuMapper.selectList(new QueryWrapper<ItdmGongdanShuju>()
-                .eq("wo_id", itdmGongdanDto.getWoId()).eq("shiyan_date_time", itdmGongdanDto.getRiqi()));
+                .eq("wo_id", itdmGongdanDto.getWoId()).eq("shiyan_date_time", itdmGongdanDto.getRiqi())
+                .between("shiyan_time", itdmGongdanDto.getShiyanKaishitime(), itdmGongdanDto.getShiyanJieshutime())
+
+        );
+
 
         if (detail.size() > 0) {
             throw new JeecgBootException("当前工单当前已经有数据,不能重复生成数据(请检查时间是否重合)");
@@ -126,12 +125,13 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
     @Override
     public void upload(ItdmGongdanUploadDto upload) {
 
-        ItdmGongdanImage itdmGong = gongdanImageMapper.selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class).eq(ItdmGongdanImage::getWoId, upload.getWoId()));
+        ItdmGongdanImage itdmGong = gongdanImageMapper
+                .selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class).eq(ItdmGongdanImage::getWeituoId, upload.getWeituoId()));
 
 
         if (itdmGong == null) {
             ItdmGongdanImage itdmGong1 = new ItdmGongdanImage();
-            itdmGong1.setWoId(upload.getWoId());
+            itdmGong1.setWeituoId(upload.getWeituoId());
             itdmGong1.setExtraPic(upload.getImages());
             gongdanImageMapper.insert(itdmGong1);
         } else {
@@ -173,13 +173,14 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
 
 
     @Override
-    public String getUpdate(String woId) {
+    public String getUpdate(String weituoId) {
         ItdmGongdanImage itdmGong = gongdanImageMapper.selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class)
-                .eq(ItdmGongdanImage::getWoId, woId).last("limit 1"));
+                .eq(ItdmGongdanImage::getWeituoId, weituoId).last("limit 1"));
 
         if (itdmGong == null) {
-            return null;
+            return "";
         }
+
         return itdmGong.getExtraPic();
     }
 

+ 5 - 2
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituochaxun/mapper/xml/ItdmWeituochaxunMapper.xml

@@ -8,8 +8,8 @@
 
     <select id="listAlls" resultType="org.jeecg.modules.weituochaxun.vo.ItdmWeituoAllVO">
         SELECT * FROM itdm_weituo_yangpin_extend iwye
-                          LEFT JOIN itdm_weituo_yangpin iwy on iwye.yangpin_id = iwy.id
-                          LEFT JOIN itdm_weituo_info iwi on iwye.weituo_id = iwi.id
+        inner JOIN itdm_weituo_yangpin iwy on iwye.yangpin_id = iwy.id
+        inner JOIN itdm_weituo_info iwi on iwye.weituo_id = iwi.id
         <where>
             <if test=" vo.weituoClient!=null ">
                 and iwi.weituo_client like CONCAT('%', #{vo.weituoClient},'%')
@@ -20,6 +20,9 @@
             <if test=" vo.id!=null ">
                 and iwye.id=#{vo.id} or iwy.id=#{vo.id} or iwi.id=#{vo.id}
             </if>
+            <if test=" vo.shenheStatus!=null ">
+                and iwi.shenhe_status=#{vo.shenheStatus}
+            </if>
         </where>
     </select>
 

+ 4 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituochaxun/vo/ItdmWeituoAllVO.java

@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Getter;
 import lombok.Setter;
+import org.jeecg.common.aspect.annotation.Dict;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -52,6 +53,9 @@ public class ItdmWeituoAllVO implements Serializable {
     private String bgxs;
     /**特殊要求*/
     private String teshuyaoqiu;
+
+    @Dict(dicCode = "shenhe_status")
+
     /**审核状态*/
     private String shenheStatus;
     /**审核错误原因*/