java110 лет назад: 3
Родитель
Сommit
c6e6ba7e6f

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/examineStaff/ExamineStaffDto.java

@@ -32,6 +32,8 @@ public class ExamineStaffDto extends PageDto implements Serializable {
 
     private List<ExamineStaffProjectDto> projects;
 
+    private String introduction;
+
 
     public String getEsId() {
         return esId;
@@ -105,4 +107,12 @@ public class ExamineStaffDto extends PageDto implements Serializable {
     public void setHeaderImg(String headerImg) {
         this.headerImg = headerImg;
     }
+
+    public String getIntroduction() {
+        return introduction;
+    }
+
+    public void setIntroduction(String introduction) {
+        this.introduction = introduction;
+    }
 }

+ 18 - 10
java110-bean/src/main/java/com/java110/dto/examineStaffIntroduction/ExamineStaffIntroductionDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.examineStaffIntroduction;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,9 +16,9 @@ import java.util.Date;
 public class ExamineStaffIntroductionDto extends PageDto implements Serializable {
 
     private String esiId;
-private String communityId;
-private String staffId;
-private String introduction;
+    private String communityId;
+    private String staffId;
+    private String introduction;
 
 
     private Date createTime;
@@ -28,25 +29,32 @@ private String introduction;
     public String getEsiId() {
         return esiId;
     }
-public void setEsiId(String esiId) {
+
+    public void setEsiId(String esiId) {
         this.esiId = esiId;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getStaffId() {
+
+    public String getStaffId() {
         return staffId;
     }
-public void setStaffId(String staffId) {
+
+    public void setStaffId(String staffId) {
         this.staffId = staffId;
     }
-public String getIntroduction() {
+
+    public String getIntroduction() {
         return introduction;
     }
-public void setIntroduction(String introduction) {
+
+    public void setIntroduction(String introduction) {
         this.introduction = introduction;
     }
 

+ 64 - 68
java110-db/src/main/resources/mapper/user/ExamineStaffIntroductionV1ServiceDaoImplMapper.xml

@@ -5,93 +5,89 @@
 <mapper namespace="examineStaffIntroductionV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存员工简介信息 add by wuxw 2018-07-03 -->
     <insert id="saveExamineStaffIntroductionInfo" parameterType="Map">
         insert into examine_staff_introduction(
-esi_id,community_id,staff_id,introduction
-) values (
-#{esiId},#{communityId},#{staffId},#{introduction}
-)
+        esi_id,community_id,staff_id,introduction
+        ) values (
+        #{esiId},#{communityId},#{staffId},#{introduction}
+        )
     </insert>
 
 
-
     <!-- 查询员工简介信息 add by wuxw 2018-07-03 -->
     <select id="getExamineStaffIntroductionInfo" parameterType="Map" resultType="Map">
-        select  t.esi_id,t.esi_id esiId,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId,t.introduction 
-from examine_staff_introduction t 
-where 1 =1 
-<if test="esiId !=null and esiId != ''">
-   and t.esi_id= #{esiId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="staffId !=null and staffId != ''">
-   and t.staff_id= #{staffId}
-</if> 
-<if test="introduction !=null and introduction != ''">
-   and t.introduction= #{introduction}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.esi_id,t.esi_id esiId,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id
+        communityId,t.staff_id,t.staff_id staffId,t.introduction
+        from examine_staff_introduction t
+        where 1 =1
+        <if test="esiId !=null and esiId != ''">
+            and t.esi_id= #{esiId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="staffId !=null and staffId != ''">
+            and t.staff_id= #{staffId}
+        </if>
+        <if test="introduction !=null and introduction != ''">
+            and t.introduction= #{introduction}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改员工简介信息 add by wuxw 2018-07-03 -->
     <update id="updateExamineStaffIntroductionInfo" parameterType="Map">
-        update  examine_staff_introduction t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="staffId !=null and staffId != ''">
-, t.staff_id= #{staffId}
-</if> 
-<if test="introduction !=null and introduction != ''">
-, t.introduction= #{introduction}
-</if> 
- where 1=1 <if test="esiId !=null and esiId != ''">
-and t.esi_id= #{esiId}
-</if> 
+        update examine_staff_introduction t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="introduction !=null and introduction != ''">
+            , t.introduction= #{introduction}
+        </if>
+        where 1=1
+        <if test="esiId !=null and esiId != ''">
+            and t.esi_id= #{esiId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="staffId !=null and staffId != ''">
+            and t.staff_id= #{staffId}
+        </if>
 
     </update>
 
     <!-- 查询员工简介数量 add by wuxw 2018-07-03 -->
-     <select id="queryExamineStaffIntroductionsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from examine_staff_introduction t 
-where 1 =1 
-<if test="esiId !=null and esiId != ''">
-   and t.esi_id= #{esiId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="staffId !=null and staffId != ''">
-   and t.staff_id= #{staffId}
-</if> 
-<if test="introduction !=null and introduction != ''">
-   and t.introduction= #{introduction}
-</if> 
+    <select id="queryExamineStaffIntroductionsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from examine_staff_introduction t
+        where 1 =1
+        <if test="esiId !=null and esiId != ''">
+            and t.esi_id= #{esiId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="staffId !=null and staffId != ''">
+            and t.staff_id= #{staffId}
+        </if>
+        <if test="introduction !=null and introduction != ''">
+            and t.introduction= #{introduction}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 0 - 1
service-fee/src/main/java/com/java110/fee/cmd/tempCarFee/GetTempCarFeeOrderCmd.java

@@ -13,7 +13,6 @@ import com.java110.intf.community.IParkingBoxAreaV1InnerServiceSMO;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.StringUtil;
-import com.sun.tracing.dtrace.ArgsAttributes;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 

+ 30 - 0
service-user/src/main/java/com/java110/user/cmd/examine/ListExamineStaffCmd.java

@@ -20,10 +20,12 @@ import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.examineStaffIntroduction.ExamineStaffIntroductionDto;
 import com.java110.dto.examineStaffProject.ExamineStaffProjectDto;
 import com.java110.dto.file.FileRelDto;
 import com.java110.dto.owner.OwnerDto;
 import com.java110.intf.common.IFileRelInnerServiceSMO;
+import com.java110.intf.user.IExamineStaffIntroductionV1InnerServiceSMO;
 import com.java110.intf.user.IExamineStaffProjectV1InnerServiceSMO;
 import com.java110.intf.user.IExamineStaffV1InnerServiceSMO;
 import com.java110.po.examineStaffProject.ExamineStaffProjectPo;
@@ -65,6 +67,9 @@ public class ListExamineStaffCmd extends Cmd {
     @Autowired
     private IExamineStaffProjectV1InnerServiceSMO examineStaffProjectV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IExamineStaffIntroductionV1InnerServiceSMO examineStaffIntroductionV1InnerServiceSMOImpl;
+
     @Autowired
     private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
 
@@ -88,6 +93,8 @@ public class ListExamineStaffCmd extends Cmd {
 
             freshStaffProjects(examineStaffDtos);
             updatePhone(examineStaffDtos);
+            //刷入简介
+            updateIntroduction(examineStaffDtos);
         } else {
             examineStaffDtos = new ArrayList<>();
         }
@@ -99,6 +106,29 @@ public class ListExamineStaffCmd extends Cmd {
         cmdDataFlowContext.setResponseEntity(responseEntity);
     }
 
+    /**
+     * 刷入简介
+     * @param examineStaffDtos
+     */
+    private void updateIntroduction(List<ExamineStaffDto> examineStaffDtos) {
+
+        if(examineStaffDtos == null || examineStaffDtos.size() != 1){
+            return ;
+        }
+
+        ExamineStaffIntroductionDto examineStaffIntroductionDto = new ExamineStaffIntroductionDto();
+        examineStaffIntroductionDto.setStaffId(examineStaffDtos.get(0).getStaffId());
+        examineStaffIntroductionDto.setCommunityId(examineStaffDtos.get(0).getCommunityId());
+        List<ExamineStaffIntroductionDto> introductionDtos = examineStaffIntroductionV1InnerServiceSMOImpl.queryExamineStaffIntroductions(examineStaffIntroductionDto);
+
+        if(introductionDtos == null || introductionDtos.size() < 1){
+            return ;
+        }
+
+        examineStaffDtos.get(0).setIntroduction(introductionDtos.get(0).getIntroduction());
+
+    }
+
     private boolean updatePhone(List<ExamineStaffDto> examineStaffDtos) {
         if (examineStaffDtos.size() > 100) {
             return true;

+ 29 - 0
service-user/src/main/java/com/java110/user/cmd/examine/UpdateExamineStaffCmd.java

@@ -23,15 +23,19 @@ import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.core.smo.IPhotoSMO;
 import com.java110.dto.user.UserDto;
+import com.java110.intf.user.IExamineStaffIntroductionV1InnerServiceSMO;
 import com.java110.intf.user.IExamineStaffProjectV1InnerServiceSMO;
 import com.java110.intf.user.IExamineStaffV1InnerServiceSMO;
 import com.java110.intf.user.IUserV1InnerServiceSMO;
 import com.java110.po.examineStaff.ExamineStaffPo;
+import com.java110.po.examineStaffIntroduction.ExamineStaffIntroductionPo;
 import com.java110.po.examineStaffProject.ExamineStaffProjectPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.slf4j.Logger;
@@ -62,6 +66,13 @@ public class UpdateExamineStaffCmd extends Cmd {
     @Autowired
     private IExamineStaffProjectV1InnerServiceSMO examineStaffProjectV1InnerServiceSMOImpl;
 
+
+    @Autowired
+    private IExamineStaffIntroductionV1InnerServiceSMO examineStaffIntroductionV1InnerServiceSMOImpl;
+
+    @Autowired
+    private IPhotoSMO photoSMOImpl;
+
     @Autowired
     private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
 
@@ -118,6 +129,24 @@ public class UpdateExamineStaffCmd extends Cmd {
             examineStaffProjectV1InnerServiceSMOImpl.saveExamineStaffProject(tmpExamineStaffProjectPo);
         }
 
+        // todo save examine staff introduction
+        if (reqJson.containsKey("introduction") && !StringUtil.isEmpty(reqJson.getString("introduction"))) {
+            ExamineStaffIntroductionPo examineStaffIntroductionPo = new ExamineStaffIntroductionPo();
+            examineStaffIntroductionPo.setStaffId(reqJson.getString("staffId"));
+            examineStaffIntroductionPo.setIntroduction(reqJson.getString("introduction"));
+            examineStaffIntroductionPo.setCommunityId(reqJson.getString("communityId"));
+            examineStaffIntroductionV1InnerServiceSMOImpl.updateExamineStaffIntroduction(examineStaffIntroductionPo);
+        }
+        // todo save examine staff face image
+        if(reqJson.containsKey("headerImg")) {
+
+            photoSMOImpl.savePhoto(reqJson.getString("headerImg"),
+                    examineStaffPo.getEsId(),
+                    reqJson.getString("communityId"));
+        }
+
         cmdDataFlowContext.setResponseEntity(ResultVo.success());
+
+
     }
 }