zhuang 1 rok pred
rodič
commit
c725524ecd

+ 16 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxApiDao.java

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhuang
+ */
+@Mapper
+public interface ZhcxApiDao {
+
+    List<ZhcxOutsideInspectionVo> getOutsideInspectionList(Map<String, Object> map);
+}

+ 14 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxApiService.java

@@ -0,0 +1,14 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhuang
+ */
+public interface ZhcxApiService {
+
+    List<ZhcxOutsideInspectionVo> getOutsideInspectionList(Map<String, Object> map);
+}

+ 25 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java

@@ -0,0 +1,25 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.rongwei.bscommon.sys.dao.ZhcxApiDao;
+import com.rongwei.bscommon.sys.service.ZhcxApiService;
+import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhuang
+ */
+@Service
+public class ZhcxApiServiceImpl implements ZhcxApiService {
+
+    @Autowired
+    private ZhcxApiDao zhcxApiDao;
+
+    @Override
+    public List<ZhcxOutsideInspectionVo> getOutsideInspectionList(Map<String, Object> map) {
+        return zhcxApiDao.getOutsideInspectionList(map);
+    }
+}

+ 31 - 0
business-common/src/main/resources/mybatis/business/zhcxApiDao.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.rongwei.bscommon.sys.dao.ZhcxApiDao">
+
+    <select id="getOutsideInspectionList" resultType="com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo">
+        SELECT
+            i.*,
+            CONCAT( SUBSTRING( i.PROJECTCODE, - 4 ), '-', i.MACHINENO, '-', i.PROJECTNAME ) AS EX1,
+            sd.ITPID,
+            sd.INSPECTIONCONCLUSION,
+            sd.SUPERVISIONID,
+            sd.SUPERVISION,
+            sd.SUPERVISIONPHONE,
+            sd.CHECKSTARTTIME,
+            sd.CHECKENDTIME,
+            sd.CANCELTYPE,
+            sd.CANCELREASON,
+            sd.ID AS DISPATCHID,
+            sd.SFILES,
+            sd.REFUSEREASON,
+            IFNULL( sd.DISPATCHSTATUS, '10' ) AS DISPATCHSTATUS
+        FROM
+            ZHCX_OUTSIDE_INSPECTION_ITP i
+            LEFT JOIN ZHCX_OUTSIDE_INSPECTION_ITP_SUPERVISION_DISPATCH sd ON i.ID = sd.ITPID
+        <where>
+            i.DELETED = '0'
+            <if test="projectname != null and projectname != ''"> AND i.PROJECTNAME = #{projectname} </if>
+        </where>
+    </select>
+</mapper>

+ 74 - 0
business-entity/src/main/java/com/rongwei/bsentity/vo/ZhcxOutsideInspectionVo.java

@@ -0,0 +1,74 @@
+package com.rongwei.bsentity.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class ZhcxOutsideInspectionVo {
+
+    private String id;
+    private String tenantid;
+    private String roption;
+    private String deleted;
+    private String remark;
+    private String createuserid;
+    private String createusername;
+    private Date createdate;
+    private String modifyuserid;
+    private String modifyusername;
+    private Date modifydate;
+    private String inspectioncode;
+    private String inspectiontype;
+    private String projectid;
+    private String projectcode;
+    private String projectname;
+    private String customermanageid;
+    private String customerrequireid;
+    private String machineno;
+    private String companyshortname;
+    private String structurename;
+    private String structuredrawing;
+    private String inspectioncontent;
+    private BigDecimal QTY;
+    private String inspectionlocationid;
+    private String inspectionlocation;
+    private Date reservationinspectiontime;
+    private String subcontractorid;
+    private String subcontractorunitid;
+    private String subcontractorname;
+    private String workshopid;
+    private String workshopname;
+    private String workshopmanagerid;
+    private String workshopmanagername;
+    private String selftester;
+    private Date handintime;
+    private String checkerid;
+    private String checkername;
+    private String checkerconclusion;
+    private String checkercontact;
+    private String pmid;
+    private String pmname;
+    private Long inspectioncount;
+    private String inspectionstatus;
+    private String files;
+    private String projectmachineid;
+    private String launchtype;
+    private String structureid;
+    private String inspectioncontentid;
+    private String inspectionlocationsupplement;
+    private String itpid;
+    private String inspectionconclusion;
+    private String supervisionid;
+    private String supervision;
+    private String SUPERVISIONPHONE;
+    private Date CHECKSTARTTIME;
+    private Date CHECKENDTIME;
+    private String CANCELTYPE;
+    private String CANCELREASON;
+    private String DISPATCHID;
+    private String SFILES;
+    private String REFUSEREASON;
+    private String DISPATCHSTATUS;
+}

+ 32 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxApiController.java

@@ -0,0 +1,32 @@
+package com.rongwei.bsserver.controller;
+
+import com.rongwei.bscommon.sys.service.ZhcxApiService;
+import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
+import com.rongwei.rwcommon.base.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhuang
+ */
+@RestController
+@RequestMapping("/zhcxApi")
+public class ZhcxApiController {
+
+    @Autowired
+    private ZhcxApiService zhcxApiService;
+
+    @RequestMapping("/getOutsideInspectionList")
+    public R getOutsideInspectionList(@RequestBody Map<String,Object> map){
+        if(!map.containsKey("projectname")){
+            return R.error("projectname参数必填");
+        }
+        List<ZhcxOutsideInspectionVo> outsideInspectionList = zhcxApiService.getOutsideInspectionList(map);
+        return R.ok(outsideInspectionList);
+    }
+}