Browse Source

1.查询评估对象列表,产品号为空时改为只查询未出具产品的评估对象
2.产品接口修改
3.评估对象新增审核定价接口

GouGengquan 1 year ago
parent
commit
34a60d9cb9

+ 9 - 0
biz-base/src/main/java/com/dayou/controller/AssetsEvaluationTargetController.java

@@ -95,6 +95,15 @@ public class AssetsEvaluationTargetController extends BaseController {
         return RestResponse.data(ret);
     }
 
+    /**
+     * 评估对象审核定价
+     * @param assetsEvaluationTarget 审核定价信息
+     * @return RestResponse<Boolean>
+     */
+    @PutMapping("/checkValue")
+    public RestResponse<Boolean> checkValue(@RequestBody AssetsEvaluationTarget assetsEvaluationTarget) {
+        return RestResponse.data(assetsEvaluationTargetService.checkValue(assetsEvaluationTarget));
+    }
 
 }
 

+ 9 - 4
biz-base/src/main/java/com/dayou/controller/AssetsProductionController.java

@@ -58,9 +58,9 @@ public class AssetsProductionController extends BaseController {
     }
 
     /**
-     * 资产产品表详情
+         * 资产产品表详情
      */
-    @GetMapping("/{id}")
+    @GetMapping("detail/{id}")
     public RestResponse<AssetsProduction> detail(@PathVariable Long id){
         AssetsProduction xAssetsProduction =assetsProductionService.detail(id);
         return RestResponse.data(xAssetsProduction);
@@ -149,9 +149,14 @@ public class AssetsProductionController extends BaseController {
         return RestResponse.data(assetsProductionService.getProductionList(aProListSelectDTO));
     }
 
+    /**
+     * 查询该产品是否已有提交的流程
+     * @param aProListSelectDTO 查询dto
+     * @return RestResponse<Integer>
+     */
     @GetMapping("/getInatanceCount")
-    public Integer getInatanceCount(AProListSelectDTO aProListSelectDTO) {
-        return assetsProductionService.getInatanceCount(aProListSelectDTO);
+    public RestResponse<Integer> getInatanceCount(AProListSelectDTO aProListSelectDTO) {
+        return RestResponse.data(assetsProductionService.getInatanceCount(aProListSelectDTO));
     }
 
 }

+ 7 - 0
dao/src/main/java/com/dayou/mapper/AssetsEvaluationTargetMapper.java

@@ -38,4 +38,11 @@ public interface AssetsEvaluationTargetMapper extends CustomBaseMapper<AssetsEva
      * @return List<String>
      */
     List<String> getProductionNoList(@Param("businessId") Long businessId);
+
+    /**
+     * 评估对象审核定价
+     * @param assetsEvaluationTarget 审核定价信息
+     * @return Boolean
+     */
+    Boolean checkValue(AssetsEvaluationTarget assetsEvaluationTarget);
 }

+ 14 - 3
dao/src/main/resources/mapper/AssetsEvaluationTargetMapper.xml

@@ -62,9 +62,9 @@
         <if test="productionNo != null and productionNo != '' ">
             AND target.production_no = #{productionNo}
         </if>
-<!--        <if test="productionNo == null or productionNo == '' ">-->
-<!--            AND create_production_date IS NULL-->
-<!--        </if>-->
+        <if test="productionNo == null or productionNo == '' ">
+            AND create_production_date IS NULL
+        </if>
         AND target.deleted = 0
     </select>
 
@@ -86,4 +86,15 @@
         AND production_no != ''
     </select>
 
+    <!--评估对象审核定价-->
+    <update id="checkValue">
+        UPDATE assets_evaluation_target
+        SET check_value = #{checkValue},
+            evaluation_method_id = #{evaluationMethodId},
+            choice_evaluation_method_id = #{choiceEvaluationMethodId}
+        WHERE id = #{id}
+        AND assets_id = #{assetsId}
+        AND deleted = 0
+    </update>
+
 </mapper>

+ 1 - 3
dao/src/main/resources/mapper/AssetsProductionMapper.xml

@@ -109,9 +109,7 @@
         <if test="productionNo != null and productionNo != '' ">
             AND production_no = #{productionNo}
         </if>
-        <if test="productionNo == null or productionNo == '' ">
-            AND create_production_date IS NOT NULL
-        </if>
+        AND create_production_date IS NOT NULL
         AND deleted = 0
     </select>
 

+ 7 - 0
service/src/main/java/com/dayou/service/IAssetsEvaluationTargetService.java

@@ -36,4 +36,11 @@ public interface IAssetsEvaluationTargetService extends IService<AssetsEvaluatio
 
         Boolean delete(Long id);
 
+        /**
+         * 评估对象审核定价
+         * @param assetsEvaluationTarget 审核定价信息
+         * @return Boolean
+         */
+        Boolean checkValue(AssetsEvaluationTarget assetsEvaluationTarget);
+
 }

+ 10 - 0
service/src/main/java/com/dayou/service/impl/AssetsEvaluationTargetServiceImpl.java

@@ -64,4 +64,14 @@ public class AssetsEvaluationTargetServiceImpl extends ServiceImpl<AssetsEvaluat
         //逻辑删除
         return this.removeById(id);
     }
+
+    /**
+     * 评估对象审核定价
+     * @param assetsEvaluationTarget 审核定价信息
+     * @return Boolean
+     */
+    @Override
+    public Boolean checkValue(AssetsEvaluationTarget assetsEvaluationTarget) {
+        return assetsEvaluationTargetMapper.checkValue(assetsEvaluationTarget);
+    }
 }

+ 7 - 0
service/src/main/java/com/dayou/service/impl/AssetsProductionServiceImpl.java

@@ -5,10 +5,12 @@ import com.dayou.dto.AProListSelectDTO;
 import com.dayou.dto.AssetsProductionDetailDTO;
 import com.dayou.dto.TaskRecordDTO;
 import com.dayou.entity.AssetsProduction;
+import com.dayou.entity.BusinessProductionPerformance;
 import com.dayou.entity.WorkFlowNodeInstance;
 import com.dayou.mapper.AssetsProductionMapper;
 import com.dayou.service.IAssetsProductionService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dayou.service.IBusinessProductionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -46,6 +48,9 @@ public class AssetsProductionServiceImpl extends ServiceImpl<AssetsProductionMap
     @Autowired
     private AssetsProductionMapper assetsProductionMapper;
 
+    @Autowired
+    private IBusinessProductionService businessProductionService;
+
     /**
      * 根据资产业务id查询资产业务产品
      *
@@ -119,6 +124,8 @@ public class AssetsProductionServiceImpl extends ServiceImpl<AssetsProductionMap
         if (count > 0){
             return null;
         }
+        // 生成产品二维码
+        assetsProduction.setQrCode(businessProductionService.doCreateNormalCode(assetsProduction.getProductionType(), assetsProduction.getProductionNo()));
         return assetsProductionMapper.writeAssetsProduction(assetsProduction);
     }