|
@@ -13,6 +13,7 @@ import com.dayou.entity.*;
|
|
|
import com.dayou.enums.MainBusinessEnum;
|
|
|
import com.dayou.enums.ProductionEnum;
|
|
|
import com.dayou.enums.ReportStatus;
|
|
|
+import com.dayou.enums.TakeNumberEnum;
|
|
|
import com.dayou.enums.workflow.NodeLogEnum;
|
|
|
import com.dayou.exception.ErrorCode;
|
|
|
import com.dayou.mapper.*;
|
|
@@ -173,25 +174,10 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
|
|
|
@Override
|
|
|
public Boolean update(MajorProduction taskData) {
|
|
|
String reportNo = taskData.getReportNo();
|
|
|
- MajorProduction production = this.getById(taskData.getId());
|
|
|
- BigDecimal evaluateAmount = taskData.getEvaluateAmount();
|
|
|
- Major major = majorService.getOne(new LambdaQueryWrapper<Major>().eq(BaseEntity::getId, production.getMajorId())
|
|
|
- .select(BaseEntity::getId, Major::getEvaluateAim));
|
|
|
- //抵押类是否需要复审和三审逻辑 ?
|
|
|
- if (major.getEvaluateAim().equals(PLEDGE)){
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MIN)<=0){
|
|
|
- taskData.setSecondCheck(ReportStatus.不审.name());
|
|
|
- taskData.setThirdCheck(ReportStatus.不审.name());
|
|
|
- }
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MIN)>0 && evaluateAmount.compareTo(EVALUATE_MAX)<=0){
|
|
|
- taskData.setSecondCheck(ReportStatus.待审核.name());
|
|
|
- taskData.setThirdCheck(ReportStatus.不审.name());
|
|
|
- }
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MAX)>0){
|
|
|
- taskData.setSecondCheck(ReportStatus.待审核.name());
|
|
|
- taskData.setThirdCheck(ReportStatus.待审核.name());
|
|
|
- }
|
|
|
- }
|
|
|
+ Major major = majorService.getOne(new LambdaQueryWrapper<Major>().eq(BaseEntity::getId, taskData.getMajorId())
|
|
|
+ .select(BaseEntity::getId, Major::getEvaluateAim,Major::getBusinessObjectType));
|
|
|
+ taskData.setBusinessObjectType(major.getBusinessObjectType());
|
|
|
+ checkingRule(taskData);
|
|
|
List<MajorTarget> targets = null;
|
|
|
String productionType = taskData.getProduction();
|
|
|
|
|
@@ -493,23 +479,8 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
|
|
|
|
|
|
@Override
|
|
|
public void updateEvaluateAmountAndCheckState(MajorProduction majorProduction) {
|
|
|
- BigDecimal evaluateAmount = majorProduction.getEvaluateAmount();
|
|
|
- if (majorProduction.getEvaluateAim().equals(PLEDGE)) {
|
|
|
- //抵押类是否需要复审和三审逻辑 ?
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MIN) <= 0) {
|
|
|
- majorProduction.setSecondCheck(ReportStatus.不审.name());
|
|
|
- majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
- }
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MIN) > 0 && evaluateAmount.compareTo(EVALUATE_MAX) <= 0) {
|
|
|
- majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
- majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
- }
|
|
|
- if (evaluateAmount.compareTo(EVALUATE_MAX) > 0) {
|
|
|
- majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
- majorProduction.setThirdCheck(ReportStatus.待审核.name());
|
|
|
- }
|
|
|
- }
|
|
|
- this.update(new LambdaUpdateWrapper<MajorProduction>().set(MajorProduction::getEvaluateAmount,evaluateAmount)
|
|
|
+ checkingRule(majorProduction);
|
|
|
+ this.update(new LambdaUpdateWrapper<MajorProduction>().set(MajorProduction::getEvaluateAmount,majorProduction.getEvaluateAmount())
|
|
|
.set(MajorProduction::getSecondCheck,majorProduction.getSecondCheck())
|
|
|
.set(MajorProduction::getThirdCheck,majorProduction.getThirdCheck()).eq(BaseEntity::getId,majorProduction.getId()));
|
|
|
}
|
|
@@ -521,6 +492,55 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 复审三审规则
|
|
|
+ * @param majorProduction
|
|
|
+ */
|
|
|
+ private void checkingRule(MajorProduction majorProduction) {
|
|
|
+ String evaluateAim = majorProduction.getWorkPurpose();
|
|
|
+ BigDecimal evaluateAmount = majorProduction.getEvaluateAmount();
|
|
|
+ String businessObjectType = majorProduction.getBusinessObjectType();
|
|
|
+ String production = majorProduction.getProduction();
|
|
|
+ if (evaluateAim.equals(RENT)){
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.不审.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
+ }else {
|
|
|
+ //土地审核规则
|
|
|
+ if (businessObjectType.equals(TakeNumberEnum.LAND_NUMBER.getType()) && REPORT.name().equals(production)){
|
|
|
+ if (majorProduction.getIsRecord()){
|
|
|
+ //要备案
|
|
|
+ if (evaluateAmount.compareTo(EVALUATE_MAX)<=0){
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
+ }else{
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.待审核.name());
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //不备案
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.待审核.name());
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //房地产审核规则 抵押类是否需要复审和三审逻辑 ?
|
|
|
+ if (evaluateAim.equals(PLEDGE)){
|
|
|
+ if (evaluateAmount.compareTo(EVALUATE_MIN)<=0){
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.不审.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
+ }
|
|
|
+ if (evaluateAmount.compareTo(EVALUATE_MIN)>0 && evaluateAmount.compareTo(EVALUATE_MAX)<=0){
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.不审.name());
|
|
|
+ }
|
|
|
+ if (evaluateAmount.compareTo(EVALUATE_MAX)>0){
|
|
|
+ majorProduction.setSecondCheck(ReportStatus.待审核.name());
|
|
|
+ majorProduction.setThirdCheck(ReportStatus.待审核.name());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Boolean batchSaveFile(List<TaskTodoVO> todoVOList) {
|