jiangping
2024-06-20 49c7ea314c2070a2090fee2c77acbd21435f0455
提交一把
已修改7个文件
144 ■■■■■ 文件已修改
company/src/components/business/OperaApplyChangeDetailWindow.vue 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaInsuranceApplyWindow.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyShopWindow.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/additionSubtractionApplication.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/factoryChange.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/common/PublicController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaApplyChangeDetailWindow.vue
company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -457,9 +457,9 @@
        <!--    新增投保    -->
        <OperaInsuranceApplyAddWindow ref="operaInsuranceApplyAddWindow" @success="result" />
        <!--    加减保申请    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" />
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successChangeEvent" />
        <!--    更换派遣单位申请    -->
        <factoryChange ref="factoryChange" @success="successEvent" />
        <factoryChange ref="factoryChange" @success="successChangeUnitEvent" />
        <!-- 加减保详情 -->
        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" @success="successEvent"/>
        <!-- 更换派遣单位详情 -->
@@ -833,6 +833,14 @@
      }).catch(err => {
      })
    },
    successChangeEvent (param) {
      this.$refs.OperaApplyChangeDetailWindow.open('加减保详情',param)
      this.successEvent()
    },
    successChangeUnitEvent (param) {
      this.$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', param)
      this.successEvent()
    },
    successEvent () {
      // this.visible=false
      this.getDetail()
company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -465,9 +465,9 @@
        <!--    加减保申请    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" />
        <!--    更换派遣单位申请    -->
        <factoryChange ref="factoryChange" @success="successEvent" />
        <factoryChange ref="factoryChange" @success="successChangeUnitEvent" />
        <!-- 加减保详情 -->
        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" @success="successEvent"/>
        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" @success="successChangeEvent"/>
        <!-- 更换派遣单位详情 -->
        <OperaApplyChangeUnitDetailWindow ref="OperaApplyChangeUnitDetailWindow" @success="successEvent"/>
        <!--    验证手机号    -->
@@ -970,6 +970,14 @@
        this.successEvent()
      }
    },
    successChangeUnitEvent (param) {
      this.$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', param)
      this.successEvent()
    },
    successChangeEvent (param) {
      this.$refs.OperaApplyChangeDetailWindow.open('加减保详情',param)
      this.successEvent()
    },
    successEvent () {
      // this.visible=false
      this.getDetail()
company/src/components/enterprise/additionSubtractionApplication.vue
@@ -187,7 +187,7 @@
        <!--    详情    -->
        <ApplyChangeDetails1 ref="ApplyChangeDetails1" @success="success" />
        <!-- 加减保详情 -->
        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" />
<!--        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" />-->
    </GlobalWindow>
</template>
@@ -199,7 +199,7 @@
import importEmployees from '@/components/enterprise/importEmployees'
import confirmJobType from '@/components/enterprise/confirmJobType'
import ApplyChangeDetails1 from '@/components/business/ApplyChangeDetails1'
import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
// import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
import { all } from '@/api/business/solutions'
import { getDetail } from '@/api/business/insuranceApply'
import { create, getChangeCountCyclePriceVO } from '@/api/business/applyChange'
@@ -208,7 +208,15 @@
export default {
  name: 'additionSubtractionApplication',
  extends: BaseOpera,
  components: { GlobalWindow, selectEmployees, OperaApplyChangeDetailWindow, addEmployee, importEmployees, confirmJobType, ApplyChangeDetails1 },
  components: {
    GlobalWindow,
    selectEmployees,
    // OperaApplyChangeDetailWindow,
    addEmployee,
    importEmployees,
    confirmJobType,
    ApplyChangeDetails1
  },
  data () {
    return {
      form: {
@@ -407,8 +415,8 @@
      }).then(res => {
        this.visible = false
        this.$tip.apiSuccess('操作成功')
        this.$refs.OperaApplyChangeDetailWindow.open('加减保详情', { applyId: this.form.id, id: res })
        this.$emit('success')
        // this.$refs.OperaApplyChangeDetailWindow.open('加减保详情', { applyId: this.form.id, id: res })
        this.$emit('success', { applyId: this.form.id, id: res })
      }).catch(e => {
        this.$tip.apiFailed(e)
      }).finally(() => {
company/src/components/enterprise/factoryChange.vue
@@ -166,7 +166,7 @@
        <!--    详单    -->
        <ApplyChangeUnitDetails1 ref="ApplyChangeUnitDetails1" @success="success" />
        <!-- 更新派遣单位详情 -->
        <OperaApplyChangeUnitDetailWindow ref="OperaApplyChangeUnitDetailWindow" />
<!--        <OperaApplyChangeUnitDetailWindow ref="OperaApplyChangeUnitDetailWindow" />-->
    </GlobalWindow>
</template>
@@ -178,7 +178,7 @@
    import importEmployees from '@/components/enterprise/importEmployees'
    import confirmJobType from '@/components/enterprise/confirmJobType'
    import ApplyChangeUnitDetails1 from '@/components/business/ApplyChangeUnitDetails1'
    import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow'
// import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow'
    import { all } from '@/api/business/solutions'
    import { getDetail, findList } from '@/api/business/insuranceApply'
    import { create } from '@/api/business/applyChange'
@@ -186,7 +186,15 @@
    export default {
        name: 'factoryChange',
        extends: BaseOpera,
        components: { GlobalWindow, OperaApplyChangeUnitDetailWindow, selectEmployees, addEmployee, importEmployees, confirmJobType, ApplyChangeUnitDetails1 },
  components: {
    GlobalWindow,
    // OperaApplyChangeUnitDetailWindow,
    selectEmployees,
    addEmployee,
    importEmployees,
    confirmJobType,
    ApplyChangeUnitDetails1
  },
        data () {
            return {
                form: {
@@ -260,9 +268,9 @@
                    type: 1
                }).then(res => {
                    this.visible = false
                    this.$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', { applyId: this.form.id, id: res })
        // this.$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', { applyId: this.form.id, id: res })
                    this.$tip.apiSuccess('操作成功')
                    // this.$emit('success')
        this.$emit('success',{ applyId: this.form.id, id: res })
                }).catch(e => {
                    this.$tip.apiFailed(e)
                }).finally(() => {
@@ -316,7 +324,7 @@
                                    }
                                }
                            }
                        };
          }
                        this.changeSolution1(res.solutionId)
                    })
            },
@@ -424,7 +432,7 @@
                    })
                })
                this.seleData = []
                this.$refs.multipleTable.clearSelection();
      this.$refs.multipleTable.clearSelection()
            },
            // 选择员工
            sele() {
@@ -474,7 +482,7 @@
            },
            // 选取员工
            getValue1 (list) {
                let arr = JSON.parse(JSON.stringify(list))
      const arr = JSON.parse(JSON.stringify(list))
                arr.forEach(item => {
                    item.oldDuId = item.duId
@@ -500,7 +508,7 @@
                this.form.factory.push(...arr)
            },
            getValue(list) {
                let arr = JSON.parse(JSON.stringify(list))
      const arr = JSON.parse(JSON.stringify(list))
                arr.forEach(item => {
                    item.oldDuId = item.duId
server/company/src/main/java/com/doumee/api/common/PublicController.java
@@ -68,8 +68,6 @@
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode());
    }
    @ApiOperation(value = "上传图片", notes = "上传图片", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1088,30 +1088,10 @@
        applyChange.setIsdeleted(Constants.ZERO);
        //根据申请日期 处理加减保的 实际生效日期
        if(applyChange.getType().equals(Constants.ZERO)){
            if(Objects.nonNull(solutions.getAddValidDays())){
                applyChange.setApplyStartTime(
                        DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getAddValidDays())
                );
            initJJBValidTime(applyChange,insuranceApply,solutions);
            }else{
                applyChange.setApplyStartTime(applyChange.getValidTime());
            }
            if(Objects.nonNull(solutions.getDelValidDays())){
                applyChange.setDelValidTime(
                        DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getDelValidDays())
                );
            }else{
                applyChange.setDelValidTime(applyChange.getValidTime());
            }
            //仅支持替换  保证加减保日期为同一天
            if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){
                applyChange.setApplyStartTime(
                        applyChange.getDelValidTime()
                );
            }
        }else{
            applyChange.setApplyStartTime(applyChange.getValidTime());
        }
        applyChange.setStatus(Constants.ZERO);
        applyChangeMapper.insert(applyChange);
@@ -1180,7 +1160,6 @@
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "保单已过保,无法进行该操作");
        }
        if (DateUtil.compareDate(applyChange.getValidTime(),insuranceApply.getStartTime()) > Constants.ZERO) {
            //如果保单尚未生效,设置期望生效日期为保单生效开始时间
            applyChange.setValidTime(insuranceApply.getStartTime());
        }
        Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId());
@@ -1217,27 +1196,8 @@
        };
        if(applyChange.getType().equals(Constants.ZERO)){
            if(Objects.nonNull(solutions.getAddValidDays())){
                applyChange.setApplyStartTime(
                        DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getAddValidDays())
                );
            }else{
                applyChange.setApplyStartTime(applyChange.getValidTime());
            }
            if(Objects.nonNull(solutions.getDelValidDays())){
                applyChange.setDelValidTime(
                        DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getDelValidDays())
                );
            }else{
                applyChange.setDelValidTime(applyChange.getValidTime());
            }
            //仅支持替换  保证加减保日期为同一天
            if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){
                applyChange.setApplyStartTime(
                        applyChange.getDelValidTime()
                );
            }
            //处理期望生效日期
            initJJBValidTime(applyChange,insuranceApply,solutions);
        }else{
            applyChange.setApplyStartTime(applyChange.getValidTime());
        }
@@ -1267,6 +1227,34 @@
        return applyChange.getId();
    }
    private void initJJBValidTime(ApplyChange applyChange, InsuranceApply insuranceApply, Solutions solutions) {
        if( applyChange.getValidTime().getTime()>=insuranceApply.getStartTime().getTime()
                && Objects.nonNull(solutions.getAddValidDays())){
            //如果保单已生效,按照t+n的规则
            applyChange.setApplyStartTime(
                    DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getAddValidDays())
            );
        }else{
            //如果保单未生或者没有配置生效天数,设置期望生效日期为保单生效开始时间
            applyChange.setApplyStartTime(applyChange.getValidTime());
        }
        if(applyChange.getValidTime().getTime()>=insuranceApply.getStartTime().getTime()
                &&Objects.nonNull(solutions.getDelValidDays())){
            applyChange.setDelValidTime(
                    DateUtil.afterDateByType(applyChange.getValidTime(),0,solutions.getDelValidDays())
            );
        }else{
            applyChange.setDelValidTime(applyChange.getValidTime());
        }
        //仅支持替换  保证加减保日期为同一天
        if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){
            applyChange.setApplyStartTime(
                    applyChange.getDelValidTime()
            );
        }
    }
    public BigDecimal dealApplyChangeData(ApplyChange applyChange,InsuranceApply insuranceApply
            ,CompanySolution companySolution,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal fee){