限制主合同和价值字数,分月统计的查看限制
parent
3bcc010803
commit
50df4ecfb8
|
@ -223,7 +223,7 @@ public class AccountController extends BaseController {
|
||||||
public void export(@RequestParam(value = "keywords", required = false) String keywords, HttpServletResponse httpServletResponse) throws IOException {
|
public void export(@RequestParam(value = "keywords", required = false) String keywords, HttpServletResponse httpServletResponse) throws IOException {
|
||||||
Map<String, String> searchInfo = getSearchInfo(keywords);
|
Map<String, String> searchInfo = getSearchInfo(keywords);
|
||||||
downloadHeader(httpServletResponse, Utils.generateExcelName("人员信息"), "application/octet-stream");
|
downloadHeader(httpServletResponse, Utils.generateExcelName("人员信息"), "application/octet-stream");
|
||||||
String[] headers = {"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "所属角色", "公司邮件地址"};
|
String[] headers = {"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "角色名称", "公司邮件地址"};
|
||||||
String[] exportColumns = {"userName", "telephone", "realName", "workLocation", "deptName", "directManager", "positionName", "roleName", "companyEmail"};
|
String[] exportColumns = {"userName", "telephone", "realName", "workLocation", "deptName", "directManager", "positionName", "roleName", "companyEmail"};
|
||||||
ExportUtils.exportToExcel(headers, exportColumns, 1, 10000,
|
ExportUtils.exportToExcel(headers, exportColumns, 1, 10000,
|
||||||
httpServletResponse.getOutputStream(), (pN, pS) -> accountService.list(searchInfo, pN, pS).getList());
|
httpServletResponse.getOutputStream(), (pN, pS) -> accountService.list(searchInfo, pN, pS).getList());
|
||||||
|
@ -235,7 +235,7 @@ public class AccountController extends BaseController {
|
||||||
@RequestMapping("/template")
|
@RequestMapping("/template")
|
||||||
public void template(HttpServletResponse response) throws Exception {
|
public void template(HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
String[] headers = new String[]{"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "所属角色", "公司邮件地址"};
|
String[] headers = new String[]{"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "角色名称", "公司邮件地址"};
|
||||||
downloadHeader(response, Utils.generateExcelName("人员信息批量导入模板"));
|
downloadHeader(response, Utils.generateExcelName("人员信息批量导入模板"));
|
||||||
ExportUtils exportUtils = new ExportUtils(headers);
|
ExportUtils exportUtils = new ExportUtils(headers);
|
||||||
exportUtils.write(response.getOutputStream());
|
exportUtils.write(response.getOutputStream());
|
||||||
|
|
|
@ -551,6 +551,6 @@ public class ProjectController extends BaseController {
|
||||||
Project project = projectRepository.findOne(id);
|
Project project = projectRepository.findOne(id);
|
||||||
projectService.saveApprove(project, InterfaceUtil.getAdmin());
|
projectService.saveApprove(project, InterfaceUtil.getAdmin());
|
||||||
|
|
||||||
return ResponseMsg.buildSuccessMsg("成功");
|
return ResponseMsg.buildSuccessMsg("提交成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import cn.palmte.work.model.*;
|
||||||
import cn.palmte.work.utils.InterfaceUtil;
|
import cn.palmte.work.utils.InterfaceUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import top.jfunc.common.db.utils.Pagination;
|
||||||
import top.jfunc.common.utils.CollectionUtil;
|
import top.jfunc.common.utils.CollectionUtil;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -47,6 +48,12 @@ public class StatisticsService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectVisibleRepository projectVisibleRepository;
|
private ProjectVisibleRepository projectVisibleRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleRepository sysRoleRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Pagination pagination;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分月项目统计 获取主要指标数据、损益表
|
* 分月项目统计 获取主要指标数据、损益表
|
||||||
*
|
*
|
||||||
|
@ -67,9 +74,30 @@ public class StatisticsService {
|
||||||
include.setTitle("预算金额(含税)");
|
include.setTitle("预算金额(含税)");
|
||||||
exclude.setTitle("预算金额(不含税)");
|
exclude.setTitle("预算金额(不含税)");
|
||||||
|
|
||||||
int adminId = InterfaceUtil.getAdminId();
|
Admin admin = InterfaceUtil.getAdmin();
|
||||||
List<Integer> projectIds = projectVisibleRepository.findProjectIdByTypeAndTid(ProjectVisible.TYPE_USER, adminId);
|
List<Project> projectList = null;
|
||||||
|
//项目可见性,根据角色和人员id
|
||||||
|
int roleId = admin.getRoleId();
|
||||||
|
Integer adminId = admin.getId();
|
||||||
|
String sql = "select proj.id, proj.name, proj.approve_status_settle from project_settle_cost psc left join project proj on psc.project_id = proj.id ";
|
||||||
|
//自己创建的肯定能看见,配置的可以看见,系统管理员可以看见
|
||||||
|
SysRole sysRole = sysRoleRepository.findSysRoleById(roleId);
|
||||||
|
if(SysRole.ROLE_TYPE_SYSTEM != sysRole.getType()){
|
||||||
|
sql = sql + " where (proj.creator_id=? OR proj.id in (SELECT pv1.project_id FROM project_visible pv1 WHERE pv1.type=1 AND pv1.tid=? UNION SELECT pv2.project_id FROM project_visible pv2 WHERE pv2.type=2 AND pv2.tid=?)) group by proj.id order by proj.id asc";
|
||||||
|
projectList = pagination.find(sql, Project.class, adminId, roleId, adminId);
|
||||||
|
} else {
|
||||||
|
sql = sql + " group by proj.id order by proj.id asc";
|
||||||
|
projectList = pagination.find(sql, Project.class);
|
||||||
|
}
|
||||||
|
List<Project> projects = new ArrayList<>();
|
||||||
|
List<Integer> projectIds = new ArrayList<>();
|
||||||
|
for (Project project : projectList) {
|
||||||
|
if (project.getApproveStatusSettle() == 2) {
|
||||||
|
projects.add(project);
|
||||||
|
projectIds.add(project.getId());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(projectIds)){
|
if(CollectionUtil.isEmpty(projectIds)){
|
||||||
return statisticsBean;
|
return statisticsBean;
|
||||||
|
|
|
@ -147,6 +147,7 @@
|
||||||
minlength="1" maxlength="10"
|
minlength="1" maxlength="10"
|
||||||
required placeholder="请输入职位"/>
|
required placeholder="请输入职位"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th class="am-text-middle">账号角色</th>
|
<th class="am-text-middle">角色名称</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="am-u-sm-10">
|
<div class="am-u-sm-10">
|
||||||
<select data-am-selected id="roleId" name="roleId">
|
<select data-am-selected id="roleId" name="roleId">
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
<th class="table-title">一级部门</th>
|
<th class="table-title">一级部门</th>
|
||||||
<th class="table-title">直接主管</th>
|
<th class="table-title">直接主管</th>
|
||||||
<th class="table-title">职位</th>
|
<th class="table-title">职位</th>
|
||||||
<th class="table-title">所属角色</th>
|
<th class="table-title">角色名称</th>
|
||||||
<th class="table-title">公司邮件地址</th>
|
<th class="table-title">公司邮件地址</th>
|
||||||
<th class="table-title">操作</th>
|
<th class="table-title">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -191,16 +191,17 @@
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<input type="text" class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
<textarea rows="3" cols="20" id="mainContractCollectionTerms" name="mainContractCollectionTerms" maxlength="100"
|
||||||
name="mainContractCollectionTerms" placeholder="请输入收款条款" maxlength="20"
|
class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
||||||
value="${project.mainContractCollectionTerms}" required />
|
placeholder="请输入收款条款" required
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk"
|
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk" maxlength="500"
|
||||||
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
||||||
placeholder="请输入价值及风险" required
|
placeholder="请输入价值及风险" required
|
||||||
>${project.valueRisk!}</textarea>
|
>${project.valueRisk!}</textarea>
|
||||||
|
|
|
@ -164,16 +164,17 @@
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<input type="text" class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
<textarea rows="3" cols="20" id="mainContractCollectionTerms" name="mainContractCollectionTerms" maxlength="100"
|
||||||
name="mainContractCollectionTerms" placeholder="请输入收款条款" maxlength="20"
|
class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
||||||
value="" required />
|
placeholder="请输入收款条款" required
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk"
|
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk" maxlength="500"
|
||||||
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
||||||
placeholder="请输入价值及风险" required
|
placeholder="请输入价值及风险" required
|
||||||
></textarea>
|
></textarea>
|
||||||
|
|
|
@ -171,16 +171,17 @@
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>主合同收款条款</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<input type="text" class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
<textarea rows="3" cols="20" id="mainContractCollectionTerms" name="mainContractCollectionTerms" maxlength="100"
|
||||||
name="mainContractCollectionTerms" placeholder="请输入收款条款" maxlength="20"
|
class="am-input" data-validate-async data-validation-message="请输入收款条款"
|
||||||
value="${project.mainContractCollectionTerms}" required />
|
placeholder="请输入收款条款" required
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="am-g am-form-group am-margin-top">
|
<div class="am-g am-form-group am-margin-top">
|
||||||
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
<div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>价值及风险</div>
|
||||||
<div class="am-u-sm-6 am-u-md-6">
|
<div class="am-u-sm-6 am-u-md-6">
|
||||||
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk"
|
<textarea rows="5" cols="20" id="valueRisk" name="valueRisk" maxlength="500"
|
||||||
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
class="am-input" data-validate-async data-validation-message="请输入价值及风险"
|
||||||
placeholder="请输入价值及风险" required
|
placeholder="请输入价值及风险" required
|
||||||
>${project.valueRisk!}</textarea>
|
>${project.valueRisk!}</textarea>
|
||||||
|
|
|
@ -281,7 +281,7 @@
|
||||||
<#if list.approveStatusEstimate == 0 || list.approveStatusBudget == 0 || list.approveStatusSettle == 0 || list.approveStatusFinal == 0>
|
<#if list.approveStatusEstimate == 0 || list.approveStatusBudget == 0 || list.approveStatusSettle == 0 || list.approveStatusFinal == 0>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||||
onclick="approveProject('${list.id}')"><span
|
onclick="approveProject(${list.id})"><span
|
||||||
class="am-icon-pencil-square-o"></span>提交审核
|
class="am-icon-pencil-square-o"></span>提交审核
|
||||||
</button>
|
</button>
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -358,7 +358,7 @@
|
||||||
var approveProject = function (id) {
|
var approveProject = function (id) {
|
||||||
if (window.confirm('确定要提交审核吗?')) {
|
if (window.confirm('确定要提交审核吗?')) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${base}/project/saveApprove,
|
url: '${base}/project/saveApprove',
|
||||||
data: {id:id},
|
data: {id:id},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
|
|
Loading…
Reference in New Issue