wangxin 1 жил өмнө
parent
commit
9f83e2c638

+ 15 - 20
src/main/java/cn/ezhizao/project/business/deptProcess/controller/BizDeptProcessController.java

@@ -32,8 +32,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/business/deptProcess")
-public class BizDeptProcessController extends BaseController
-{
+public class BizDeptProcessController extends BaseController {
     @Resource
     private IBizDeptProcessService bizDeptProcessService;
 
@@ -54,8 +53,7 @@ public class BizDeptProcessController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:list')")
     @PostMapping("/list")
-    public AjaxResult list(@RequestBody Map<String, Object> data) throws NoSuchFieldException, IllegalAccessException
-    {
+    public AjaxResult list(@RequestBody Map<String, Object> data) throws NoSuchFieldException, IllegalAccessException {
         List<String> statusList = Arrays.asList("0", "1", "2");
         Long deptId = Long.parseLong(data.get("deptId").toString());
         List<BizDeptProcess> deptProcesses = bizDeptProcessService.query().eq("dept_id", deptId).list();
@@ -71,10 +69,11 @@ public class BizDeptProcessController extends BaseController
             planDetailId = Long.parseLong(data.get("planDetailId").toString());
             BizProductionPlanDetail productionPlanDetail = bizProductionPlanDetailService.getById(planDetailId);
             List<BizTechnologicalProcessDetail> technologicalProcessDetails = bizTechnologicalProcessDetailService.query()
-                .eq("technological_process_id", productionPlanDetail.getTechnologicalProcessId())
-                .in("process_id", deptProcessIds)
-                .orderByAsc("process_step_number")
-                .list();
+                    .eq("technological_process_id", productionPlanDetail.getTechnologicalProcessId())
+                    .ne("tenant_id", 9)
+                    .in("process_id", deptProcessIds)
+                    .orderByAsc("process_step_number")
+                    .list();
 
             return success(technologicalProcessDetails);
         }
@@ -106,14 +105,14 @@ public class BizDeptProcessController extends BaseController
         List<BizDeptProcess> list = bizDeptProcessService.getSpecialDeptProcessList();
         return success(list);
     }
+
     /**
      * 导出deptProcess列表
      */
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:export')")
     @Log(title = "deptProcess", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, BizDeptProcess bizDeptProcess) throws NoSuchFieldException, IllegalAccessException
-    {
+    public void export(HttpServletResponse response, BizDeptProcess bizDeptProcess) throws NoSuchFieldException, IllegalAccessException {
         setTenantId(bizDeptProcess);
         List<BizDeptProcess> list = bizDeptProcessService.getList(bizDeptProcess);
         ExcelUtil<BizDeptProcess> util = new ExcelUtil<BizDeptProcess>(BizDeptProcess.class);
@@ -125,8 +124,7 @@ public class BizDeptProcessController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(bizDeptProcessService.getById(id));
     }
 
@@ -136,11 +134,10 @@ public class BizDeptProcessController extends BaseController
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:add')")
     @Log(title = "deptProcess", businessType = BusinessType.INSERT)
     @PostMapping("/save")
-    public AjaxResult add(@RequestBody List<BizDeptProcess> bizDeptProcess) throws NoSuchFieldException, IllegalAccessException
-    {
+    public AjaxResult add(@RequestBody List<BizDeptProcess> bizDeptProcess) throws NoSuchFieldException, IllegalAccessException {
         final String tenantId = request.getHeader("tenantId");
         for (BizDeptProcess deptProcess : bizDeptProcess
-                ) {
+        ) {
             deptProcess.setTenantId(Long.valueOf(tenantId));
         }
         List<BizDeptProcess> oldList = bizDeptProcessService.query().eq("dept_id", bizDeptProcess.get(0).getDeptId()).eq("tenant_id", bizDeptProcess.get(0).getTenantId()).list();
@@ -154,8 +151,7 @@ public class BizDeptProcessController extends BaseController
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:edit')")
     @Log(title = "deptProcess", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody BizDeptProcess bizDeptProcess) throws NoSuchFieldException, IllegalAccessException
-    {
+    public AjaxResult edit(@RequestBody BizDeptProcess bizDeptProcess) throws NoSuchFieldException, IllegalAccessException {
         final String tenantId = request.getHeader("tenantId");
         bizDeptProcess.setTenantId(Long.valueOf(tenantId));
         return toAjax(bizDeptProcessService.updateById(bizDeptProcess));
@@ -166,9 +162,8 @@ public class BizDeptProcessController extends BaseController
      */
 //    @PreAuthorize("@ss.hasPermi('business:deptProcess:remove')")
     @Log(title = "deptProcess", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable List<Long> ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids) {
         return toAjax(bizDeptProcessService.removeBatchByIds(ids));
     }
 }

+ 10 - 1
src/main/java/cn/ezhizao/project/business/product/controller/BizProcessInspecionController.java

@@ -83,7 +83,16 @@ public class BizProcessInspecionController extends BaseController
         List<BizProcessInspecion> list = bizProcessInspecionService.getList(bizProcessInspecion);
         return getDataTable(list);
     }
-
+    /**
+     * 查询序检主列表(外协序检)
+     */
+//    @PreAuthorize("@ss.hasPermi('business:inspecion:list')")
+    @PostMapping("/outsourcedlist")
+    public TableDataInfo outsourcedlist(@RequestBody BizProcessInspecion bizProcessInspecion) throws NoSuchFieldException, IllegalAccessException
+    {
+        List<BizProcessInspecion> list = bizProcessInspecionService.getOutsourcedlist(bizProcessInspecion);
+        return getDataTable(list);
+    }
     /**
      *
      * 查询产品信息

+ 2 - 0
src/main/java/cn/ezhizao/project/business/product/mapper/BizProcessInspecionMapper.java

@@ -27,4 +27,6 @@ public interface BizProcessInspecionMapper extends BaseMapper<BizProcessInspecio
      * @return 删除结果
     */
     public int physicalDelete(BizProcessInspecion bizProcessInspecion);
+
+    List<BizProcessInspecion> getOutsourcedlist(BizProcessInspecion bizProcessInspecion);
 }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/product/service/IBizProcessInspecionService.java

@@ -28,4 +28,5 @@ public interface IBizProcessInspecionService extends IService<BizProcessInspecio
      */
     public int physicalDelete(BizProcessInspecion bizProcessInspecion);
 
+    List<BizProcessInspecion> getOutsourcedlist(BizProcessInspecion bizProcessInspecion);
 }

+ 6 - 1
src/main/java/cn/ezhizao/project/business/product/service/impl/BizProcessInspecionServiceImpl.java

@@ -39,6 +39,11 @@ public class BizProcessInspecionServiceImpl  extends ServiceImpl<BizProcessInspe
      * @return 删除结果
      */
     @Override
-    public int physicalDelete(BizProcessInspecion bizProcessInspecion){ return bizProcessInspecionMapper.physicalDelete(bizProcessInspecion); };
+    public int physicalDelete(BizProcessInspecion bizProcessInspecion){ return bizProcessInspecionMapper.physicalDelete(bizProcessInspecion); }
+
+    @Override
+    public List<BizProcessInspecion> getOutsourcedlist(BizProcessInspecion bizProcessInspecion) {
+        return bizProcessInspecionMapper.getOutsourcedlist(bizProcessInspecion);
+    };
 
 }

+ 20 - 0
src/main/resources/mybatis/business/product/BizProcessInspecionMapper.xml

@@ -17,8 +17,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT * FROM biz_process_inspecion
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             deleted = 0
+            AND return_receipt_detail_id =0
             <if test="lotCode != null  and lotCode != ''">AND lot_code = #{lotCode}</if>
             <if test="userId != null  ">AND user_id = #{userId}</if>
+#             <if test="startTime != null  ">AND DATE(start_time) =#{startTime}</if>
             <if test="status != null ">AND status = #{status}</if>
             <if test="keyword != null  and keyword != '' ">AND (lot_code LIKE CONCAT('%',#{keyword},'%') OR carrier_code
                 LIKE CONCAT('%',#{keyword},'%') OR
@@ -27,6 +29,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
     </select>
 
+    <select id="getOutsourcedlist" parameterType="BizProcessInspecion" resultMap="BizProcessInspecionResult">
+        SELECT * FROM biz_process_inspecion
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            AND return_receipt_detail_id !=0
+            <if test="lotCode != null  and lotCode != ''">AND lot_code = #{lotCode}</if>
+            <if test="userId != null  ">AND user_id = #{userId}</if>
+<!--            <if test="startTime != null  ">AND DATE(start_time) =#{startTime}</if>-->
+            <if test="status != null ">AND status = #{status}</if>
+            <if test="keyword != null  and keyword != '' ">AND (lot_code LIKE CONCAT('%',#{keyword},'%') OR carrier_code
+                LIKE CONCAT('%',#{keyword},'%') OR
+                product_description LIKE CONCAT('%',#{keyword},'%'))
+            </if>
+        </trim>
+    </select>
+
+
+
     <select id="getProcessDescription" parameterType="java.lang.Long" resultType="java.lang.String" >
         SELECT description FROM biz_product
         WHERE id=#{product_id}