jiaosong
2023-08-18 a0be8dd44dfb4216293cfffdbb8ef1c406818b1f
#产出计算
已修改4个文件
20 ■■■■ 文件已修改
server/src/main/java/doumeemes/config/shiro/ShiroRealm.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/dao/ext/dto/SalaryParamDTO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/resources/mappers/SalaryParamMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
@@ -125,11 +125,11 @@
            per.setType(Constants.PlatType.admin);
        }else{
            if(authenticationToken.getCompanyId() == null){
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该账户异常!");
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该账户删除!");
            }
            com = companyExtService.getModelById(authenticationToken.getCompanyId());
            if(com == null){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该账户异常!");
            if(com == null || Constants.equalsInteger( com.getDeleted(),Constants.ONE)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该账户异常!请联系管理员");
            }
            if(Constants.equalsInteger( com.getStatus(),Constants.ZERO) ){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该企业已禁用!");
server/src/main/java/doumeemes/dao/ext/dto/SalaryParamDTO.java
@@ -1,8 +1,11 @@
package doumeemes.dao.ext.dto;
import doumeemes.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
 * @author 江蹄蹄
@@ -21,4 +24,10 @@
    @ApiModelProperty(value = "计价方式  0计件 1计时")
    private Integer type;
    @ApiModelProperty(value = "主组织编码(关联department表根组织)")
    private Integer rootDepartId;
    @ApiModelProperty(value = "工厂编码(关联department表)")
    private Integer departId;
}
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
@@ -155,7 +155,10 @@
    @Override
    public PageData<SalaryParamVO> findPage(PageWrap<SalaryParamDTO> pageWrap) {
        IPage<SalaryParam> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        SalaryParamDTO model = pageWrap.getModel();
        model.setRootDepartId(principal.getRootDepartment().getId());
        model.setDepartId(principal.getComDepartment().getId());
        IPage<SalaryParamVO> salaryParamVOIPage = salaryParamMapper.selectPage(page, model);
        if (!CollectionUtils.isEmpty(salaryParamVOIPage.getRecords())){
            salaryParamVOIPage.getRecords().forEach(s->s.setSalary(s.getSalary().divide(new BigDecimal(100))));
server/src/main/resources/mappers/SalaryParamMapper.xml
@@ -23,6 +23,8 @@
            or   m.`CODE` = #{model.keyWord})</if>
        <if test="model.procedureName != null and model.procedureName != ''"> and p.`NAME` like concat('%',#{model.procedureName},'%')</if>
        <if test="model.type != null"> and sp.`TYPE` = #{model.type}</if>
        <if test="model.rootDepartId != null"> and sp.`ROOT_DEPART_ID` = #{model.rootDepartId}</if>
        <if test="model.departId != null"> and sp.`DEPART_ID` = #{model.departId}</if>
        order by sp.CREATE_TIME desc
    </select>
</mapper>