Commit 0da6a1e8 authored by neo's avatar neo

[BugFix] fixed project change period and upate status

parent 07b1cbc1
...@@ -3,13 +3,10 @@ package pwc.taxtech.atms.controller; ...@@ -3,13 +3,10 @@ package pwc.taxtech.atms.controller;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto; import pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto;
import pwc.taxtech.atms.entity.ProjectStatusManage;
import pwc.taxtech.atms.service.impl.IdentityServiceImpl; import pwc.taxtech.atms.service.impl.IdentityServiceImpl;
import pwc.taxtech.atms.service.impl.ProjectStatusManageServiceImpl; import pwc.taxtech.atms.service.impl.ProjectStatusManageServiceImpl;
...@@ -42,4 +39,11 @@ public class ProjectStatusManageController { ...@@ -42,4 +39,11 @@ public class ProjectStatusManageController {
@PathVariable Integer periodId) { @PathVariable Integer periodId) {
return projectStatusManageService.getProjectStatus(projectId, periodId); return projectStatusManageService.getProjectStatus(projectId, periodId);
} }
@RequestMapping("isProjectStatusExisted/{projectId}/{periodId}")
@ResponseBody
public OperationResultDto<ProjectStatusManage> isProjectStatusExisted(@PathVariable String projectId,
@PathVariable int periodId) {
return projectStatusManageService.isProjectStatusExisted(projectId, periodId);
}
} }
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -124,4 +125,15 @@ public class ProjectStatusManageServiceImpl { ...@@ -124,4 +125,15 @@ public class ProjectStatusManageServiceImpl {
} }
} }
public OperationResultDto<ProjectStatusManage> isProjectStatusExisted(String projectId, int periodId) {
ProjectStatusManageExample example = new ProjectStatusManageExample();
example.createCriteria().andProjectIdEqualTo(projectId).andPeriodIdEqualTo(Integer.parseInt(projectId));
List<ProjectStatusManage> manage = projectStatusManageMapper.selectByExample(example);
OperationResultDto<ProjectStatusManage> dto = new OperationResultDto();
dto.setResult(true);
dto.setResultMsg(StringUtils.EMPTY);
dto.setData(manage.isEmpty() ? null : manage.get(0));
return dto;
}
} }
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="cell-info-subject"> <div class="cell-info-subject">
<label class="cell-info-subject-label">{{'CellValue' | translate}}:</label> <label class="cell-info-subject-label">{{'CellValue' | translate}}:</label>
<span title="{{detail.cellInfo.modifiedReportCell?detail.cellInfo.modifiedReportCell.comment:''}}">{{detail.cellInfo.money}}</span> <span title="{{detail.cellInfo.modifiedReportCell?detail.cellInfo.modifiedReportCell.comment:''}}">{{detail.cellInfo.money}}</span>
<a href="javascript:void(0)" ng-click="openModifyCellDataDialog()">{{'Change' | translate}}</a> <!--<a href="javascript:void(0)" ng-click="openModifyCellDataDialog()">{{'Change' | translate}}</a>-->
<a href="javascript:void(0)" ng-if="detail.cellInfo.modifiedReportCell != null" ng-click="resetReportCell()">{{'Reset' | translate}}</a> <a href="javascript:void(0)" ng-if="detail.cellInfo.modifiedReportCell != null" ng-click="resetReportCell()">{{'Reset' | translate}}</a>
</div> </div>
</div> </div>
......
...@@ -43,8 +43,8 @@ webservices.factory('projectService', ['$http', 'apiConfig', function ($http, ap ...@@ -43,8 +43,8 @@ webservices.factory('projectService', ['$http', 'apiConfig', function ($http, ap
isImportedAnyData: function (periodId,projectId) { isImportedAnyData: function (periodId,projectId) {
return $http.get('/ProjectStatusManage/isImportedAnyData/' + periodId + '/' + projectId, apiConfig.createVat()); return $http.get('/ProjectStatusManage/isImportedAnyData/' + periodId + '/' + projectId, apiConfig.createVat());
}, },
isProjectStatusExisted: function (dbName, periodId) { isProjectStatusExisted: function (projectId, periodId) {
return $http.get('/ProjectStatusManage/isProjectStatusExisted/' + dbName + '/' + periodId, apiConfig.createVat()); return $http.get('/ProjectStatusManage/isProjectStatusExisted/' + projectId + '/' + periodId, apiConfig.createVat());
}, },
getProjectAllStatus: function (projectId) { getProjectAllStatus: function (projectId) {
return $http.get('/project/getProjectAllStatus/' + projectId, apiConfig.create()); return $http.get('/project/getProjectAllStatus/' + projectId, apiConfig.create());
......
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