Merge branch 'master' of https://gitea.chually.cn/chujinwang/chushangcloud
This commit is contained in:
commit
e2aeed72b2
|
|
@ -9,6 +9,7 @@ import lombok.Data;
|
|||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
|
|
@ -59,4 +61,8 @@ public class Template extends BaseEntity {
|
|||
@Condition(name = "template_type")
|
||||
@DictFormat(dictType = "template_type")
|
||||
private String templateType;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Condition(name = "create_time", type = Condition.ConditionType.between)
|
||||
private List<String> disposeTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class WrkProject extends BaseEntity {
|
|||
@TableField(exist = false)
|
||||
@Condition(name = "create_time", type = Condition.ConditionType.between)
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private List<LocalDateTime> createTimes;
|
||||
private List<String> createTimes;
|
||||
/**
|
||||
* 项目对应的 合同集合
|
||||
*/
|
||||
|
|
@ -141,4 +141,5 @@ public class WrkProject extends BaseEntity {
|
|||
private String contractUrl;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,4 +107,6 @@ public class WrkProjectContract extends BaseEntity {
|
|||
*/
|
||||
@TableField(exist = false)
|
||||
private List<WrkAudit> audits;
|
||||
|
||||
private String mimeType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,9 @@ public class WrkAuditRuleQuery extends CommonParam {
|
|||
private String name;
|
||||
|
||||
|
||||
|
||||
@Condition(name = "create_time", type = Condition.ConditionType.between)
|
||||
private List<String> createTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,20 @@
|
|||
package com.chushang.inspection.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chushang.inspection.project.po.WrkProject;
|
||||
import com.chushang.inspection.project.po.WrkProjectContract;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/15 10:51
|
||||
*/
|
||||
public interface WrkProjectMapper extends BaseMapper<WrkProject> {
|
||||
@Select("select wrk.*,file.mime_type as mimeType from \n" +
|
||||
"tb_inspection.wrk_project_contract wrk \n" +
|
||||
"left join tb_file.tb_file_source_info file on wrk.remark = file.fid \n" +
|
||||
" where wrk.project_id = #{projectId}")
|
||||
IPage<WrkProjectContract> selectContractsWithAdditionalData(IPage<WrkProjectContract> page, @Param("projectId") Long projectId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import com.chushang.common.mybatis.page.CommonParam;
|
|||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||
import com.chushang.inspection.project.dto.PageAuditDTO;
|
||||
import com.chushang.inspection.project.mapper.WrkProjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.inspection.project.mapper.WrkProjectContractMapper;
|
||||
|
|
@ -42,13 +44,18 @@ public class WrkProjectContractService extends ServiceImpl<WrkProjectContractMap
|
|||
// return pageList(contract, commonParam);
|
||||
// }
|
||||
|
||||
@Autowired
|
||||
private WrkProjectMapper wrkProjectMapper;
|
||||
public PageResult pageList(WrkProjectContract contract, CommonParam commonParam) {
|
||||
LambdaQueryWrapper<WrkProjectContract> queryWrapper = WrapperUtils.builder(contract, commonParam);
|
||||
IPage<WrkProjectContract> page = this.page(
|
||||
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(), commonParam.getLimit()),
|
||||
queryWrapper
|
||||
);
|
||||
return new PageResult(page);
|
||||
// LambdaQueryWrapper<WrkProjectContract> queryWrapper = WrapperUtils.builder(contract, commonParam);
|
||||
// IPage<WrkProjectContract> page = this.page(
|
||||
// new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(), commonParam.getLimit()),
|
||||
// queryWrapper
|
||||
// );
|
||||
IPage<WrkProjectContract> page = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||
IPage<WrkProjectContract> resultPage = wrkProjectMapper.selectContractsWithAdditionalData(page, contract.getProjectId());
|
||||
return new PageResult(resultPage);
|
||||
// return new PageResult(page);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -142,19 +142,19 @@ public class WrkProjectService extends ServiceImpl<WrkProjectMapper, WrkProject>
|
|||
BeanUtil.copyProperties(project, wrkProject);
|
||||
this.updateById(wrkProject);
|
||||
// 项目合同
|
||||
// WrkProjectContract contract = WrkProjectContract.builder().build();
|
||||
// BeanUtil.copyProperties(project.getContract(), contract);
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// // 在 之前 && 在 之后 无效
|
||||
// if (now.isBefore(contract.getContractStartTime()) && now.isAfter(contract.getContractEndTime())) {
|
||||
// contract.setProjectEffect(0);
|
||||
// }else {
|
||||
// contract.setProjectEffect(1);
|
||||
// }
|
||||
// // 未回款完成
|
||||
// contract.setPaymentState(0);
|
||||
// 项目合同 修改时不需要 项目id
|
||||
// contractService.updateById(contract);
|
||||
WrkProjectContract contract = WrkProjectContract.builder().build();
|
||||
BeanUtil.copyProperties(project.getContract(), contract);
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
// 在 之前 && 在 之后 无效
|
||||
if (now.isBefore(contract.getContractStartTime()) && now.isAfter(contract.getContractEndTime())) {
|
||||
contract.setProjectEffect(0);
|
||||
}else {
|
||||
contract.setProjectEffect(1);
|
||||
}
|
||||
// 未回款完成
|
||||
contract.setPaymentState(0);
|
||||
//项目合同 修改时不需要 项目id
|
||||
contractService.updateById(contract);
|
||||
return wrkProject.getProjectId();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.chushang.oss.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FileVo {
|
||||
private String fid;
|
||||
private String mimeType;
|
||||
private String realPath;
|
||||
private String fileName;
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ import com.chushang.oss.config.UploadConfig;
|
|||
import com.chushang.oss.entity.FileSourceInfo;
|
||||
import com.chushang.oss.entity.dto.OcrDTO;
|
||||
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||
import com.chushang.oss.entity.vo.FileVo;
|
||||
import com.chushang.oss.enums.OcrTypeEnum;
|
||||
import com.chushang.oss.mapper.FileSourceMapper;
|
||||
import com.chushang.security.utils.SecurityUtils;
|
||||
|
|
@ -253,7 +254,7 @@ public class FileSourceService
|
|||
return upload;
|
||||
}
|
||||
|
||||
public String uploadContract(MultipartFile file) throws Exception
|
||||
public FileVo uploadContract(MultipartFile file) throws Exception
|
||||
{
|
||||
String ip = IPUtils.clientIp(ServletUtils.getRequest());
|
||||
String fid = generateFid();
|
||||
|
|
@ -284,7 +285,12 @@ public class FileSourceService
|
|||
String upload = ossService.upload(file.getInputStream(), fileSourceInfo);
|
||||
fileSourceInfo.setRealPath(upload);
|
||||
save(fileSourceInfo);
|
||||
return upload;
|
||||
FileVo fileVo = new FileVo();
|
||||
fileVo.setRealPath(upload);
|
||||
fileVo.setFid(fid);
|
||||
fileVo.setMimeType(mimetype);
|
||||
fileVo.setFileName(fName);
|
||||
return fileVo;
|
||||
}
|
||||
|
||||
public FileSourceVo addFile(byte[] bytes, String fileName, Boolean sealFlag, String formats, String fileType)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ public class ListDeptDTO extends CommonParam {
|
|||
|
||||
private String deptName;
|
||||
|
||||
private Boolean status;
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class ListMenuDTO extends CommonParam {
|
|||
/**
|
||||
* 状态
|
||||
*/
|
||||
private boolean status;
|
||||
private Integer status;
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import java.util.Objects;
|
|||
public class ListRoleDTO extends CommonParam {
|
||||
private String roleName;
|
||||
private String roleKey;
|
||||
private Boolean status;
|
||||
private Integer status;
|
||||
private Params params;
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class RoleController {
|
|||
public AjaxResult list(
|
||||
@RequestParam(required = false) String roleName,
|
||||
@RequestParam(required = false) String roleKey,
|
||||
@RequestParam(required = false) Boolean status,
|
||||
@RequestParam(required = false) Integer status,
|
||||
@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<if test="deptName != null and deptName != ''">
|
||||
AND d.dept_name like concat('%', #{deptName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
<if test="status != null ">
|
||||
AND d.status = #{status}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
<if test="visible != null and visible != ''">
|
||||
AND visible = #{visible}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
<if test="status != null ">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
order by parent_id, order_num
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
<if test="visible != null and visible != ''">
|
||||
AND m.visible = #{visible}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
<if test="status != null ">
|
||||
AND m.status = #{status}
|
||||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<if test="listRole.roleName != null and listRole.roleName != ''">
|
||||
AND r.role_name like concat('%', #{listRole.roleName}, '%')
|
||||
</if>
|
||||
<if test="listRole.status != null">
|
||||
<if test="listRole.status != null ">
|
||||
AND r.status = #{listRole.status}
|
||||
</if>
|
||||
<if test="listRole.roleKey != null and listRole.roleKey != ''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue