Browse Source

Merge remote-tracking branch 'origin/master'

lizeyu 9 months ago
parent
commit
755c4ddc8d

+ 4 - 5
src/main/java/com/ghsc/partybuild/controller/PublicityController.java

@@ -1175,10 +1175,9 @@ public class PublicityController {
     @ResponseBody
     @GetMapping("/getPartyDuesUserListOfAddfee")
     public RequsetData<PageInfo<HashMap<String, Object>>> getPartyDuesUserListOfAddfee(@RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize,
-                                                                                       @RequestParam("year") Integer year, @RequestParam("month") Integer month, @RequestParam("partyCode") String partyCode, @RequestParam(required = false) String userIds,
-                                                                                       @RequestParam(required = false) String removeUserId, @RequestParam(required = false) String userName) {
+                                                                                       @RequestParam("year") Integer year, @RequestParam("month") Integer month, @RequestParam("partyCode") String partyCode, @RequestParam(required = false) String userName) {
 
-        List<String> userIdList = new ArrayList<>();
+        /*List<String> userIdList = new ArrayList<>();
         if (!stringUtils.IsNullOrEmpty(userIds)) {
             userIdList = Arrays.asList(userIds.split(","));
         }
@@ -1187,10 +1186,10 @@ public class PublicityController {
         List<String> removeUserList = new ArrayList<>();
         if (!stringUtils.IsNullOrEmpty(removeUserId)) {
             removeUserList = Arrays.asList(removeUserId.split(","));
-        }
+        }*/
 
         RequsetData<PageInfo<HashMap<String, Object>>> result = new RequsetData<>();
-        result.setItem(publicityService.getPartyDuesUserListOfAddfee(pageIndex, pageSize, year, month, partyCode, userIdList, removeUserList, userName));
+        result.setItem(publicityService.getPartyDuesUserListOfAddfee(pageIndex, pageSize, year, month, partyCode, userName));
         return result;
     }
 

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/app/AppPartyController.java

@@ -350,7 +350,7 @@ public class AppPartyController {
                                                                                        @RequestParam(required = false) List<String> userIdList,
                                                                                        @RequestParam(required = false) List<String> removeUserIdList, @RequestParam(required = false) String xm) {
         RequsetData<PageInfo<HashMap<String, Object>>> result = new RequsetData<>();
-        result.setItem(publicityService.getPartyDuesUserListOfAddfee(pageIndex, pageSize, year, month, dzzdm, userIdList, removeUserIdList, xm));
+        result.setItem(publicityService.getPartyDuesUserListOfAddfee(pageIndex, pageSize, year, month, dzzdm, xm));
         return result;
     }
 

+ 1 - 1
src/main/java/com/ghsc/partybuild/mapper/PublicityCQuery.java

@@ -231,7 +231,7 @@ public interface PublicityCQuery {
      * @param userName
      * @return
      */
-    List<HashMap<String, Object>> selectPartyDuesUserListOfAddfee(@Param("year") Integer year, @Param("month") Integer month, @Param("partyCode") String partyCode, @Param("userIdList") List<String> userIdList, @Param("removeUserList") List<String> removeUserList, @Param("userName") String userName);
+    List<HashMap<String, Object>> selectPartyDuesUserListOfAddfee(@Param("year") Integer year, @Param("month") Integer month, @Param("partyCode") String partyCode, @Param("userName") String userName,@Param("yearMonth") Integer yearMonth);
 
 
     List<HashMap<String, Object>> selectUserDuesList(@Param("ssdzzdm") String ssdzzdm, @Param("xm") String xm, @Param("year") Integer year, @Param("month") Integer month);

+ 1 - 1
src/main/java/com/ghsc/partybuild/service/PublicityService.java

@@ -378,7 +378,7 @@ public interface PublicityService {
      * @param userName
      * @return
      */
-    PageInfo<HashMap<String, Object>> getPartyDuesUserListOfAddfee(int page, int rows, Integer year, Integer month, String partyCode, List<String> userIdList, List<String> removeUserList,String userName);
+    PageInfo<HashMap<String, Object>> getPartyDuesUserListOfAddfee(int page, int rows, Integer year, Integer month, String partyCode,String userName);
 
     /**
      * 保存

+ 10 - 2
src/main/java/com/ghsc/partybuild/service/impl/PublicityServiceImpl.java

@@ -1244,9 +1244,11 @@ public class PublicityServiceImpl implements PublicityService {
      * @return
      */
     @Override
-    public PageInfo<HashMap<String, Object>> getPartyDuesUserListOfAddfee(int page, int rows, Integer year, Integer month, String partyCode, List<String> userIdList, List<String> removeUserList, String userName) {
+    public PageInfo<HashMap<String, Object>> getPartyDuesUserListOfAddfee(int page, int rows, Integer year, Integer month, String partyCode, String userName) {
+        Integer yearMonth = Integer.parseInt(year + String.format("%02d", month));
+
         PageHelper.startPage(page, rows);
-        List<HashMap<String, Object>> list = publicityCQuery.selectPartyDuesUserListOfAddfee(year, month, partyCode, userIdList, removeUserList, userName);
+        List<HashMap<String, Object>> list = publicityCQuery.selectPartyDuesUserListOfAddfee(year, month, partyCode, userName,yearMonth);
 
         PageInfo<HashMap<String, Object>> result = new PageInfo(list);
 
@@ -1274,6 +1276,7 @@ public class PublicityServiceImpl implements PublicityService {
                 item.setOperatetime(new Date());
                 item.setOperatestate("A");
                 item.setSyncstate("N");
+                item.setPaystate(1);
                 result += usPartyduesDetailMapper.insert(item);
             } else {
                 mModel.setMoney(item.getMoney());
@@ -1285,6 +1288,7 @@ public class PublicityServiceImpl implements PublicityService {
                 mModel.setOperatetime(new Date());
                 mModel.setOperatestate("M");
                 mModel.setSyncstate("N");
+                mModel.setPaystate(1);
                 result += usPartyduesDetailMapper.updateByPrimaryKey(mModel);
             }
         }
@@ -1456,7 +1460,11 @@ public class PublicityServiceImpl implements PublicityService {
                     dbModel.setSyncstate("N");
                     usPartyduesMapper.updateByPrimaryKey(dbModel);
                 }
+
+                this.batchInsertPartyDuesDetail(item.getYear(),Arrays.asList(item.getUsercode()));
             });
+
+
         }
 
         return errorList;

+ 16 - 24
src/main/resources/mapping/PublicityCQuery.xml

@@ -531,33 +531,25 @@
 
     <!--选择年月份未缴的党员-->
     <select id="selectPartyDuesUserListOfAddfee" resultType="java.util.HashMap">
-        select p.USERCODE,p.USERNAME,us.SZDZBDM as PARTYCODE,p.YEAR,p.MONEY,p.BASENUMBER,p.PARTYDUESID,z.DZZMC
-        from US_PartyDues p
-        inner join VM_RYJBXX us on p.USERCODE=us.RYBM
-        inner join ZZ_ZZQKXX z on us.SZDZBDM = z.DZZDM
-        left join US_PARTYDUES_DETAIL d on p.PARTYDUESID=d.PARTYDUESID and d.MONTH=#{month} and d.OPERATESTATE
-        <![CDATA[ <> ]]> 'D'
+        select pd.USERCODE,pd.USERNAME,upm.PARTYCODE,pd.YEAR,pd.MONEY,pd.BASENUMBER,pd.PARTYDUESID
+        from us_partydues pd
+        inner join us_partydues_detail pdd on pd.PARTYDUESID = pdd.PARTYDUESID
+        inner join vm_ryjbxx_all us on pd.usercode = us.rybm
+        inner join rs_ryjbxxfb fb on us.RYBM = fb.RYBM
+        inner join zz_djxx zd on us.RYBM = zd.RYBM
+        inner join us_party_month upm on pd.userCode= upm.userCode and upm.yearMonth = (pd.YEAR*100+pdd.month)
         where 1=1
-        and p.YEAR=#{year}
-        and us.SZDZBDM like concat ('',#{partyCode},'%')
-        and d.MONTH is null
+        and pd.year = #{year}
+        and pdd.month = #{month}
+        and us.RYZT in ('2', '3')
+        and ifnull(fb.partyDuesStartMonth,(cast(substr(zd.JRZGZZRQ, 1, 6) as signed))) <![CDATA[ <= ]]> #{yearMonth}
+        and (pdd.payState is null or pdd.payState = 0)
+        and upm.partyCode like concat ('',#{partyCode},'%')
+        and pd.MONEY > 0
         <if test="userName!=null and userName !=''">
-            and p.USERNAME like concat('%',#{userName},'%')
-        </if>
-        <if test="userIdList != null and userIdList.size()>0">
-            and p.USERCODE in
-            <foreach collection="userIdList" item="userId" index="index" open="(" close=")" separator=",">
-                #{userId}
-            </foreach>
-        </if>
-        <if test="removeUserList != null and removeUserList.size()>0">
-            and p.USERCODE not in
-            <foreach collection="removeUserList" item="userId" index="index" open="(" close=")" separator=",">
-                #{userId}
-            </foreach>
+            and us.xm like concat('%',#{userName},'%')
         </if>
-        order by us.XMPY,us.RYJBXXBS
-
+        order by CONVERT(us.XM USING gbk),us.rybm
     </select>
 
     <!--党组织经费使用情况-->

+ 6 - 6
src/main/resources/static/app/main/publicity/partyDues/duesMulti.html

@@ -58,9 +58,9 @@
                         <tr>
                             <th class="text-center" style="width: 80px;">序号</th>
                             <th style="width: 200px;">党员姓名</th>
-                            <th style="width: 200px;">计算基数</th>
+                            <!--<th style="width: 200px;">计算基数</th>-->
                             <th style="width: 200px;">交纳金额(元/月)</th>
-                            <th style="width: 200px;">特殊党费(元)</th>
+                            <!--<th style="width: 200px;">特殊党费(元)</th>-->
                             <th style="width: 100px;">操作</th>
                         </tr>
                         </thead>
@@ -70,19 +70,19 @@
                             <td class="text-center">
                                 {{it.USERNAME}}
                             </td>
-                            <td class="text-center">
+                            <!--<td class="text-center">
                                 {{it.BASENUMBER}}
-                            </td>
+                            </td>-->
                             <td class="text-center"
                                 ng-class="{ 'has-error' : invalidFee($index,editForm,'MONEY') &&  this.editForm.$submitted}">
                                 <input type="number" autocomplete="off" class="form-control" name="MONEY_{{$index}}"
                                        ng-model="it.MONEY" ng-required="true" style="width: 150px;display: inline;"/>
                             </td>
-                            <td class="text-center"
+                            <!--<td class="text-center"
                                 ng-class="{ 'has-error' : invalidFee($index,editForm,'SPECIALEXPENSES') &&  this.editForm.$submitted}">
                                 <input type="number" autocomplete="off" class="form-control" name="SPECIALEXPENSES_{{$index}}" ng-pattern="/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/"
                                        ng-model="it.SPECIALEXPENSES" style="width: 150px;display: inline;"/>
-                            </td>
+                            </td>-->
                             <td class="text-center">
                                 <button class="btn td-btn bg-pink waves-effect"
                                         ng-click="delUser($index)" title="删除">

+ 23 - 47
src/main/resources/static/app/main/publicity/partyDues/duesMulti.js

@@ -19,7 +19,7 @@
             title: '人员选择',
             isMulti: true,
             selectData: {userName: '党员姓名'},
-            columns: {USERNAME: '党员姓名', BASENUMBER: '缴纳基数', MONEY: '缴纳金额(元/月)'},
+            columns: {USERNAME: '党员姓名', MONEY: '交纳金额(元/月)'},
             selectLabelKey: 'USERNAME',
             selectValuekey: 'USERCODE',
             selectedValueData: '',
@@ -28,52 +28,28 @@
             selectParams: {
                 year: $scope.dataModel.year,
                 partyCode: $scope.dataModel.partycode,
-                removeUserId: '',
                 month: $scope.dataModel.month
-            }
-        };
-        $scope.$watch('selectUserlist.selectedValueData', function (newVal) {
-            if (newVal != '' && newVal != undefined) {
-                $http({
-                    method: 'get',
-                    url: '../../api/publicity/getPartyDuesUserListOfAddfee',
-                    params: {
-                        userIds: newVal,
-                        pageindex: 1,
-                        pagesize: 10000,
-                        year: $scope.dataModel.year,
-                        partyCode: $scope.dataModel.partycode,
-                        month: $scope.dataModel.month
-                    }
-                }).then(function (result) {
-                    $loading.hide();
-                    angular.forEach(result.data.item.list, function (val, key) {
-                        $scope.userList.push({
-                            PARTYDUESID: val.PARTYDUESID,
-                            USERNAME: val.USERNAME,
-                            USERCODE: val.USERCODE,
-                            BASENUMBER: val.BASENUMBER,
-                            MONEY: val.MONEY,
-                            SPECIALEXPENSES: val.SPECIALEXPENSES,
-                            PARTYCODE: val.PARTYCODE
-                        });
+            },
+            onSelect: function (value, items) {
+                if (items && items.length > 0) {
+                    items.forEach(val => {
+                        if ($scope.userList.filter(it => it.USERCODE == val.USERCODE).length == 0) {
+                            $scope.userList.push({
+                                PARTYDUESID: val.PARTYDUESID,
+                                USERNAME: val.USERNAME,
+                                USERCODE: val.USERCODE,
+                                BASENUMBER: val.BASENUMBER,
+                                MONEY: val.MONEY,
+                                SPECIALEXPENSES: val.SPECIALEXPENSES
+                            });
+                        }
                     });
-                    $scope.selectUserlist.selectedValueData = "";
-                    $scope.selectUserlist.selectedLabeData = "";
-                }, function (resp) {
-                    $loading.hide();
-                    $scope.showMsg('错误', '服务器错误');
-                });
+
+                    $scope.selectUserlist.selectedJData = [];
+                    $scope.selectUserlist.selectedLabeData = '';
+                    $scope.selectUserlist.selectedValueData = '';
+                }
             }
-        });
-        $scope.$watch('userList', function (newVal) {
-            $scope.setRemoveUser();
-        }, true);
-        $scope.setRemoveUser = function () {
-            $scope.selectUserlist.selectParams.removeUserId = "";
-            angular.forEach($scope.userList, function (val, index) {
-                $scope.selectUserlist.selectParams.removeUserId += val.USERCODE + ','
-            });
         };
 
         //选择党支部
@@ -174,9 +150,10 @@
             $scope.userList = [];
             $http({
                 method: 'get', url: '../../api/publicity/getPartyDuesUserListOfAddfee', params: {
-                    year: $scope.dataModel.year, partyCode: $scope.dataModel.partycode,
                     pageindex: 1,
                     pagesize: 10000,
+                    year: $scope.dataModel.year,
+                    partyCode: $scope.dataModel.partycode,
                     month: $scope.dataModel.month
                 }
             }).then(function (result) {
@@ -187,8 +164,7 @@
                         USERNAME: val.USERNAME,
                         USERCODE: val.USERCODE,
                         BASENUMBER: val.BASENUMBER,
-                        MONEY: val.MONEY,
-                        PARTYCODE: val.PARTYCODE
+                        MONEY: val.MONEY
                     });
                 });
 

+ 2 - 2
src/main/resources/static/app/main/publicity/partyDues/list.html

@@ -77,9 +77,9 @@
                             <button role-permission-code="partyDuesList.btnAdd" class="btn btn-default1"
                                     ng-click="addData()">设置交费基准
                             </button>
-                            <!--<button role-permission-code="partyDuesList.btnAdd" class="btn btn-default1"
+                            <button role-permission-code="partyDuesList.btnAdd" class="btn btn-default1"
                                     ng-click="multiAdd()">批量交费
-                            </button>-->
+                            </button>
                             <button role-permission-code="partyDuesList.btnImport" class="btn btn-primary dropdown-toggle"
                                     title="导入交费基准" ng-click="import()">
                                 导入交费基准