Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

梁世豪 4 ay önce
ebeveyn
işleme
7d2af72821

+ 0 - 1
src/main/java/com/liang/controller/BaseCompanyController.java

@@ -213,7 +213,6 @@ public class BaseCompanyController extends BaseController {
213 213
                          @RequestParam("limit") Integer pageSize,
214 214
                          @RequestParam(required = false, defaultValue = "", value = "mc") String mc) {
215 215
         PageHelper.startPage(pageNum, pageSize);
216
-
217 216
         Map<String, String> paraMap = new HashMap<>();
218 217
         paraMap.put("mc", mc);
219 218
         List<BaseCompany> list = baseCompanyService.getBaseCompanyList(paraMap);

+ 1 - 1
src/main/java/com/liang/controller/PrjApproverecordController.java

@@ -158,7 +158,7 @@ public class PrjApproverecordController extends BaseController {
158 158
         }
159 159
             paraMap.put("id",userInfo.getUserId().toString());
160 160
         // 获取当前人员岗位名称
161
-        List<SysUserInfo> accounts = sysUserInfoService.getSysUserInfoList(paraMap);
161
+        List<SysUserInfo> accounts = sysUserInfoService.getGw(paraMap);
162 162
         // 去重
163 163
         if (accounts.size()==0){
164 164
             return BaseResult.success(prjApproverecords);

+ 5 - 0
src/main/java/com/liang/dao/SysUserInfoDao.java

@@ -90,6 +90,11 @@ public interface SysUserInfoDao {
90 90
      */
91 91
     List<SysUserInfo> getSysUserInfoList(Map map);
92 92
 
93
+    /**
94
+     * 获取岗位列表
95
+     */
96
+
97
+    List<SysUserInfo> getGw(Map map);
93 98
     /**
94 99
      * 获取用户
95 100
      *

+ 7 - 0
src/main/java/com/liang/service/SysUserInfoService.java

@@ -66,6 +66,13 @@ public interface SysUserInfoService {
66 66
      */
67 67
     List<SysUserInfo> getSysUserInfoList(Map map);
68 68
 
69
+    /**
70
+     * 获取岗位信息
71
+     * @param map
72
+     * @return
73
+     */
74
+
75
+    List<SysUserInfo> getGw(Map map);
69 76
     /**
70 77
      * 获取用户
71 78
      *

+ 7 - 0
src/main/java/com/liang/service/impl/SysUserInfoServiceImpl.java

@@ -25,6 +25,8 @@ public class SysUserInfoServiceImpl implements SysUserInfoService {
25 25
     @Resource
26 26
     private SysUserInfoDao sysUserInfoDao;
27 27
 
28
+
29
+
28 30
     /**
29 31
      * 通过ID查询单条数据
30 32
      *
@@ -93,6 +95,11 @@ public class SysUserInfoServiceImpl implements SysUserInfoService {
93 95
         return this.sysUserInfoDao.getSysUserInfoList(map);
94 96
     }
95 97
 
98
+    @Override
99
+    public List<SysUserInfo> getGw(Map map) {
100
+        return this.sysUserInfoDao.getGw(map);
101
+    }
102
+
96 103
     /**
97 104
      * 获取用户信息
98 105
      *

+ 42 - 0
src/main/resources/mapper/SysUserInfoDao.xml

@@ -332,6 +332,48 @@
332 332
         rn = 1;
333 333
     </select>
334 334
 
335
+    <select id="getGw" resultMap="SysUserInfoMap" parameterType="map">
336
+        select u.*, d.dept_name as deptName, p.post_name as userPostName
337
+        from sys_user_info u
338
+        left join sys_dept_info d on d.dept_id = u.dept_id
339
+        left join sys_user_post up on up.user_id = u.user_id
340
+        left join sys_post_info p on p.post_id = up.post_id
341
+        where u.del_flag = 0
342
+        <if test="account != null and account != ''">
343
+            and u.account = #{account}
344
+        </if>
345
+        <if test="name != null and name != ''">
346
+            and u.name like '%'+#{name}+'%'
347
+        </if>
348
+        <if test="deptName != null and deptName != ''">
349
+            and d.dept_name like '%'+#{deptName}+'%'
350
+        </if>
351
+        <if test="status != null and status != ''">
352
+            and u.status = #{status}
353
+        </if>
354
+        <if test="id != null and id != ''">
355
+            and u.user_id = #{id}
356
+        </if>
357
+        <if test="postName != null and postName != ''">
358
+            and p.post_name like '%'+#{postName}+'%'
359
+        </if>
360
+        <if test="ssbm != null and ssbm != ''">
361
+            and d.dept_id = #{ssbm}
362
+        </if>
363
+        <choose>
364
+            <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">
365
+                order by ${sortName} ${sortOrder}
366
+            </when>
367
+            <otherwise>
368
+                order by u.user_id asc
369
+            </otherwise>
370
+        </choose>
371
+    </select>
372
+
373
+
374
+
375
+
376
+
335 377
     <!--查询用户-->
336 378
     <select id="getSysUserInfo" resultMap="SysUserInfoMap" parameterType="map">
337 379
         select * from sys_user_info

+ 52 - 17
src/main/resources/templates/reportinfo/add.html

@@ -49,7 +49,8 @@
49 49
                         <div class="layui-input-inline" style="width: 85%">
50 50
                             <input type="hidden" id="id" name="id">
51 51
                             <input type="text" id="mc" name="mc" lay-verify="required" lay-reqtext="项目名称不能为空"
52
-                                   placeholder="项目名称(中文)不能超过30字(含字符)" autocomplete="off" class="layui-input">
52
+                                   placeholder="请输入项目名称..." autocomplete="off" class="layui-input">
53
+                            <div style="color: red">注:项目名称(中文)不能超过30字(含字符)</div>
53 54
                         </div>
54 55
                     </div>
55 56
                     <div class="layui-form-item">
@@ -57,7 +58,7 @@
57 58
                         <div class="layui-input-inline" style="width: 85%">
58 59
                             <input type="hidden" name="sqdw" id="sqdw" class="layui-input">
59 60
                             <input type="text" id="sqdwName" name="sqdwName" lay-verify="required"
60
-                                   lay-reqtext="申请单位不能为空" autocomplete="off" class="layui-input" readonly>
61
+                                   lay-reqtext="申请单位不能为空" autocomplete="off" class="layui-input" placeholder="请选择单位..." readonly>
61 62
                         </div>
62 63
                     </div>
63 64
                     <div class="layui-form-item layui-inline" style="width: 100%">
@@ -71,7 +72,7 @@
71 72
                             <div class="layui-form-mid">-</div>
72 73
                             <div class="layui-input-inline">
73 74
                                 <input type="text" name="wc" id="wc" lay-verify="required" lay-reqtext="结束日期不能为空"
74
-                                       placeholder="结束日期" class="layui-input">
75
+                                       placeholder="请选择结束日期..." class="layui-input">
75 76
                             </div>
76 77
                         </div>
77 78
                     </div>
@@ -81,7 +82,7 @@
81 82
                         <div class="layui-input-inline" style="width: 85%">
82 83
                             <select name="xmlx" id="xmlx" lay-filter="status" lay-verify="required"
83 84
                                     lay-reqtext="请选择项目类型">
84
-                                <option value="">--请选择--</option>
85
+                                <option value="">--请选择项目类型--</option>
85 86
                                 <option th:each="item:${xmlxList}" th:text="${item.name}"
86 87
                                         th:value="${item.code}"></option>
87 88
                             </select>
@@ -120,11 +121,11 @@
120 121
                         <label class="layui-form-label" style="width: 90px">通讯地址</label>
121 122
                         <div class="layui-input-inline" style="width: 85%">
122 123
                             <div class="layui-input-inline" style="width: 400px">
123
-                                <input type="text" name="txdd" id="txdd" autocomplete="off" class="layui-input">
124
+                                <input type="text" name="txdd" id="txdd" autocomplete="off" class="layui-input" placeholder="请填入通讯地址...">
124 125
                             </div>
125 126
                             <div class="layui-form-label">邮政编码</div>
126 127
                             <div class="layui-input-inline" style="width: 300px">
127
-                                <input type="text" name="yzbm" id="yzbm" autocomplete="off" class="layui-input">
128
+                                <input type="text" name="yzbm" id="yzbm" autocomplete="off" class="layui-input" placeholder="请填入邮政编码...">
128 129
                             </div>
129 130
                         </div>
130 131
                     </div>
@@ -132,11 +133,11 @@
132 133
                         <label class="layui-form-label" style="width: 90px">电话</label>
133 134
                         <div class="layui-input-inline" style="width: 85%">
134 135
                             <div class="layui-input-inline" style="width: 400px">
135
-                                <input type="text" name="dh" id="dh" autocomplete="off" class="layui-input">
136
+                                <input type="text" name="dh" id="dh" autocomplete="off" class="layui-input" placeholder="请输入电话号码...">
136 137
                             </div>
137 138
                             <div class="layui-form-label">传真</div>
138 139
                             <div class="layui-input-inline" style="width: 300px">
139
-                                <input type="text" name="cz" id="cz" autocomplete="off" class="layui-input">
140
+                                <input type="text" name="cz" id="cz" autocomplete="off" class="layui-input" placeholder="请输入传真地址...">
140 141
                             </div>
141 142
                         </div>
142 143
                     </div>
@@ -179,7 +180,7 @@
179 180
                         <label class="layui-form-label" style="width: 90px">目的和意义</label>
180 181
                         <div class="layui-input-inline" style="width: 85%">
181 182
                             <textarea id="mdhyywb" name="mdhyywb" class="layui-textarea"
182
-                                      style="width: 100%;height: 339px"></textarea>
183
+                                      style="width: 100%;height: 339px" placeholder="请输入..."></textarea>
183 184
                             <label class="layui-form-label" style="color:grey;width: 100%;text-align: left">文本内容,如果包含图片,请下载模板编辑后上传,并清空当前编辑框</label>
184 185
                         </div>
185 186
                     </div>
@@ -657,7 +658,7 @@
657 658
     </div>
658 659
 </div>
659 660
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
660
-<script th:src="@{/lib/layui-v2.6.3/layui.js}" charset="utf-8"></script>
661
+<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
661 662
 <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
662 663
 <script th:src="@{/js/lay-config.js}" charset="utf-8"></script>
663 664
 <script th:src="@{/lib/xm-select-v1.2.2/xm-select.js}" charset="utf-8"></script>
@@ -681,17 +682,47 @@
681 682
         //日期
682 683
         laydate.render({
683 684
             elem: '#qs',
684
-            value: new Date()
685
+            value: new Date(),
686
+            done:function () {
687
+                var qs = $("#qs").val();
688
+                var wc = $("#wc").val();
689
+                if (qs!= "" && wc!= "") {
690
+                    if (isValidDate(qs) && isValidDate(wc)) {
691
+                        let startDate = new Date(qs);
692
+                        let endDate = new Date(wc);
693
+                        // 计算起始日期三个月后的日期
694
+                        let threeMonthsLater = new Date(startDate);
695
+                        threeMonthsLater.setMonth(startDate.getMonth() + 3);
696
+                        if (endDate < threeMonthsLater) {
697
+                            layer.msg("结束日期不能早于起始日期三个月!", {icon:2}, function () {
698
+                                $("#wc").val("");
699
+                            });
700
+                        }
701
+                    } else {
702
+                        layer.msg("请输入有效的日期格式!", {icon:2});
703
+                    }
704
+                }
705
+            }
685 706
         });
686 707
         laydate.render({
687 708
             elem: '#wc',
688 709
             done: function (value, date, endDate) {
689 710
                 var qs = $("#qs").val();
690 711
                 var wc = $("#wc").val();
691
-                if (qs != "" && wc != "") {
692
-                    if (qs > wc) {
693
-                        Message.warning("结束日期不能早于起始日期!", 1500);
694
-                        $("#wc").val("");
712
+                if (qs!= "" && wc!= "") {
713
+                    if (isValidDate(qs) && isValidDate(wc)) {
714
+                        let startDate = new Date(qs);
715
+                        let endDate = new Date(wc);
716
+                        // 计算起始日期三个月后的日期
717
+                        let threeMonthsLater = new Date(startDate);
718
+                        threeMonthsLater.setMonth(startDate.getMonth() + 3);
719
+                        if (endDate < threeMonthsLater) {
720
+                            layer.msg("结束日期不能早于起始日期三个月!", {icon:2}, function () {
721
+                                $("#wc").val("");
722
+                            });
723
+                        }
724
+                    } else {
725
+                        layer.msg("请输入有效的日期格式!", {icon:2});
695 726
                     }
696 727
                 }
697 728
             }
@@ -711,8 +742,8 @@
711 742
                 url: AjaxUtil.ctx + 'baseCompany/dwlist',
712 743
                 cols: [
713 744
                     [
714
-                        {type: 'radio'},
715
-                        {type: 'numbers',title:'序号', align: 'center'},
745
+                        {type: 'radio',title: '😊'},
746
+                        {type: 'numbers',title:'序号', align: 'center',width: '7%'},
716 747
                         {field: 'mc', width: '40%', title: '名称'},
717 748
                         {field: 'dwqc', width: '40%', title: '单位全称'}
718 749
                     ]
@@ -2284,6 +2315,10 @@
2284 2315
             }
2285 2316
         });
2286 2317
     }
2318
+    function isValidDate(dateString) {
2319
+        let date = new Date(dateString);
2320
+        return!isNaN(date.getTime());
2321
+    }
2287 2322
 </script>
2288 2323
 </body>
2289 2324
 </html>

+ 3 - 1
src/main/resources/templates/reportinfo/addfzr.html

@@ -27,7 +27,7 @@
27 27
             <label class="layui-form-label required" style="width: 70px">姓名</label>
28 28
             <div class="layui-input-inline" style="width: 650px">
29 29
                 <input type="hidden" id="ry" name="ry">
30
-                <input type="text" id="ryxm" name="ryxm" lay-verify="required" lay-reqtext="姓名不能为空" class="layui-input"
30
+                <input type="text" id="ryxm" name="ryxm" lay-verify="required" lay-reqtext="姓名不能为空" class="layui-input" placeholder="请选择姓名..."
31 31
                        readonly>
32 32
             </div>
33 33
         </div>
@@ -37,6 +37,7 @@
37 37
             <div class="layui-input-inline" style="width: 650px">
38 38
                 <input type="hidden" id="dw" name="dw">
39 39
                 <input type="text" id="dwmc" name="dwmc" class="layui-input" readonly>
40
+                <div style="color: red">自动带入,无需选择</div>
40 41
             </div>
41 42
         </div>
42 43
 
@@ -44,6 +45,7 @@
44 45
             <label class="layui-form-label" style="width: 70px">联系电话</label>
45 46
             <div class="layui-input-inline" style="width: 650px">
46 47
                 <input type="text" id="gddh" name="gddh" class="layui-input" readonly>
48
+                <div style="color: red">自动带入,无需选择</div>
47 49
             </div>
48 50
         </div>
49 51