Sfoglia il codice sorgente

费用申请逻辑优化

ly 10 mesi fa
parent
commit
9392cd688e

+ 0 - 7
src/main/java/com/liang/controller/LsUserController.java

@@ -131,13 +131,8 @@ public class LsUserController {
131 131
 
132 132
     @RequestMapping(value = "/edit/{id}",method = RequestMethod.GET)
133 133
     public String forEdit(@PathVariable Integer id){
134
-
135
-
136 134
         return "lsuserinfo/add";
137
-
138 135
     }
139
-
140
-
141 136
     /**
142 137
      * 保存数据
143 138
      * @param
@@ -160,7 +155,6 @@ public class LsUserController {
160 155
             return BaseResult.success("新增临时人员成功!");
161 156
         }
162 157
             return BaseResult.failure("新建临时人员失败,该人员已存在!");
163
-
164 158
     }
165 159
 
166 160
     @RequestMapping(value="/update/{id}", method = RequestMethod.POST)
@@ -170,7 +164,6 @@ public class LsUserController {
170 164
         sysLsUserEntity.setId(id);
171 165
         sysLsUserEntity.setX(1);
172 166
         boolean a = lsUserService.upDate(sysLsUserEntity);
173
-
174 167
         if (a != true){
175 168
             return BaseResult.failure("修改失败");
176 169
         }

+ 9 - 16
src/main/java/com/liang/controller/StaTempmemberController.java

@@ -186,22 +186,15 @@ public class StaTempmemberController extends BaseController {
186 186
             boolean a = lsUserService.upDate(list1.get(0));
187 187
             return BaseResult.success("临时人员保存成功");
188 188
         }
189
-                removeCommonElement(list, memberList);
190
-                if (list.size()>0){
191
-                    for (int h = 0;h<list.size();h++){
192
-                        Map<String, String> map = new HashMap<>();
193
-                        map.put("xm",list.get(h).getXm());
194
-                        map.put("sfzh",list.get(h).getSfzh());
195
-                        List<SysLsUserEntity> list2 = lsUserService.getUserxm(map);
196
-                        if (list2.size() > 1){
197
-                            return BaseResult.failure("临时人员保存失败,身份证号与人名重复!");
198
-                        }
199
-                        list2.get(0).setZb(null);
200
-                        list2.get(0).setZt(0);
201
-                        boolean a = lsUserService.upDate(list2.get(0));
202
-                    }
203
-                    return BaseResult.success("临时人员保存成功");
204
-                }
189
+        // 删除 共有元素
190
+        // 先更改原有状态 ,后更改 现有数据
191
+        if (list.size()>0){
192
+            for (int i = 0;i<list.size();i++){
193
+                list.get(i).setZb(null);
194
+                list.get(i).setZt(0);
195
+                lsUserService.upDate(list.get(i));
196
+            }
197
+        }
205 198
                 if (memberList.size()>0){
206 199
                     for (int b = 0;b<memberList.size();b++){
207 200
                         Map<String, String> map = new HashMap<>();

+ 10 - 9
src/main/resources/templates/stabudgetapproval/update_apply.html

@@ -967,15 +967,16 @@
967 967
                     {type: "checkbox", align: 'center'},
968 968
                     {type: 'numbers', align: 'center'},
969 969
                     {field: 'xm', title: '姓名', width: '9%'},
970
-                    {field: 'sfzh', title: '身份证号', width: '9%'},
971
-                    {field: 'qsrq', title: '聘用起始时间', width: '9%'},
972
-                    {field: 'jsrq', title: '聘用截止时间', width: '9%'},
973
-                    {field: 'fysq', title: '费用申请', width: '9%'},
974
-                    {field: 'bzfy', title: '报账费用', width: '9%'},
975
-                    {field: 'byxx', title: '毕业学校', width: '9%'},
976
-                    {field: 'zy', title: '专业', width: '9%'},
977
-                    {field: 'xl', title: '学历', width: '9%'},
978
-                    {field: 'gzdd', title: '工作地点', width: '9%'}
970
+                    {field: 'sfzh', title: '身份证号', width: '15%'},
971
+                    {field: 'qsrq', title: '聘用起始时间', width: '15%'},
972
+                    {field: 'jsrq', title: '聘用截止时间', width: '15%'},
973
+                    {field: 'fysq', title: '费用申请', width: '15%'},
974
+                    {field: 'bzfy', title: '报账费用', width: '15%'},
975
+                    {field: 'byxx', title: '毕业学校', width: '15%'},
976
+                    {field: 'zy', title: '专业', width: '15%'},
977
+                    {field: 'xl', title: '学历', width: '15%'},
978
+                    {field: 'gzdd', title: '工作地点', width: '15%'},
979
+                    {field: 'gznr', title: '工作内容', width: '20%'}
979 980
                 ]
980 981
             ],
981 982
             autoSort: false,

+ 2 - 0
src/main/resources/templates/statistical/outPay.html

@@ -144,6 +144,8 @@
144 144
                     {field: 'XMBH', width: '7%', title: '项目编码'},
145 145
                     {field: 'BM', width: '15%', title: '所属部门', sort: true},
146 146
                     {field: 'XMMC', width: '10%', title: '项目名称'},
147
+                    {field: 'NF', width: '7%', title: '年份'},
148
+                    {field: 'ERPBH', width: '10%', title: 'ERP编号'},
147 149
                     {field: 'YQCG', width: '9%', title: '预期成果'},
148 150
                     {field: 'QSRQ', width: '10%', title: '开始时间'},
149 151
                     {field: 'JSRQ', width: '10%', title: '结束时间'},