Commit 03559863 authored by wangxl's avatar wangxl

77

parent 9298b6e7
......@@ -27,11 +27,11 @@ public class ComProjectStageGoal extends BaseEntity {
private String objectId;
/** 内容 */
@ApiModelProperty(value = "内容", position = 2 )
@Length(max=2000, message = "内容不能大于2000")
@Length(max=3000, message = "内容不能大于3000")
private String contentInfo;
/** 阶段目标 */
@ApiModelProperty(value = "阶段目标", position = 5 )
@Length(max=500, message = "阶段目标不能大于500")
@Length(max=3000, message = "阶段目标不能大于3000")
private String target;
/** 开始时间 */
@ApiModelProperty(value = "开始时间", position = 3 )
......@@ -41,10 +41,6 @@ public class ComProjectStageGoal extends BaseEntity {
@ApiModelProperty(value = "结束时间", position = 4 )
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 类型 (参数表获取) */
@ApiModelProperty(value = "类型 (参数表获取)", position = 5 )
@Length(max=36, message = "类型 (参数表获取)不能大于36")
private String contentType;
/** 排序 */
@ApiModelProperty(value = "排序", position = 6 )
private Integer showIndex;
......
......@@ -307,12 +307,7 @@ public class CommonEnum {
public enum projState implements INumberEnum {
draft(-10, "起草"),
waitSubmit(10, "待提交"),
toUnit(20, "单位评审"),
toCounty(22, "县(区)评审"),
toCity(24, "州(市)评审"),
toProvinceFirstTrial(25, "省卫健委初审"),
toExpert(26, "专家评审"),
toProvince(28, "省卫健委复审"),
toAudit(20, "评审中"),
returnModify(30, "返回修改"),
failed(40, "未批准立项"),
pass(50, "批准立项"),
......
......@@ -317,6 +317,9 @@ public class ComProjectDTO extends BaseDTO {
/** 合作单位 */
private List<ComProjectCooperativeUnitsDTO> cooperativeUnits;
/** 项目主要参与单位 */
private List<ComProjectCooperativeUnitsDTO> participateUnits;
/** 项目组成员 */
private List<ComProjectMembersDTO> members;
/** 经费表 */
......
......@@ -26,11 +26,11 @@ public class ComProjectStageGoalDTO extends BaseDTO {
private String objectId;
/** 内容 */
@ApiModelProperty(value = "内容", position = 2 )
@Length(max=2000, message = "内容不能大于2000")
@Length(max=3000, message = "内容不能大于3000")
private String contentInfo;
/** 阶段目标 */
@ApiModelProperty(value = "阶段目标", position = 5 )
@Length(max=500, message = "阶段目标不能大于500")
@Length(max=3000, message = "阶段目标不能大于3000")
private String target;
/** 开始时间 */
@ApiModelProperty(value = "开始时间", position = 3 )
......@@ -40,10 +40,6 @@ public class ComProjectStageGoalDTO extends BaseDTO {
@ApiModelProperty(value = "结束时间", position = 4 )
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 类型 (参数表获取) */
@ApiModelProperty(value = "类型 (参数表获取)", position = 5 )
@Length(max=36, message = "类型 (参数表获取)不能大于36")
private String contentType;
/** 排序 */
@ApiModelProperty(value = "排序", position = 6 )
private Integer showIndex;
......
......@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
......@@ -26,8 +27,13 @@ public class ComProjectStageGoalQueryVO extends PaginationVO{
@ApiModelProperty(value = "任务书Id", position = 1)
private String objectId;
/** 内容 */
@ApiModelProperty(value = "内容", position = 2)
@ApiModelProperty(value = "内容", position = 2 )
@Length(max=3000, message = "内容不能大于3000")
private String contentInfo;
/** 阶段目标 */
@ApiModelProperty(value = "阶段目标", position = 5 )
@Length(max=3000, message = "阶段目标不能大于3000")
private String target;
/** 开始时间 */
@ApiModelProperty(value = "开始时间", position = 3)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
......@@ -36,9 +42,6 @@ public class ComProjectStageGoalQueryVO extends PaginationVO{
@ApiModelProperty(value = "结束时间", position = 4)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 类型 (参数表获取) */
@ApiModelProperty(value = "类型 (参数表获取)", position = 5)
private String contentType;
/** 排序 */
@ApiModelProperty(value = "排序", position = 6)
private Integer showIndex;
......
......@@ -133,11 +133,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
break;
case 3:
criteria.in("proj_state",
CommonEnum.projState.toUnit.getCode(),
CommonEnum.projState.toCounty.getCode(),
CommonEnum.projState.toCity.getCode(),
CommonEnum.projState.toProvince.getCode(),
CommonEnum.projState.toExpert.getCode(),
CommonEnum.projState.toAudit.getCode(),
CommonEnum.projState.failed.getCode(),
CommonEnum.projState.pass.getCode(),
CommonEnum.projState.report.getCode(),
......@@ -571,35 +567,6 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
this.update(comProject);
}
/**
* 更新项目状态
*
* @return
*/
private void updateStateByAuditUnitId(String id, String auditUnitId, String unitId, Integer projType) {
Integer state = null;
ComUnit unit = comUnitService.getById(unitId);
if (null == unit)
throw new BusinessException("审核单位不存在或已删除!");
Integer level = unit.getTreeCode().length() / properties.getDefaultCodeLength();
if (auditUnitId.equals(unitId)) {
state = CommonEnum.projState.toExpert.getCode();
} else if (unit.getUnitType().equals(CommonEnum.unitType.gov.getCode())) {
if (level.equals(1)) {
if (projType.equals(CommonEnum.projType.key.getCode()))
state = CommonEnum.projState.toProvinceFirstTrial.getCode();
else
state = CommonEnum.projState.toExpert.getCode();
} else if (level.equals(2)) {
state = CommonEnum.projState.toCity.getCode();
} else {
state = CommonEnum.projState.toCounty.getCode();
}
} else {
state = CommonEnum.projState.toUnit.getCode();
}
this.updateState(id, state, null);
}
public String updateUnit(ComProjectDTO dto) {
if (Objects.isNull(dto.getAppUnitId()))
......@@ -623,7 +590,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
else
versionNo = this.getVersionNo(comProject.getVersionNo());
// 更新项目状态
this.updateState(model.getAuditObjectId(), CommonEnum.projState.toUnit.getCode(), versionNo);
this.updateState(model.getAuditObjectId(), CommonEnum.projState.toAudit.getCode(), versionNo);
}
@Transactional
......@@ -638,6 +605,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
throw new BusinessException("申报单位不存在,或已删除!");
// 返回上级或下级单位Id, 最高级或个人返回 null
String unitId = comProjectAuditService.audit(report, appUnit.getTreeCode(), auditTreeCode);
// 处理项目状态
Integer projState = null;
if (report.getAuditResult().equals(CommonEnum.auditResult.pass.getCode())) {
......@@ -651,8 +619,6 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
}
if (null != projState)
this.updateState(report.getAuditObjectId(), projState, null);
else
this.updateStateByAuditUnitId(report.getAuditObjectId(), auditUnitId, unitId, model.getProjType());
}
public DataStatisticsDTO getCount(ComProject e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment