Shanks %!s(int64=7) %!d(string=hai) anos
pai
achega
73461c353f

+ 13 - 5
src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java

@@ -30,10 +30,17 @@ public class ImageUploadController {
     @Autowired
     private ResumeService resumeService;
     private ResourceLoader resourceLoader;
-    public static final String ROOT = "D:/apache-tomcat-9.0.6/webapps/resume/img/";
-    public static final String ResumeFile = "D:/apache-tomcat-9.0.6/webapps/resume/";
-    public static final String httpRoot = "http://localhost:8080/resume/img/";
-    public static final String httphtmlRoot = "http://localhost:8080/resume/";
+    public static final String ROOT = "/usr/local/tomcat/tomcat7/webapps/resume/img/";
+    public static final String ResumeFile = "/usr/local/tomcat/tomcat7/webapps/resume/";
+    public static final String httpRoot = "http://47.97.74.34:8080/resume/img/";
+    public static final String httphtmlRoot = "http://yuesuo.yueguanjia.com:8080/resume/";
+    public static final String modulePath = "/usr/local/tomcat/tomcat7/webapps/resume/resume.html";
+
+//    public static final String ROOT = "D:/apache-tomcat-9.0.6/webapps/resume/img/";
+//    public static final String ResumeFile = "D:/apache-tomcat-9.0.6/webapps/resume/";
+//    public static final String httpRoot = "http://localhost:8080/resume/img/";
+//    public static final String httphtmlRoot = "http://localhost:8080/resume/";
+//    public static final String modulePath = "E:/Yuemum/ygj-yuemum/src/main/resources/resume/resume.html";
 
     @RequestMapping(value = "/upload", method = RequestMethod.GET)
     public String upload() {
@@ -101,7 +108,7 @@ public class ImageUploadController {
     public String createResume(@ModelAttribute Photo photo) {
         try {
             JlServiceUser jlServiceUser  = jlServiceUserService.getResume(photo.getServant_code());
-            File file = ResourceUtils.getFile("classpath:resume/resume.html");
+            File file = ResourceUtils.getFile(modulePath);
             BufferedReader br = new BufferedReader(new FileReader(file));
             Resume resume =new Resume();
             Resume resumeold =new Resume();
@@ -216,6 +223,7 @@ public class ImageUploadController {
                 str = str.replace("$service",service);
                 str = str.replace("$scstyle",servicehref);
                 str = str.replace("$comment",comment);
+                str = str.replace("$yuesaohref",httphtmlRoot+photo.getServant_code() + ".html");
                 stringHtml.append(str+"\r\n");
             }
             resumeold = resumeService.getResume(photo.getServant_code());

+ 7 - 0
src/main/java/com/ygj/yuemum/controller/maternitymatron/JlServiceUserController.java

@@ -48,6 +48,13 @@ public class JlServiceUserController {
         return jso;
     }
 
+    @PostMapping("/queryEditServiceUser")
+    public String queryEditServiceUser(@ModelAttribute QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        Map<String, Object> trains= jlServiceUserService.queryEditServiceUser(queryServiceUserStock);
+        String jso = JSONObject.toJSONString(trains);
+        return jso;
+    }
+
     @PostMapping("/queryMMList")
     public String queryMMList(@ModelAttribute QueryServiceUser queryServiceUser) {
 

+ 1 - 0
src/main/java/com/ygj/yuemum/dao/maternitymatron/JlServiceUserDao.java

@@ -26,6 +26,7 @@ public interface JlServiceUserDao {
 
     List<QueryServiceUserStock> queryServiceUserStockCondition(QueryServiceUserStock record);
 
+    List<QueryServiceUserStock> queryEditServiceUser(QueryServiceUserStock record);
 
     int getcount();
     int getStock(QueryServiceUserStock queryServiceUserStock);

+ 6 - 1
src/main/java/com/ygj/yuemum/service/maternitymatron/JlServiceUserService.java

@@ -63,7 +63,12 @@ public class JlServiceUserService {
         tableData.put("total", count);
         return tableData;
     }
-
+    public Map<String, Object> queryEditServiceUser(QueryServiceUserStock queryServiceUserStock) throws ParseException {
+        List<QueryServiceUserStock> stockLists = jlServiceUserDao.queryEditServiceUser(queryServiceUserStock);
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", stockLists);
+        return tableData;
+    }
     public Map<String, Object> queryServiceUserStockCondition(QueryServiceUserStock queryServiceUserStock) throws ParseException {
         // 1.根据日期筛选出月嫂 获取 把不能服务的记录下来 然后数据库里 not in
         // 2.根据id获取月嫂相关信息

+ 94 - 2
src/main/resources/mybatis/mapper/maternitymatron/JlServiceUserMapper.xml

@@ -203,9 +203,9 @@
         select
         jl_service_user.id,
         jl_service_user.truename,
-        jl_service_user_info.constellation,
+        fgetconstellationname(jl_service_user_info.constellation) constellation,
         year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
-        jl_service_user_info.zodiac,
+        fgetzodiacname(jl_service_user_info.zodiac) zodiac,
         fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
         city.cityname,
         jl_service_user_info.seniority,
@@ -296,6 +296,98 @@
         select
         jl_service_user.id,
         jl_service_user.truename,
+        fgetconstellationname(jl_service_user_info.constellation) constellation,
+        jl_service_user_info.idcard,
+        year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,
+        fgetzodiacname(jl_service_user_info.zodiac) zodiac,
+        fgetcityname(CONCAT(substring(jl_service_user_info.idcard,1,4),'00')) np,
+        city.cityname,
+        jl_service_user_info.seniority,
+        jl_service_user_info.gender,
+        jl_service_user_info.city,
+        jl_service_user.status,
+        jl_service_user_info.babynumber,
+        jl_service_user_info.ethnicgroup,
+        jl_service_user_info.education,
+        jl_service_user_info.height,
+        jl_service_user_info.marriage,
+        jl_service_user_info.highlight,
+        jl_service_user_info.weight,
+        city.citycode,
+        IFNULL(mm_info_resume.resume_path,0) resume_path
+        from jl_service_user
+        LEFT JOIN jl_service_user_info on jl_service_user.id = jl_service_user_info.id
+        LEFT JOIN (select service_id,GROUP_CONCAT(jl_region.`name`) cityname,GROUP_CONCAT(store_id) citycode from jl_store_service LEFT JOIN jl_region
+        on jl_store_service.store_id = jl_region.`code` group by service_id) as
+        city ON jl_service_user.id = city.service_id
+        left join mm_info_resume on jl_service_user.id = mm_info_resume.servant_code
+        where 1=1
+        <if test="ids != null ">
+            and jl_service_user.id not in ( #{ids,jdbcType=INTEGER} )
+        </if>
+        <if test="id != null ">
+            and jl_service_user.id =  #{id,jdbcType=INTEGER}
+        </if>
+        <if test="truename != null ">
+            and jl_service_user.truename like "%"#{truename,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="constellation != null ">
+            and constellation like  "%"#{constellation,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="zodiac != null ">
+            and zodiac =  #{zodiac,jdbcType=VARCHAR}
+        </if>
+        <if test="np != null ">
+            and city = #{np,jdbcType=VARCHAR}
+        </if>
+        <if test="experience != null ">
+            and seniority = #{experience,jdbcType=VARCHAR}
+        </if>
+        <if test="gender != null ">
+            and gender = #{gender,jdbcType=VARCHAR}
+        </if>
+        <if test="status != null ">
+            and status = #{status,jdbcType=VARCHAR}
+        </if>
+        <if test="gender != null ">
+            and gender = #{gender,jdbcType=VARCHAR}
+        </if>
+        <if test="babynumber != null ">
+            and babynumber = #{babynumber,jdbcType=VARCHAR}
+        </if>
+        <if test="cityname != null ">
+            and citycode like "%"#{cityname,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="ethnicgroup != null ">
+            and ethnicgroup = #{ethnicgroup,jdbcType=VARCHAR}
+        </if>
+        <if test="education != null ">
+            and education = #{education,jdbcType=VARCHAR}
+        </if>
+        <if test="height != null ">
+            and height = #{height,jdbcType=VARCHAR}
+        </if>
+        <if test="marriage != null ">
+            and marriage = #{marriage,jdbcType=VARCHAR}
+        </if>
+        <if test="highlight != null ">
+            and highlight like "%"#{highlight,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="weight != null ">
+            and weight = #{weight,jdbcType=VARCHAR}
+        </if>
+        <if test="agestart != null and ageend != null ">
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &gt;= #{agestart,jdbcType=VARCHAR}
+            and year(CURDATE())-substring(jl_service_user_info.idcard,7,4) &lt;= #{ageend,jdbcType=VARCHAR}
+        </if>
+        <!--age-->
+        order by  gender desc , babynumber desc , status asc
+    </select>
+
+    <select id="queryEditServiceUser" resultMap="queryStockResultMap" parameterType="com.ygj.yuemum.domain.maternitymatron.QueryServiceUser">
+        select
+        jl_service_user.id,
+        jl_service_user.truename,
         jl_service_user_info.constellation,
         jl_service_user_info.idcard,
         year(CURDATE())-substring(jl_service_user_info.idcard,7,4) age,

+ 11 - 11
src/main/resources/resume/resume.html

@@ -18,7 +18,7 @@
 <div class="resume-body">
     <!--头部icon-->
     <div class="resume-header">
-        <image class="resume-header-image" id="header-nav-image"></image>
+        <image class="resume-header-image" src="img/22x.png"></image>
     </div>
     <!--头部响应信息-->
     <div class="resume-header-info">
@@ -76,21 +76,21 @@
             <div class="resume-header-right-bottominfo">
                 <div class="containers-bottom">
                     <div class="nav bottom-info">
-                        <image class="bottom-info-icon" src="img/形状24@2x.png"></image>
+                        <image class="bottom-info-icon" src="img/242x.png"></image>
                         <span class="bottom-info-span">实名认证</span>
                     </div>
                     <div class="nav bottom-info">
-                        <image class="bottom-info-icon" src="img/形状25@2x.png"></image>
+                        <image class="bottom-info-icon" src="img/252x.png"></image>
                         <span class="bottom-info-span">护理证书</span>
                     </div>
 
                     <div class="nav bottom-info">
-                        <image class="bottom-info-icon" src="img/形状26@2x.png"></image>
+                        <image class="bottom-info-icon" src="img/262x.png"></image>
                         <span class="bottom-info-span">健康证明</span>
                     </div>
 
                     <div class="nav bottom-info">
-                        <image class="bottom-info-icon" src="img/形状27@2x.png"></image>
+                        <image class="bottom-info-icon" src="img/272x.png"></image>
                         <span class="bottom-info-span">无犯罪记录</span>
                     </div>
 
@@ -178,22 +178,22 @@
     <div class="resume-footer">
         <div class="resume-footer-top">
             <div class="resume-footer-top-item">
-                <image class="resume-footer-top-image" src="img/1@2x.png"></image>
+                <image class="resume-footer-top-image" src="img/12x.png"></image>
                 <span class="resume-footer-top-span">专业的服务</span>
             </div>
             <div class="resume-footer-top-item">
-                <image class="resume-footer-top-image" src="img/形状28@2x.png"></image>
+                <image class="resume-footer-top-image" src="img/282x.png"></image>
                 <span class="resume-footer-top-span">完善的售后</span>
             </div>
             <div class="resume-footer-top-item">
-                <image class="resume-footer-top-image" src="img/371@2x.png"></image>
+                <image class="resume-footer-top-image" src="img/3712x.png"></image>
                 <span class="resume-footer-top-span">快速上门</span>
             </div>
         </div>
         <div class="resume-footer-line"></div>
         <div class="resume-footer-bottom">
             <div class="resume-footer-bottom-tel">
-                <image class="resume-footer-bottom-image" src="img/形状12@2X.png"></image>
+                <image class="resume-footer-bottom-image" src="img/122x.png"></image>
                 <span class="resume-footer-bottom-span">400-002-2699</span>
             </div>
             <div class="resume-footer-bottom-company">
@@ -287,14 +287,14 @@
 <script>
     $(document).ready(function () {
         if (window.screen.width < 751) {
-            $("#header-nav-image").attr("src", "img/header-icon@2x.png");
+            $("#header-nav-image").attr("src", "img/header-icon2x.png");
             $("#box-comments").remove();
 //            $('#resume-comments').remove();
             $('#resume-comments-con').remove();
             $('#ul_box2').remove();
             $("#resume-comments").append('<image class="resume-comments-list resume-comments-list-first" src="img/comments01.png" /><image class="resume-comments-list" src="img/comments02.png" /><image class="resume-comments-list" src="img/comments03.png" />');
         } else {
-            $("#header-nav-image").attr("src", "img/形状2@2x.png")
+            $("#header-nav-image").attr("src", "img/22x.png")
         }
     })
 </script>