2024-2-28需求调整
This commit is contained in:
parent
49bdb05b8f
commit
d28690ed3c
|
@ -71,6 +71,16 @@ public class BusinessContractController {
|
|||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 立项列表
|
||||
*/
|
||||
@RequestMapping("/projectListPc")
|
||||
@RequiresPermissions("business:businesscontract:list")
|
||||
public R projectListPc(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = businessProjectService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 立项负责工人idList
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package io.renren.modules.business.controller;
|
||||
|
||||
import io.renren.common.utils.*;
|
||||
import io.renren.modules.business.entity.BusinessDictEntity;
|
||||
import io.renren.modules.business.entity.BusinessOutlayEntity;
|
||||
import io.renren.modules.business.entity.BusinessProjectEntity;
|
||||
import io.renren.modules.business.entity.BusinessWorkerEntity;
|
||||
import io.renren.modules.business.entity.*;
|
||||
import io.renren.modules.business.service.*;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -15,11 +12,10 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
import static io.renren.common.utils.ShiroUtils.getUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 支出明细表
|
||||
|
@ -68,14 +64,14 @@ public class BusinessOutlayController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 列表 PC端不含翻页
|
||||
* 列表 PC端含翻页
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/pcListNoPage")
|
||||
@RequiresPermissions("business:businessoutlay:list")
|
||||
public R pcListNoPage(@RequestParam Map<String, Object> params){
|
||||
List<BusinessOutlayEntity> page = businessOutlayService.pcListNoPage(params);
|
||||
PageUtils page = businessOutlayService.pcListPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
@ -148,19 +144,168 @@ public class BusinessOutlayController {
|
|||
if(businessOutlayIncomeService.getLockedCnt(param) > 0) {
|
||||
return R.error("所选日期已经阶段提交,无法添加明细!");
|
||||
}
|
||||
if(businessOutlay.getId() == null) {
|
||||
BusinessOutlayEntity businessOutlayOld = null;
|
||||
if(businessOutlay.getId() == null || businessOutlay.getId() == 0) {
|
||||
businessOutlay.setCreateTime(new Date());
|
||||
businessOutlay.setUpdateTime(new Date());
|
||||
businessOutlayService.save(businessOutlay);
|
||||
businessOutlayService.ifSave(businessOutlay.getOutTime(),businessOutlay.getWriteUserId().toString(),0);
|
||||
// businessOutlayService.ifSave(businessOutlay.getOutTime(),businessOutlay.getWriteUserId().toString(),0);
|
||||
} else {
|
||||
businessOutlayOld = businessOutlayService.getById(businessOutlay.getId());//通过ID取原数据的日期,用来比较日期重新计算收支
|
||||
businessOutlay.setUpdateTime(new Date());
|
||||
businessOutlayService.updateById(businessOutlay);
|
||||
}
|
||||
|
||||
if(businessOutlay.getWriteUserId()!=null && businessOutlay.getWriteUserId()!= 10 && businessOutlay.getWriteUserId()!= 1){
|
||||
afresh(businessOutlay,businessOutlayOld);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/***
|
||||
* 重新计算
|
||||
* 支出修改或新增时:
|
||||
* 1、判断收支是否存在,不存在则创建
|
||||
* 2、判断是否是修改了时间(原支出数据获取时间,通过原时间和新时间进行比较),取最小时间为其实开始重新计算
|
||||
* 3、判断最小时间的收支是否存在,不存在则创建,存在则修改此日支出金额、今日余额
|
||||
* 4、循环修改最小时间之后的收支数据,直到没有下一日数据为止
|
||||
*/
|
||||
private void afresh(BusinessOutlayEntity businessOutlay,BusinessOutlayEntity businessOutlayOld){
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
Date outTime = businessOutlay.getOutTime();
|
||||
param.put("outinDate", outTime);
|
||||
param.put("writeUserId", businessOutlay.getWriteUserId());
|
||||
param.put("userId", businessOutlay.getWriteUserId());
|
||||
param.put("startTime", DateUtils.format(outTime));
|
||||
param.put("endTime", DateUtils.format(outTime));
|
||||
//判断新日期是否有收支数据,没有则创建
|
||||
BusinessOutlayIncomeEntity incomeEntity = businessOutlayIncomeService.getOutInByDate(param);
|
||||
if(incomeEntity!=null){
|
||||
|
||||
}else{
|
||||
//新增,1、取昨天数据(今日之前的最大日期的数据中)的今日余额;2、今日收入暂置成0;3、取当前的支出汇总;4、计算今日余额;5、增加收支数据
|
||||
incomeEntity = new BusinessOutlayIncomeEntity();
|
||||
incomeEntity.setOutinDate(outTime);//日期
|
||||
// 查询昨日余额,就是总结里除去今天最大一天的今日余额
|
||||
BigDecimal zrye = businessOutlayIncomeService.getZrye(param);
|
||||
Double zryeb = 0d;
|
||||
if(zrye != null){
|
||||
zryeb = zrye.doubleValue();
|
||||
}
|
||||
incomeEntity.setOutinYdayBalance(zryeb);//昨日余额
|
||||
incomeEntity.setOutinTdayIncome(0);//今日收入
|
||||
Double jrzc = businessOutlayService.getTotalByHJGId(param);
|
||||
if(jrzc == null) {
|
||||
jrzc = 0d;
|
||||
}
|
||||
incomeEntity.setOutinTdayOut(jrzc);//今日支出
|
||||
Double jrye = zryeb - jrzc;
|
||||
incomeEntity.setOutinTdayBalance(jrye);//今日余额
|
||||
incomeEntity.setStatus(0);
|
||||
incomeEntity.setApproval(0);
|
||||
incomeEntity.setWriteUserId(businessOutlay.getWriteUserId());
|
||||
incomeEntity.setCreateTime(new Date());
|
||||
incomeEntity.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.save(incomeEntity);
|
||||
}
|
||||
|
||||
//判断原日期与新日期,原日期如比新日期小,则从原日期时间开始重新计算
|
||||
if(businessOutlayOld!=null){
|
||||
Date outTimeOld = businessOutlayOld.getOutTime();
|
||||
if (outTimeOld.compareTo(outTime) < 0) {
|
||||
outTime = outTimeOld;
|
||||
}
|
||||
}
|
||||
|
||||
param.put("outinDate", outTime);
|
||||
param.put("writeUserId", businessOutlay.getWriteUserId());
|
||||
param.put("userId", businessOutlay.getWriteUserId());
|
||||
param.put("startTime", DateUtils.format(outTime));
|
||||
param.put("endTime", DateUtils.format(outTime));
|
||||
|
||||
incomeEntity = businessOutlayIncomeService.getOutInByDate(param);
|
||||
if(incomeEntity!=null){
|
||||
//修改,1、获取当前的支出汇总;2、计算今日余额;3、修改
|
||||
Double zrye = incomeEntity.getOutinYdayBalance();//昨日余额
|
||||
if(zrye == null) {
|
||||
zrye = 0d;
|
||||
}
|
||||
Double jrsr = incomeEntity.getOutinTdayIncome();//今日收入
|
||||
if(jrsr == null) {
|
||||
jrsr = 0d;
|
||||
}
|
||||
Double jrzc = businessOutlayService.getTotalByHJGId(param);
|
||||
if(jrzc == null) {
|
||||
jrzc = 0d;
|
||||
}
|
||||
incomeEntity.setOutinTdayOut(jrzc);//今日支出
|
||||
Double jrye = zrye + jrsr - jrzc;
|
||||
incomeEntity.setOutinTdayBalance(jrye);//今日余额
|
||||
incomeEntity.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.updateById(incomeEntity);
|
||||
}else{
|
||||
//新增,1、取昨天数据(今日之前的最大日期的数据中)的今日余额;2、今日收入暂置成0;3、取当前的支出汇总;4、计算今日余额;5、增加收支数据
|
||||
incomeEntity = new BusinessOutlayIncomeEntity();
|
||||
incomeEntity.setOutinDate(outTime);//日期
|
||||
// 查询昨日余额,就是总结里除去今天最大一天的今日余额
|
||||
BigDecimal zrye = businessOutlayIncomeService.getZrye(param);
|
||||
Double zryeb = 0d;
|
||||
if(zrye != null){
|
||||
zryeb = zrye.doubleValue();
|
||||
}
|
||||
incomeEntity.setOutinYdayBalance(zryeb);//昨日余额
|
||||
incomeEntity.setOutinTdayIncome(0);//今日收入
|
||||
|
||||
Double jrzc = businessOutlayService.getTotalByHJGId(param);
|
||||
if(jrzc == null) {
|
||||
jrzc = 0d;
|
||||
}
|
||||
incomeEntity.setOutinTdayOut(jrzc);//今日支出
|
||||
Double jrye = zryeb - jrzc;
|
||||
incomeEntity.setOutinTdayBalance(jrye);//今日余额
|
||||
incomeEntity.setStatus(0);
|
||||
incomeEntity.setApproval(0);
|
||||
incomeEntity.setWriteUserId(businessOutlay.getWriteUserId());
|
||||
incomeEntity.setCreateTime(new Date());
|
||||
incomeEntity.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.save(incomeEntity);
|
||||
}
|
||||
//获取要修改的下一日收支数据,并修改
|
||||
afreshNext(incomeEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取要修改的下一日收支数据,并修改
|
||||
* 判断是否有下一日期收支数据,有则进行获取重新计算;无则跳出计算
|
||||
*/
|
||||
private void afreshNext(BusinessOutlayIncomeEntity businessOutlayIncomeEntity){
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("outinDate", businessOutlayIncomeEntity.getOutinDate());
|
||||
param.put("writeUserId", businessOutlayIncomeEntity.getWriteUserId());
|
||||
//获取下一日期收支数据
|
||||
BusinessOutlayIncomeEntity incomeEntity = businessOutlayIncomeService.getNextOutInByDate(param);
|
||||
if(incomeEntity!=null){
|
||||
Double zrye = businessOutlayIncomeEntity.getOutinTdayBalance(); //今日余额是下一日期的昨日余额
|
||||
incomeEntity.setOutinYdayBalance(zrye);
|
||||
Double jrsr = incomeEntity.getOutinTdayIncome();//今日收入
|
||||
if(jrsr == null) {
|
||||
jrsr = 0d;
|
||||
}
|
||||
param.put("userId", businessOutlayIncomeEntity.getWriteUserId());
|
||||
param.put("startTime", DateUtils.format(incomeEntity.getOutinDate()));
|
||||
param.put("endTime", DateUtils.format(incomeEntity.getOutinDate()));
|
||||
Double jrzc = businessOutlayService.getTotalByHJGId(param);
|
||||
if(jrzc == null) {
|
||||
jrzc = 0d;
|
||||
}
|
||||
incomeEntity.setOutinTdayOut(jrzc);//今日支出
|
||||
Double jrye = zrye + jrsr - jrzc;
|
||||
incomeEntity.setOutinTdayBalance(jrye);//今日余额
|
||||
incomeEntity.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.updateById(incomeEntity);
|
||||
afreshNext(incomeEntity);//递归
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
|
@ -200,7 +345,7 @@ public class BusinessOutlayController {
|
|||
@RequestMapping("/export")
|
||||
public void export(HttpServletResponse response, HttpServletRequest request){
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("writeUserId",getUserId());
|
||||
//params.put("writeUserId",getUserId());
|
||||
List<BusinessOutlayEntity> list = businessOutlayService.pcListNoPage(params);
|
||||
ExcelUtil<BusinessOutlayEntity> util = new ExcelUtil<BusinessOutlayEntity>(BusinessOutlayEntity.class);
|
||||
R r = util.exportExcel(list, "支出明细");
|
||||
|
|
|
@ -46,7 +46,13 @@ public class BusinessOutlayIncomeController {
|
|||
@RequiresPermissions("business:businessoutlayincome:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = businessOutlayIncomeService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
@RequestMapping("/pcListPage")
|
||||
@RequiresPermissions("business:businessoutlayincome:list")
|
||||
public R pcListPage(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = businessOutlayIncomeService.pcListPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
@ -57,7 +63,6 @@ public class BusinessOutlayIncomeController {
|
|||
@RequiresPermissions("business:businessoutlayincome:list")
|
||||
public R listNoPage(@RequestParam Map<String, Object> params){
|
||||
List<BusinessOutlayIncomeEntity> page = businessOutlayIncomeService.listNoPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
@ -90,6 +95,7 @@ public class BusinessOutlayIncomeController {
|
|||
@RequestMapping("/save")
|
||||
@RequiresPermissions("business:businessoutlayincome:save")
|
||||
public R save(@RequestBody BusinessOutlayIncomeEntity businessOutlayIncome) throws ParseException {
|
||||
// BusinessOutlayIncomeEntity businessOutlayIncomeOld = null;
|
||||
if(businessOutlayIncome.getId() == null) {
|
||||
// 保存时,按填写人和日期查询是否已经填写
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
|
@ -102,15 +108,49 @@ public class BusinessOutlayIncomeController {
|
|||
businessOutlayIncome.setCreateTime(new Date());
|
||||
businessOutlayIncome.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.save(businessOutlayIncome);
|
||||
businessOutlayIncomeService.ifSave(businessOutlayIncome.getOutinDate(),businessOutlayIncome.getWriteUserId().toString(),1);
|
||||
//businessOutlayIncomeService.ifSave(businessOutlayIncome.getOutinDate(),businessOutlayIncome.getWriteUserId().toString(),1);
|
||||
} else {
|
||||
businessOutlayIncome.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.updateById(businessOutlayIncome);
|
||||
}
|
||||
|
||||
afreshNext(businessOutlayIncome);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/***
|
||||
* 重新计算
|
||||
* 收支修改或新增时:
|
||||
* 循环修改此日之后的收支数据,知道没有下一日数据为止
|
||||
*/
|
||||
private void afreshNext(BusinessOutlayIncomeEntity businessOutlayIncomeEntity){
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("outinDate", businessOutlayIncomeEntity.getOutinDate());
|
||||
param.put("writeUserId", businessOutlayIncomeEntity.getWriteUserId());
|
||||
//获取下一日期收支数据
|
||||
BusinessOutlayIncomeEntity incomeEntity = businessOutlayIncomeService.getNextOutInByDate(param);
|
||||
if(incomeEntity!=null){
|
||||
Double zrye = businessOutlayIncomeEntity.getOutinTdayBalance(); //今日余额是下一日期的昨日余额
|
||||
incomeEntity.setOutinYdayBalance(zrye);
|
||||
Double jrsr = incomeEntity.getOutinTdayIncome();//今日收入
|
||||
if(jrsr == null) {
|
||||
jrsr = 0d;
|
||||
}
|
||||
param.put("userId", businessOutlayIncomeEntity.getWriteUserId());
|
||||
param.put("startTime", DateUtils.format(incomeEntity.getOutinDate()));
|
||||
param.put("endTime", DateUtils.format(incomeEntity.getOutinDate()));
|
||||
Double jrzc = businessOutlayService.getTotalByHJGId(param);
|
||||
if(jrzc == null) {
|
||||
jrzc = 0d;
|
||||
}
|
||||
incomeEntity.setOutinTdayOut(jrzc);//今日支出
|
||||
Double jrye = zrye + jrsr - jrzc;
|
||||
incomeEntity.setOutinTdayBalance(jrye);//今日余额
|
||||
incomeEntity.setUpdateTime(new Date());
|
||||
businessOutlayIncomeService.updateById(incomeEntity);
|
||||
afreshNext(incomeEntity);//递归
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计算的值
|
||||
*/
|
||||
|
|
|
@ -110,13 +110,25 @@ public class BusinessPlanController {
|
|||
dataList.add(value);
|
||||
}
|
||||
// 当前日期对应的类型,用类型获取当前类型所对应的未提交数据日期
|
||||
Integer type = 2;
|
||||
// 说明是总结请求
|
||||
if(params.get("isTotal") != null || (list.size()!=0 && list.get(0).getType()==0)){
|
||||
type = 0;
|
||||
}
|
||||
// Integer type = 2;
|
||||
// // 说明是总结请求
|
||||
// if(params.get("isTotal") != null || (list.size()!=0 && list.get(0).getType()==0)){
|
||||
// type = 0;
|
||||
// }
|
||||
// QueryWrapper<BusinessPlanEntity> qw = new QueryWrapper<>();
|
||||
// qw.eq("type", type);
|
||||
|
||||
QueryWrapper<BusinessPlanEntity> qw = new QueryWrapper<>();
|
||||
qw.eq("type", type);
|
||||
// 说明是总结请求
|
||||
if(params.get("isTotal") != null){
|
||||
//总结-未成稿
|
||||
qw.eq("type", 1);
|
||||
qw.eq("is_total", params.get("isTotal"));
|
||||
}else{
|
||||
//计划-未总结
|
||||
qw.eq("type", 0);
|
||||
}
|
||||
|
||||
|
||||
// 查询当前类型的所有对应为提交时间
|
||||
List<BusinessPlanEntity> planTimeList = businessPlanService.list(qw);
|
||||
|
@ -544,4 +556,15 @@ public class BusinessPlanController {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 未提交列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/uncommittedList")
|
||||
@RequiresPermissions("business:businessplan:list")
|
||||
public R uncommittedList(){
|
||||
List<BusinessPlanEntity> list = businessPlanService.getUncommittedList();
|
||||
return R.ok().put("page", list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,8 +45,9 @@ public class BusinessPlanTwoController {
|
|||
@RequestMapping("/list")
|
||||
@RequiresPermissions("business:businessplantwo:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
BusinessPlanTwoEntity BusinessPlanTwoEntity = businessPlanTwoService.getMaxTime();
|
||||
params.put("twoEditTime",BusinessPlanTwoEntity.getTwoEditTime());
|
||||
List<BusinessPlanTwoEntity> page = businessPlanTwoService.queryList(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
|
|
@ -400,4 +400,15 @@ public class BusinessTotalController {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 未提交列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/uncommittedList")
|
||||
@RequiresPermissions("business:businesstotal:list")
|
||||
public R uncommittedList(){
|
||||
List<BusinessTotalEntity> list = businessTotalService.getUncommittedList();
|
||||
return R.ok().put("page", list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.renren.modules.business.controller;
|
||||
|
||||
import io.renren.common.utils.PageUtils;
|
||||
import io.renren.common.utils.R;
|
||||
import io.renren.modules.business.entity.BusinessWorkerCqEntity;
|
||||
import io.renren.modules.business.service.BusinessWorkerCqService;
|
||||
|
@ -7,6 +8,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
@ -36,7 +39,8 @@ public class BusinessWorkerCqController {
|
|||
@RequestMapping("/list")
|
||||
@RequiresPermissions("business:businessworkercq:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
List<BusinessWorkerCqEntity> page = businessWorkerCqService.querySearchList(params);
|
||||
PageUtils page = businessWorkerCqService.queryPage(params);
|
||||
// List<BusinessWorkerCqEntity> page = businessWorkerCqService.querySearchList(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
@ -91,21 +95,34 @@ public class BusinessWorkerCqController {
|
|||
*/
|
||||
@RequestMapping("/updateList")
|
||||
@RequiresPermissions("business:businessworkercq:update")
|
||||
public R updateList(@RequestBody Map<String, Object> params){
|
||||
public R updateList(@RequestBody Map<String, Object> params) throws ParseException {
|
||||
String dateDay = params.get("dateDay").toString();
|
||||
List<Map<String,Object>> businessWorkerCqEntityList = (List<Map<String,Object>>)params.get("list");
|
||||
List<BusinessWorkerCqEntity> businessWorkerCqUpdateEntityList = new ArrayList<>();
|
||||
businessWorkerCqEntityList.forEach(item->{
|
||||
for (Map<String, Object> item : businessWorkerCqEntityList) {
|
||||
BusinessWorkerCqEntity businessWorkerCqEntity = new BusinessWorkerCqEntity();
|
||||
if (item.get("id") != null && !item.get("id").toString().equals("")) {
|
||||
businessWorkerCqEntity.setId(Integer.parseInt(item.get("id").toString()));
|
||||
if(!"".equals(item.get("fixDay").toString().trim())){
|
||||
}
|
||||
if (item.get("userId") != null && !item.get("userId").toString().equals("")) {
|
||||
businessWorkerCqEntity.setUserId(Integer.parseInt(item.get("userId").toString()));
|
||||
}
|
||||
if (!"".equals(item.get("fixDay").toString().trim())) {
|
||||
businessWorkerCqEntity.setFixDay(item.get("fixDay").toString());
|
||||
}
|
||||
if(!Objects.isNull(item.get("remark"))){
|
||||
if (!Objects.isNull(item.get("remark"))) {
|
||||
businessWorkerCqEntity.setRemark(item.get("remark").toString());
|
||||
}
|
||||
if (!dateDay.equals("")) {
|
||||
String dateDayStr = dateDay + "-01";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = dateFormat.parse(dateDayStr);
|
||||
businessWorkerCqEntity.setDateDay(date);
|
||||
}
|
||||
businessWorkerCqEntity.setApproval(0);
|
||||
businessWorkerCqUpdateEntityList.add(businessWorkerCqEntity);
|
||||
});
|
||||
businessWorkerCqService.updateBatchById(businessWorkerCqUpdateEntityList);
|
||||
}
|
||||
businessWorkerCqService.saveOrUpdateBatch(businessWorkerCqUpdateEntityList);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
|
|
@ -2,23 +2,17 @@ package io.renren.modules.business.controller;
|
|||
|
||||
import io.renren.common.utils.PageUtils;
|
||||
import io.renren.common.utils.R;
|
||||
import io.renren.modules.business.entity.BusinessDictEntity;
|
||||
import io.renren.modules.business.entity.BusinessOutlayEntity;
|
||||
import io.renren.modules.business.entity.BusinessProjectEntity;
|
||||
import io.renren.modules.business.entity.BusinessWorkerEntity;
|
||||
import io.renren.modules.business.entity.*;
|
||||
import io.renren.modules.business.service.*;
|
||||
import io.renren.modules.business.service.BusinessDictService;
|
||||
import io.renren.modules.business.service.BusinessWorkerCqService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author lsr
|
||||
|
@ -43,6 +37,8 @@ public class BusinessZcmxController {
|
|||
private BusinessProjectService businessProjectService;
|
||||
@Autowired
|
||||
private BusinessWorkerService businessWorkerService;
|
||||
@Autowired
|
||||
private BusinessStService businessStService;
|
||||
|
||||
/**
|
||||
* 获取字典信息
|
||||
|
@ -108,6 +104,16 @@ public class BusinessZcmxController {
|
|||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表-支出查询分页
|
||||
*/
|
||||
@RequestMapping("/zccxList")
|
||||
@RequiresPermissions("business:businesszcmx:list")
|
||||
public R zccxList(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = businessOutlayService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表-支出查询
|
||||
*/
|
||||
|
@ -213,4 +219,43 @@ public class BusinessZcmxController {
|
|||
List<Map<String,Object>> page = businessOutlayService.stbzList(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/updateStxzList")
|
||||
@RequiresPermissions("business:businesszcmx:list")
|
||||
public R updateStxzList(@RequestBody Map<String, Object> params) throws ParseException {
|
||||
List<Map<String,Object>> xzList = (List<Map<String,Object>>)params.get("list");
|
||||
List<BusinessStEntity> businessStEntityList = new ArrayList<>();
|
||||
for (Map<String, Object> item : xzList) {
|
||||
BusinessStEntity businessStEntity = new BusinessStEntity();
|
||||
if (item.get("id") != null && !item.get("id").toString().equals("")) {
|
||||
businessStEntity.setId(Integer.parseInt(item.get("id").toString()));
|
||||
}
|
||||
if (item.get("dateA") != null && !item.get("dateA").toString().equals("")) {
|
||||
String dateDayStr = item.get("dateA").toString() + "-01";
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = dateFormat.parse(dateDayStr);
|
||||
businessStEntity.setDateDay(date);
|
||||
}
|
||||
if (item.get("stday") != null && !item.get("stday").toString().equals("")) {
|
||||
businessStEntity.setFixDay(Integer.parseInt(item.get("stday").toString()));
|
||||
}
|
||||
businessStEntityList.add(businessStEntity);
|
||||
}
|
||||
businessStService.saveOrUpdateBatch(businessStEntityList);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转账验证数据
|
||||
*/
|
||||
@RequestMapping("/yzList")
|
||||
@RequiresPermissions("business:businesszcmx:list")
|
||||
public R yzList(@RequestParam Map<String, Object> params){
|
||||
List<Map<String,Object>> page = businessOutlayService.yzList(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,9 +58,10 @@ public interface BusinessOutlayDao extends BaseMapper<BusinessOutlayEntity> {
|
|||
|
||||
List<Map<String,Object>> getGzTj(Map<String,Object> params);
|
||||
|
||||
List<Map<String,Object>> getGzTj2(Map<String,Object> params);
|
||||
|
||||
/**.
|
||||
* 根据用户id获取信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Double getTotalByHJGId(Map<String, Object> params);
|
||||
|
@ -115,7 +116,6 @@ public interface BusinessOutlayDao extends BaseMapper<BusinessOutlayEntity> {
|
|||
|
||||
/**
|
||||
* 根据年份 更新年度信息
|
||||
* @param annualYear
|
||||
* @param startTime
|
||||
* @param annualHsId
|
||||
*/
|
||||
|
@ -126,4 +126,10 @@ public interface BusinessOutlayDao extends BaseMapper<BusinessOutlayEntity> {
|
|||
* @return
|
||||
*/
|
||||
List<BusinessOutlayEntity> listNowTime(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取转账验证数据
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> yzList(Map<String, Object> params);
|
||||
}
|
||||
|
|
|
@ -65,4 +65,18 @@ public interface BusinessOutlayIncomeDao extends BaseMapper<BusinessOutlayIncome
|
|||
* 锁住
|
||||
*/
|
||||
void updateLocked(String userId);
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
BusinessOutlayIncomeEntity getOutInByDate(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取下一日期收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
BusinessOutlayIncomeEntity getNextOutInByDate(Map<String, Object> params);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.renren.modules.business.dao;
|
||||
|
||||
import io.renren.modules.business.entity.BusinessPlanEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.modules.business.entity.BusinessPlanEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -70,4 +70,10 @@ public interface BusinessPlanDao extends BaseMapper<BusinessPlanEntity> {
|
|||
* @return
|
||||
*/
|
||||
BusinessPlanEntity getSJList(@Param("time") String time);
|
||||
|
||||
/**
|
||||
* 未提交
|
||||
* @return
|
||||
*/
|
||||
List<BusinessPlanEntity> getUncommittedList();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public interface BusinessPlanTwoDao extends BaseMapper<BusinessPlanTwoEntity> {
|
|||
*/
|
||||
List<BusinessPlanTwoEntity> queryList(Map<String, Object> params);
|
||||
|
||||
BusinessPlanTwoEntity getMaxTime();
|
||||
|
||||
/**
|
||||
* 通过ids字符串对信息删除
|
||||
|
@ -33,4 +34,5 @@ public interface BusinessPlanTwoDao extends BaseMapper<BusinessPlanTwoEntity> {
|
|||
void deleteByIds(@Param("deleteIds") String deleteIds);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package io.renren.modules.business.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.modules.business.entity.BusinessStEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 食堂修正表
|
||||
*
|
||||
* @author caolei
|
||||
* @email jiaqiao@163.com
|
||||
* @date 2024-03-10 19:26:31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessStDao extends BaseMapper<BusinessStEntity> {
|
||||
|
||||
}
|
|
@ -66,4 +66,10 @@ public interface BusinessTotalDao extends BaseMapper<BusinessTotalEntity> {
|
|||
* @param params
|
||||
*/
|
||||
List<BusinessTotalEntity> totalList(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 未提交
|
||||
* @return
|
||||
*/
|
||||
List<BusinessTotalEntity> getUncommittedList();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.Map;
|
|||
public interface BusinessWorkerCqDao extends BaseMapper<BusinessWorkerCqEntity> {
|
||||
int selectBydateDay(@Param("dateDay") String dateDay);
|
||||
|
||||
List<BusinessWorkerCqEntity> querySearchList(@Param("userId") String userId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
List<BusinessWorkerCqEntity> querySearchList(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> querySearchListAll(@Param("dateDay") String dateDay);
|
||||
|
||||
|
@ -41,5 +41,5 @@ public interface BusinessWorkerCqDao extends BaseMapper<BusinessWorkerCqEntity>
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryWorkerTimeList(Map<String, Object> params);
|
||||
List<Map<String, Object>> queryWorkerTimeList(@Param("userId") String userId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public class BusinessContractEntity implements Serializable {
|
|||
/**
|
||||
* 建设单位id
|
||||
*/
|
||||
private String contractJsdwId;//建设单位
|
||||
private Integer contractJsdwId;//建设单位
|
||||
@TableField(exist = false)
|
||||
private String contractJsdw;//建设单位
|
||||
|
||||
|
|
|
@ -94,17 +94,14 @@ public class BusinessOutlayEntity implements Serializable {
|
|||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Excel(name = "地址")
|
||||
private String outPayeeAddress;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@Excel(name = "电话")
|
||||
private String outPayeePhone;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String outRemark;
|
||||
/**
|
||||
* 是否被收回(0未收回,1-已收回)
|
||||
|
|
|
@ -70,6 +70,7 @@ public class BusinessOutlayIncomeEntity implements Serializable {
|
|||
* 收款方式
|
||||
*/
|
||||
@Excel(name = "收款方式")
|
||||
@TableField(exist=false)
|
||||
private String outinCreditingWayStr;
|
||||
/**
|
||||
* 备注
|
||||
|
|
|
@ -32,6 +32,19 @@ public class BusinessPlanTwoEntity implements Serializable {
|
|||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date twoEditTime;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date twoStart;
|
||||
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date twoEnd;
|
||||
|
||||
/**
|
||||
* 立项id
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package io.renren.modules.business.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 食堂修正表
|
||||
*
|
||||
* @author caolei
|
||||
* @email jiaqiao@163.com
|
||||
* @date 2024-03-10 19:26:31
|
||||
*/
|
||||
@Data
|
||||
@TableName("business_st")
|
||||
public class BusinessStEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||
private Date dateDay;
|
||||
/**
|
||||
* 修正天数
|
||||
*/
|
||||
private Integer fixDay;
|
||||
}
|
|
@ -26,6 +26,8 @@ public interface BusinessOutlayIncomeService extends IService<BusinessOutlayInco
|
|||
*/
|
||||
List<BusinessOutlayIncomeEntity> listNoPage(Map<String, Object> params);
|
||||
|
||||
PageUtils pcListPage(Map<String, Object> params);
|
||||
|
||||
List<BusinessOutlayIncomeEntity> pcListNoPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
|
@ -67,5 +69,19 @@ public interface BusinessOutlayIncomeService extends IService<BusinessOutlayInco
|
|||
* @return
|
||||
*/
|
||||
int getLockedCnt(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
BusinessOutlayIncomeEntity getOutInByDate(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取下一日期收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
BusinessOutlayIncomeEntity getNextOutInByDate(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
*/
|
||||
List<BusinessOutlayEntity> listNoPage(Map<String, Object> params);
|
||||
|
||||
PageUtils pcListPage(Map<String, Object> params);
|
||||
|
||||
List<BusinessOutlayEntity> pcListNoPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
|
@ -34,6 +36,7 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
// Map<String, Object> queryList(Map<String, Object> params);
|
||||
Map<String, Object> queryList(Map<String, Object> params);
|
||||
|
||||
public List<Map<String,Object>> getZxrList();
|
||||
|
@ -60,7 +63,6 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
/**
|
||||
* 为了传入到 年度总结
|
||||
* @param outTime
|
||||
* @param toString
|
||||
* @param i
|
||||
*/
|
||||
void ifSave(Date outTime, String writeUserId, int i) throws ParseException;
|
||||
|
@ -73,7 +75,6 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
|
||||
/**.
|
||||
* 根据用户id获取信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Double getTotalByHJGId(Map<String, Object> params);
|
||||
|
@ -90,5 +91,12 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
|
||||
public Map<String,Object> getGzTj(Map<String,Object> params);
|
||||
|
||||
/**
|
||||
* 获取验证列表数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> yzList(Map<String, Object> params);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -79,4 +79,6 @@ public interface BusinessPlanService extends IService<BusinessPlanEntity> {
|
|||
List<BusinessWorkerEntity> getNewRyList(String time);
|
||||
|
||||
List<BusinessPlanEntity> uncommitPlan(Map<String, Object> params);
|
||||
|
||||
List<BusinessPlanEntity> getUncommittedList();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ public interface BusinessPlanTwoService extends IService<BusinessPlanTwoEntity>
|
|||
*/
|
||||
List<BusinessPlanTwoEntity> queryList(Map<String, Object> params);
|
||||
|
||||
BusinessPlanTwoEntity getMaxTime();
|
||||
|
||||
/**
|
||||
* 新保存 此方法包含 新增和删除需要传入 saveIds 和 deleteIds
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package io.renren.modules.business.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import io.renren.modules.business.entity.BusinessStEntity;
|
||||
|
||||
/**
|
||||
* 食堂修正表
|
||||
*
|
||||
* @author caolei
|
||||
* @email jiaqiao@163.com
|
||||
* @date 2024-03-10 19:26:31
|
||||
*/
|
||||
public interface BusinessStService extends IService<BusinessStEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -51,5 +51,7 @@ public interface BusinessTotalService extends IService<BusinessTotalEntity> {
|
|||
BusinessTotalEntity getByIdNew(Integer totalId);
|
||||
|
||||
List<BusinessTotalEntity> totalList(Map<String, Object> params);
|
||||
|
||||
List<BusinessTotalEntity> getUncommittedList();
|
||||
}
|
||||
|
||||
|
|
|
@ -175,14 +175,19 @@ public class BusinessApprovalServiceImpl extends ServiceImpl<BusinessApprovalDao
|
|||
//修改关联立项导入合同
|
||||
BusinessContractEntity businessContractEntityOld = JSON.parseObject(params.get("approvalOldData").toString(), BusinessContractEntity.class);
|
||||
String projectOldIds = businessContractEntityOld.getProjectId();
|
||||
if(projectOldIds!=null && !projectOldIds.equals(""))
|
||||
{
|
||||
String[] pOldIds = projectOldIds.split(",");
|
||||
System.out.println(pOldIds);
|
||||
businessProjectDao.channelState(pOldIds);
|
||||
}
|
||||
String projectIds = businessContractEntity.getProjectId();
|
||||
if(projectIds!=null && !projectIds.equals(""))
|
||||
{
|
||||
String[] pIds = projectIds.split(",");
|
||||
System.out.println(pIds);
|
||||
businessProjectDao.changeState(pIds);
|
||||
|
||||
}
|
||||
//对于合同管理中的送审进度的处理
|
||||
if (params.get("approvalExcel") != null) {
|
||||
BusinessSsjdexcelEntity businessSsjdexcelEntity = JSON.parseObject(params.get("approvalExcel").toString(), BusinessSsjdexcelEntity.class);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.renren.common.utils.PageUtils;
|
||||
|
@ -12,7 +11,6 @@ import io.renren.modules.business.entity.BusinessAnnualEntity;
|
|||
import io.renren.modules.business.entity.BusinessOutlayIncomeEntity;
|
||||
import io.renren.modules.business.service.BusinessOutlayIncomeService;
|
||||
import io.renren.modules.sys.dao.SysUserDao;
|
||||
import io.renren.modules.sys.entity.SysUserEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -36,14 +34,17 @@ public class BusinessOutlayIncomeServiceImpl extends ServiceImpl<BusinessOutlayI
|
|||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<BusinessOutlayIncomeEntity> page = this.page(
|
||||
new Query<BusinessOutlayIncomeEntity>().getPage(params),
|
||||
new QueryWrapper<BusinessOutlayIncomeEntity>()
|
||||
);
|
||||
|
||||
// IPage<BusinessOutlayIncomeEntity> page = this.page(
|
||||
// new Query<BusinessOutlayIncomeEntity>().getPage(params),
|
||||
// new QueryWrapper<BusinessOutlayIncomeEntity>()
|
||||
// );
|
||||
IPage<BusinessOutlayIncomeEntity> page = new Query<BusinessOutlayIncomeEntity>().getPage(params);
|
||||
List<BusinessOutlayIncomeEntity> list = baseMapper.listNowTime(params);
|
||||
page.setRecords(list);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取未删除的列表不含有翻页
|
||||
*/
|
||||
|
@ -52,6 +53,15 @@ public class BusinessOutlayIncomeServiceImpl extends ServiceImpl<BusinessOutlayI
|
|||
return baseMapper.listNoPage(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils pcListPage(Map<String, Object> params) {
|
||||
IPage<BusinessOutlayIncomeEntity> page = new Query<BusinessOutlayIncomeEntity>().getPage(params);
|
||||
List<BusinessOutlayIncomeEntity> list = baseMapper.pcListNoPage(params);
|
||||
page.setRecords(list);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessOutlayIncomeEntity> pcListNoPage(Map<String, Object> params){
|
||||
return baseMapper.pcListNoPage(params);
|
||||
|
@ -64,36 +74,42 @@ public class BusinessOutlayIncomeServiceImpl extends ServiceImpl<BusinessOutlayI
|
|||
*/
|
||||
@Override
|
||||
public Map<String, Object> zclbList(Map<String, Object> params) {
|
||||
// //根据条件获取类别统计信息
|
||||
// List<Map<String,Object>> list = businessOutlayDao.getLbTotal(params);
|
||||
// //获取统计信息
|
||||
// List<Map<String,Object>> tj = baseMapper.zclbList(params);
|
||||
// //处理后的统计信息map
|
||||
// Map<String, Object> newMap = new HashMap<>();
|
||||
// //人员信息列表
|
||||
// List<SysUserEntity> ry = sysUserDao.sysUserlist();
|
||||
// Double total = 0.0;
|
||||
// for(Map<String, Object> i : tj){
|
||||
// //录入到map中
|
||||
// for(SysUserEntity j : ry){
|
||||
// if(i.get("id").toString().equals(j.getUserId().toString())){
|
||||
// newMap.put(j.getAuthenticName(), i.get("totalNum"));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //根据用户侯吉光的id获取数据存入到统计信息中
|
||||
// for(SysUserEntity j : ry){
|
||||
// if(j.getAuthenticName().equals("侯吉光") && total == 0.0){
|
||||
// params.put("userId",j.getUserId());
|
||||
// params.put("outType","146");
|
||||
// total = businessOutlayDao.getTotalByHJGId(params);
|
||||
// //System.out.println(total);
|
||||
// }
|
||||
// }
|
||||
// newMap.put("侯吉光",total);
|
||||
// Map<String, Object> page = new HashMap<>();
|
||||
// page.put("lb",list);
|
||||
// page.put("tj",newMap);
|
||||
// return page;
|
||||
|
||||
//根据条件获取类别统计信息
|
||||
List<Map<String,Object>> list = businessOutlayDao.getLbTotal(params);
|
||||
//获取统计信息
|
||||
List<Map<String,Object>> tj = baseMapper.zclbList(params);
|
||||
//处理后的统计信息map
|
||||
Map<String, Object> newMap = new HashMap<>();
|
||||
//人员信息列表
|
||||
List<SysUserEntity> ry = sysUserDao.sysUserlist();
|
||||
Double total = 0.0;
|
||||
for(Map<String, Object> i : tj){
|
||||
//录入到map中
|
||||
for(SysUserEntity j : ry){
|
||||
if(i.get("id").toString().equals(j.getUserId().toString())){
|
||||
newMap.put(j.getAuthenticName(), i.get("totalNum"));
|
||||
}
|
||||
}
|
||||
}
|
||||
//根据用户侯吉光的id获取数据存入到统计信息中
|
||||
for(SysUserEntity j : ry){
|
||||
if(j.getAuthenticName().equals("侯吉光") && total == 0.0){
|
||||
params.put("userId",j.getUserId());
|
||||
params.put("outType","146");
|
||||
total = businessOutlayDao.getTotalByHJGId(params);
|
||||
//System.out.println(total);
|
||||
}
|
||||
}
|
||||
newMap.put("侯吉光",total);
|
||||
Map<String, Object> page = new HashMap<>();
|
||||
page.put("lb",list);
|
||||
page.put("tj",newMap);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
@ -175,4 +191,24 @@ public class BusinessOutlayIncomeServiceImpl extends ServiceImpl<BusinessOutlayI
|
|||
return baseMapper.getLockedCnt(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BusinessOutlayIncomeEntity getOutInByDate(Map<String, Object> params){
|
||||
return baseMapper.getOutInByDate(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间和执行人获取下一日期收支数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BusinessOutlayIncomeEntity getNextOutInByDate(Map<String, Object> params){
|
||||
return baseMapper.getNextOutInByDate(params);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
package io.renren.modules.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.renren.common.utils.PageUtils;
|
||||
import io.renren.common.utils.Query;
|
||||
import io.renren.modules.business.dao.BusinessAnnualDao;
|
||||
import io.renren.modules.business.dao.BusinessOutlayDao;
|
||||
import io.renren.modules.business.dao.BusinessOutlayIncomeDao;
|
||||
import io.renren.modules.business.entity.BusinessAnnualEntity;
|
||||
import io.renren.modules.business.entity.BusinessOutlayEntity;
|
||||
import io.renren.modules.business.service.BusinessOutlayService;
|
||||
|
@ -31,15 +31,19 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
BusinessAnnualDao businessAnnualDao;
|
||||
@Autowired
|
||||
BusinessOutlayDao businessOutlayDao;
|
||||
@Autowired
|
||||
BusinessOutlayIncomeDao businessOutlayIncomeDao;
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<BusinessOutlayEntity> page = this.page(
|
||||
new Query<BusinessOutlayEntity>().getPage(params),
|
||||
new QueryWrapper<BusinessOutlayEntity>().eq("write_user_id",params.get("writeUserId").toString())
|
||||
.orderByDesc("out_time")
|
||||
);
|
||||
|
||||
// IPage<BusinessOutlayEntity> page = this.page(
|
||||
// new Query<BusinessOutlayEntity>().getPage(params),
|
||||
// new QueryWrapper<BusinessOutlayEntity>().eq("write_user_id",params.get("writeUserId").toString())
|
||||
// .orderByDesc("out_time")
|
||||
// );
|
||||
IPage<BusinessOutlayEntity> page = new Query<BusinessOutlayEntity>().getPage(params);
|
||||
List<BusinessOutlayEntity> list = baseMapper.listNoPage(params);
|
||||
page.setRecords(list);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
@ -53,6 +57,14 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
return baseMapper.listNoPage(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils pcListPage(Map<String, Object> params){
|
||||
IPage<BusinessOutlayEntity> page = new Query<BusinessOutlayEntity>().getPage(params);
|
||||
List<BusinessOutlayEntity> list = baseMapper.pcListNoPage(params);
|
||||
page.setRecords(list);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessOutlayEntity> pcListNoPage(Map<String, Object> params){
|
||||
return baseMapper.pcListNoPage(params);
|
||||
|
@ -234,18 +246,12 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
params.put("writeUserId","10");
|
||||
List<Map<String,Object>> hdg = businessOutlayDao.getLbTotalByWriteUserId(params);
|
||||
|
||||
// list.forEach( x->{
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// });
|
||||
//
|
||||
|
||||
for(int i=0;i<xs.size();i++){
|
||||
for (int x=0;x<list.size();x++){
|
||||
if(xs.get(i).get("id").equals(list.get(x).get("id"))){
|
||||
list.get(x).put("xs",xs.get(i).get("totalNum"));
|
||||
}
|
||||
}
|
||||
//list.get(i).put("xs",xs.get(i).get("totalNum"));
|
||||
}
|
||||
for(int i=0;i<hdq.size();i++){
|
||||
for (int x=0;x<list.size();x++){
|
||||
|
@ -260,7 +266,6 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
list.get(x).put("lxj",lxj.get(i).get("totalNum"));
|
||||
}
|
||||
}
|
||||
// list.get(i).put("lxj",lxj.get(i).get("totalNum"));
|
||||
}
|
||||
for(int i=0;i<hdg.size();i++){
|
||||
for (int x=0;x<list.size();x++){
|
||||
|
@ -272,19 +277,80 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
}
|
||||
data.put("list",list);
|
||||
|
||||
|
||||
double xsyszh = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("xs").toString())));
|
||||
double hdqyszh = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("hdq").toString())));
|
||||
double lxjyszh = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("lxj").toString())));
|
||||
double hdgyszh = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("hdg").toString())));
|
||||
|
||||
data.put("xsyszh",xsyszh);
|
||||
data.put("hdqyszh",hdqyszh);
|
||||
data.put("lxjyszh",lxjyszh);
|
||||
data.put("hdgyszh",hdgyszh);
|
||||
data.put("xsyszh",xsyszh); // 肖爽以上支出总和
|
||||
data.put("hdqyszh",hdqyszh);// 侯吉庆以上支出总和
|
||||
data.put("lxjyszh",lxjyszh);// 李现举以上支出总和
|
||||
data.put("hdgyszh",hdgyszh);// 侯吉光以上支出总和
|
||||
|
||||
double zh = xsyszh+hdqyszh+lxjyszh+hdgyszh;
|
||||
double xsyszb = 100*xsyszh/zh;
|
||||
double hdqyszb = 100*hdqyszh/zh;
|
||||
double lxjyszb = 100*lxjyszh/zh;
|
||||
double hdgyszb = 100*hdgyszh/zh;
|
||||
|
||||
data.put("xsyszb",xsyszb); // 肖爽以上支出占比
|
||||
data.put("hdqyszb",hdqyszb);// 侯吉庆以上支出占比
|
||||
data.put("lxjyszb",lxjyszb);// 李现举以上支出占比
|
||||
data.put("hdgyszb",hdgyszb);// 侯吉光以上支出占比
|
||||
|
||||
List<Map<String,Object>> tj = businessOutlayIncomeDao.zclbList(params);
|
||||
|
||||
|
||||
double xssrnb = 0.0;//肖爽内部转账收入总和
|
||||
double xssrqt = 0.0;//肖爽其他收入总和
|
||||
|
||||
double hjqsrnb = 0.0;//侯吉庆内部转账收入总和
|
||||
double hjqsrqt = 0.0;//侯吉庆其他收入总和
|
||||
|
||||
double lxjsrnb = 0.0;//李现举内部转账收入总和
|
||||
double lxjsrqt = 0.0;//李现举其他收入总和
|
||||
|
||||
for(Map<String, Object> item : tj){
|
||||
Double totalNum = Double.valueOf(item.get("totalNum").toString());
|
||||
if(item.get("id").toString().equals("13")){//肖爽
|
||||
if(item.get("out_type").toString().equals("1")){
|
||||
xssrnb = totalNum;
|
||||
}else{
|
||||
xssrqt = totalNum;
|
||||
}
|
||||
}
|
||||
if(item.get("id").toString().equals("9")){//侯吉庆
|
||||
if(item.get("out_type").toString().equals("1")){
|
||||
hjqsrnb = totalNum;
|
||||
}else{
|
||||
hjqsrqt = totalNum;
|
||||
}
|
||||
}
|
||||
if(item.get("id").toString().equals("11")){//李现举
|
||||
if(item.get("out_type").toString().equals("1")){
|
||||
lxjsrnb = totalNum;
|
||||
}else{
|
||||
lxjsrqt = totalNum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double xssrzh = xssrnb+xssrqt;;//肖爽收入总和
|
||||
double hjqsrzh = hjqsrnb+hjqsrqt;//侯吉庆收入总和
|
||||
double lxjsrzh = lxjsrnb+lxjsrqt;//李现举收入总和
|
||||
|
||||
data.put("xssrzh",xssrzh);//肖爽收入总和
|
||||
data.put("xssrnb",xssrnb);//肖爽内部转账收入总和
|
||||
data.put("xssrqt",xssrqt);//肖爽其他收入总和
|
||||
|
||||
data.put("hjqsrzh",hjqsrzh);//侯吉庆收入总和
|
||||
data.put("hjqsrnb",hjqsrnb);//侯吉庆内部转账收入总和
|
||||
data.put("hjqsrqt",hjqsrqt);//侯吉庆其他收入总和
|
||||
|
||||
data.put("lxjsrzh",lxjsrzh);//李现举收入总和
|
||||
data.put("lxjsrnb",lxjsrnb);//李现举内部转账收入总和
|
||||
data.put("lxjsrqt",lxjsrqt);//李现举其他收入总和
|
||||
|
||||
data.put("mqzczh",20000000);
|
||||
data.put("mqye",5000000);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -315,11 +381,11 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
double hjMoney = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("outMoney").toString())));
|
||||
list.forEach( x->{
|
||||
double outMoney = new Double(x.get("outMoney").toString());
|
||||
if(outMoney != 0){
|
||||
if(hjMoney != 0d){
|
||||
String bfb = new DecimalFormat("0.00").format(outMoney / hjMoney * 10000 / 100) + "%";
|
||||
x.put("bfb",bfb);
|
||||
}else{
|
||||
x.put("bfb","0.00");
|
||||
x.put("bfb","0.00%");
|
||||
}
|
||||
});
|
||||
map.put("list",list);
|
||||
|
@ -330,28 +396,49 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
@Override
|
||||
public Map<String,Object> getGzTj(Map<String,Object> params){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
List<Map<String,Object>> list = businessOutlayDao.getGzTj(params);
|
||||
// List<Map<String,Object>> list = businessOutlayDao.getGzTj(params);
|
||||
//
|
||||
// list.forEach( x->{
|
||||
// BigDecimal sfgz = new BigDecimal(x.get("sfgz").toString());
|
||||
// BigDecimal money = new BigDecimal(x.get("money").toString());
|
||||
// BigDecimal cz = sfgz.subtract(money);
|
||||
// x.put("cz",cz);
|
||||
// });
|
||||
// double hjsfgz = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("sfgz").toString())));
|
||||
// double hjmoney = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("money").toString())));
|
||||
// double hjcz = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("cz").toString())));
|
||||
//
|
||||
// list.forEach( x->{
|
||||
// double sfgz = new Double(x.get("sfgz").toString());
|
||||
// String bfb = new DecimalFormat("0.00").format(sfgz / hjsfgz * 10000 / 100) + "%";
|
||||
// x.put("bfb",bfb);
|
||||
// });
|
||||
// map.put("list",list);
|
||||
// map.put("hjsfgz",new BigDecimal(hjsfgz).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
// map.put("hjmoney",new BigDecimal(hjmoney).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
// map.put("hjcz",new BigDecimal(hjcz).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
List<Map<String,Object>> list = businessOutlayDao.getGzTj2(params);
|
||||
|
||||
list.forEach( x->{
|
||||
BigDecimal sfgz = new BigDecimal(x.get("sfgz").toString());
|
||||
BigDecimal money = new BigDecimal(x.get("money").toString());
|
||||
BigDecimal cz = sfgz.subtract(money);
|
||||
x.put("cz",cz);
|
||||
});
|
||||
double hjsfgz = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("sfgz").toString())));
|
||||
double hjmoney = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("money").toString())));
|
||||
double hjcz = list.stream().collect(Collectors.summingDouble(e -> Double.valueOf(e.get("cz").toString())));
|
||||
|
||||
list.forEach( x->{
|
||||
list.forEach( x-> {
|
||||
double sfgz = new Double(x.get("sfgz").toString());
|
||||
if(hjsfgz == 0d){
|
||||
x.put("bfb", "0.00%");
|
||||
}else{
|
||||
String bfb = new DecimalFormat("0.00").format(sfgz / hjsfgz * 10000 / 100) + "%";
|
||||
x.put("bfb",bfb);
|
||||
x.put("bfb", bfb);
|
||||
}
|
||||
});
|
||||
map.put("list",list);
|
||||
map.put("hjsfgz",new BigDecimal(hjsfgz).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("hjmoney",new BigDecimal(hjmoney).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
map.put("hjcz",new BigDecimal(hjcz).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> yzList(Map<String, Object> params){
|
||||
return baseMapper.yzList(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -314,4 +314,9 @@ public class BusinessPlanServiceImpl extends ServiceImpl<BusinessPlanDao, Busine
|
|||
return sdf.format(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessPlanEntity> getUncommittedList() {
|
||||
return baseMapper.getUncommittedList();
|
||||
}
|
||||
|
||||
}
|
|
@ -10,7 +10,8 @@ import io.renren.modules.business.entity.BusinessPlanTwoEntity;
|
|||
import io.renren.modules.business.service.BusinessPlanTwoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -38,6 +39,11 @@ public class BusinessPlanTwoServiceImpl extends ServiceImpl<BusinessPlanTwoDao,
|
|||
return baseMapper.queryList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessPlanTwoEntity getMaxTime(){
|
||||
return baseMapper.getMaxTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新保存 此方法包含 新增和删除需要传入 saveIds 和 deleteIds
|
||||
*/
|
||||
|
@ -45,20 +51,31 @@ public class BusinessPlanTwoServiceImpl extends ServiceImpl<BusinessPlanTwoDao,
|
|||
public void newSave(Map<String, Object> params) {
|
||||
//批量保存
|
||||
if(params.get("saveIds") != null&!params.get("saveIds").equals("")){
|
||||
|
||||
String twoEditTime = params.get("twoEditTime").toString();
|
||||
String twoStart = params.get("twoStart").toString();
|
||||
String twoEnd = params.get("twoEnd").toString();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
String[] str = params.get("saveIds").toString().split(",");
|
||||
BusinessPlanTwoEntity businessPlanTwoEntity = new BusinessPlanTwoEntity();
|
||||
for(String i: str){
|
||||
// Calendar.getInstance()
|
||||
//获取日期+14天 因为是两周计划当天写的计划存在于第二天的开始到2周结束
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH, 14);
|
||||
// System.out.println(i);
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// c.add(Calendar.DAY_OF_MONTH, 14);
|
||||
// businessPlanTwoEntity.setTwoEditTime(c.getTime());
|
||||
businessPlanTwoEntity.setTwoProjectId(i);
|
||||
businessPlanTwoEntity.setTwoEditTime(c.getTime());
|
||||
try {
|
||||
businessPlanTwoEntity.setTwoEditTime(dateFormat.parse(twoEditTime));
|
||||
businessPlanTwoEntity.setTwoStart(dateFormat.parse(twoStart));
|
||||
businessPlanTwoEntity.setTwoEnd(dateFormat.parse(twoEnd));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
businessPlanTwoEntity.setStatus(0);
|
||||
baseMapper.insert(businessPlanTwoEntity);
|
||||
}
|
||||
|
||||
}
|
||||
if(params.get("deleteIds") != null&!params.get("deleteIds").equals("")){
|
||||
String[] str = params.get("deleteIds").toString().split(",");
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package io.renren.modules.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.renren.modules.business.entity.BusinessStEntity;
|
||||
import io.renren.modules.business.service.BusinessStService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.renren.modules.business.dao.BusinessStDao;
|
||||
|
||||
@Service("businessStService")
|
||||
public class BusinessStServiceImpl extends ServiceImpl<BusinessStDao, BusinessStEntity> implements BusinessStService {
|
||||
|
||||
}
|
|
@ -160,4 +160,9 @@ public class BusinessTotalServiceImpl extends ServiceImpl<BusinessTotalDao, Busi
|
|||
return sdf.format(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessTotalEntity> getUncommittedList() {
|
||||
return baseMapper.getUncommittedList();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.renren.common.utils.DateUtils;
|
||||
|
@ -28,11 +27,49 @@ public class BusinessWorkerCqServiceImpl extends ServiceImpl<BusinessWorkerCqDao
|
|||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<BusinessWorkerCqEntity> page = this.page(
|
||||
new Query<BusinessWorkerCqEntity>().getPage(params),
|
||||
new QueryWrapper<BusinessWorkerCqEntity>()
|
||||
);
|
||||
|
||||
// IPage<BusinessWorkerCqEntity> page = this.page(
|
||||
// new Query<BusinessWorkerCqEntity>().getPage(params),
|
||||
// new QueryWrapper<BusinessWorkerCqEntity>()
|
||||
// );
|
||||
IPage<BusinessWorkerCqEntity> page = new Query<BusinessWorkerCqEntity>().getPage(params);
|
||||
String userId = (String) params.get("userId");
|
||||
Date date = new Date();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String nowDate = formatter.format(date);
|
||||
int year =Integer.parseInt(nowDate.substring(0,4));
|
||||
String startTime = "1999-01-01";
|
||||
String endTime = "9999-12-31";
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
List<BusinessWorkerCqEntity> list = baseMapper.querySearchList(params);
|
||||
if(list.size() > 0) {
|
||||
Map<String, BigDecimal> timeMap = new HashMap<>();
|
||||
List<Map<String, Object>> workerTimeList = baseMapper.queryWorkerTimeList(userId,startTime,endTime);
|
||||
if(workerTimeList.size() > 0) {
|
||||
for(Map<String, Object> tmp : workerTimeList) {
|
||||
timeMap.put(tmp.get("total_date")+"", new BigDecimal(tmp.get("cnt")+""));
|
||||
}
|
||||
}
|
||||
for(BusinessWorkerCqEntity tmp : list) {
|
||||
if(tmp.getDateDay() != null) {
|
||||
String tmpDateDayStr = DateUtils.format(tmp.getDateDay(), "yyyy-MM");
|
||||
if(timeMap.containsKey(tmpDateDayStr)) {
|
||||
tmp.setStatusDay(timeMap.get(tmpDateDayStr).toString());
|
||||
}
|
||||
// 状态+修正
|
||||
BigDecimal statusBg = BigDecimal.ZERO;
|
||||
if(StringUtils.isNotBlank(tmp.getStatusDay())) {
|
||||
statusBg = new BigDecimal(tmp.getStatusDay());
|
||||
}
|
||||
BigDecimal fixBg = BigDecimal.ZERO;
|
||||
if(StringUtils.isNotBlank(tmp.getFixDay())) {
|
||||
fixBg = new BigDecimal(tmp.getFixDay());
|
||||
}
|
||||
tmp.setOutWorkDay(statusBg.add(fixBg).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setRecords(list);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
@ -43,29 +80,16 @@ public class BusinessWorkerCqServiceImpl extends ServiceImpl<BusinessWorkerCqDao
|
|||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String nowDate = formatter.format(date);
|
||||
int year =Integer.parseInt(nowDate.substring(0,4));
|
||||
// String month = nowDate.substring(5,7);
|
||||
String startTime = year + "-01-01";
|
||||
String endTime = year + "-12-31";
|
||||
|
||||
startTime = "1999-01-01";
|
||||
endTime = "9999-12-31";
|
||||
/*if(!month.equals("01") && !month.equals("02")){
|
||||
startTime = year + "-03-01";
|
||||
endTime = (year + 1) + "-02-01";
|
||||
}else{
|
||||
startTime = (year - 1) + "-03-01";
|
||||
endTime = year + "-02-01";
|
||||
}*/
|
||||
/*System.out.println(startTime);
|
||||
System.out.println(endTime);*/
|
||||
List<BusinessWorkerCqEntity> list = baseMapper.querySearchList(userId,startTime,endTime);
|
||||
String startTime = "1999-01-01";
|
||||
String endTime = "9999-12-31";
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
List<BusinessWorkerCqEntity> list = baseMapper.querySearchList(params);
|
||||
if(list.size() > 0) {
|
||||
Map<String, BigDecimal> timeMap = new HashMap<>();
|
||||
// 查询人员施工时间
|
||||
// 按人和时间,查business_total 的total_date和isfinished,再用plan_id查的表
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
List<Map<String, Object>> workerTimeList = baseMapper.queryWorkerTimeList(params);
|
||||
List<Map<String, Object>> workerTimeList = baseMapper.queryWorkerTimeList(userId,startTime,endTime);
|
||||
if(workerTimeList.size() > 0) {
|
||||
for(Map<String, Object> tmp : workerTimeList) {
|
||||
timeMap.put(tmp.get("total_date")+"", new BigDecimal(tmp.get("cnt")+""));
|
||||
|
@ -111,8 +135,26 @@ public class BusinessWorkerCqServiceImpl extends ServiceImpl<BusinessWorkerCqDao
|
|||
resultMap.put("remark",item.get("remark"));
|
||||
|
||||
// 2代表修正数据,也就是说在出勤表中有数据,1代表未修正数据
|
||||
// if("2".equals(type) && !Objects.isNull(item.get("fix_day"))){
|
||||
if("2".equals(type) && !Objects.isNull(item.get("cq_id"))){
|
||||
// if("2".equals(type) && !Objects.isNull(item.get("cq_id"))){
|
||||
// // 状态+修正
|
||||
// BigDecimal statusBg = BigDecimal.ZERO;
|
||||
// if(item.get("worker_day")!=null) {
|
||||
// statusBg = new BigDecimal(item.get("worker_day").toString());
|
||||
// }
|
||||
//
|
||||
// BigDecimal fixBg = BigDecimal.ZERO;
|
||||
// if(item.get("fix_day")!=null) {
|
||||
// fixBg = new BigDecimal(item.get("fix_day").toString());
|
||||
// }
|
||||
//
|
||||
// resultMap.put("outWorkDay",statusBg.add(fixBg));
|
||||
// resultList.add(resultMap);
|
||||
// }
|
||||
// else if("1".equals(type) && Objects.isNull(item.get("cq_id"))) {
|
||||
// resultList.add(resultMap);
|
||||
// }
|
||||
|
||||
if("2".equals(type) && (!Objects.isNull(item.get("cq_id")) || !Objects.isNull(item.get("worker_day")) || "150".equals(item.get("relevance_id").toString()))){
|
||||
// 状态+修正
|
||||
BigDecimal statusBg = BigDecimal.ZERO;
|
||||
if(item.get("worker_day")!=null) {
|
||||
|
@ -127,8 +169,7 @@ public class BusinessWorkerCqServiceImpl extends ServiceImpl<BusinessWorkerCqDao
|
|||
resultMap.put("outWorkDay",statusBg.add(fixBg));
|
||||
resultList.add(resultMap);
|
||||
}
|
||||
// else if("1".equals(type) && Objects.isNull(item.get("fix_day"))) {
|
||||
else if("1".equals(type) && Objects.isNull(item.get("cq_id"))) {
|
||||
else if("1".equals(type) && Objects.isNull(item.get("cq_id")) && Objects.isNull(item.get("worker_day")) && !"150".equals(item.get("relevance_id").toString())) {
|
||||
resultList.add(resultMap);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BusinessWorkerSalaryServiceImpl extends ServiceImpl<BusinessWorkerS
|
|||
IPage<BusinessWorkerSalaryEntity> page = this.page(
|
||||
new Query<BusinessWorkerSalaryEntity>().getPage(params),
|
||||
new QueryWrapper<BusinessWorkerSalaryEntity>().eq("user_id",params.get("userId"))
|
||||
.orderByDesc("year")
|
||||
.orderByDesc("year").orderByDesc("start_time")
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
|
|
|
@ -6,7 +6,7 @@ spring:
|
|||
url: jdbc:mysql://localhost:3306/project_manage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
# password: Password01!123$
|
||||
password: root
|
||||
password: 123456
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
|
|
|
@ -371,6 +371,7 @@
|
|||
WHERE
|
||||
bo.STATUS = 0
|
||||
and bo.write_user_id = #{writeUserId}
|
||||
and bo.out_type != 146
|
||||
<if test="year != '' and year != null and year != 'undefined'">
|
||||
and bo.out_time like CONCAT('%',#{year},'%')
|
||||
</if>
|
||||
|
@ -484,7 +485,7 @@
|
|||
LEFT JOIN(
|
||||
select o.out_type,o.out_money
|
||||
from business_outlay o
|
||||
where o.out_type in ('140','142','143','144','145','259','261','262')
|
||||
where o.out_type in ('140','141','142','143','144','145','259','260','262','327')
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and o.out_time >= #{startTime}
|
||||
</if>
|
||||
|
@ -492,24 +493,23 @@
|
|||
and o.out_time <= #{endTime}
|
||||
</if>
|
||||
) y ON y.out_type = x.dict_id
|
||||
where x.dict_id in ('140','142','143','144','145','259','261','262')
|
||||
where x.dict_id in ('140','141','142','143','144','145','259','260','262','327')
|
||||
)t
|
||||
group by dict_name,order_num
|
||||
order by order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getGzTj" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
SELECT
|
||||
replace(replace(a.NAME,'工资(',''),')','') AS name,
|
||||
round(
|
||||
sum(ifnull(b.out_money, 0)),
|
||||
2
|
||||
) sfgz,
|
||||
round(sum(ifnull(b.jsmoney, 0)), 2) money
|
||||
FROM
|
||||
FROM
|
||||
business_dict a
|
||||
LEFT JOIN (
|
||||
LEFT JOIN (
|
||||
select c.out_type as dict_id,
|
||||
round(
|
||||
sum(ifnull(c.out_money, 0)),
|
||||
|
@ -517,7 +517,7 @@ LEFT JOIN (
|
|||
) as out_money,
|
||||
0 as jsmoney
|
||||
from business_outlay c
|
||||
where c.out_type in ('141','259','260','261','262')
|
||||
where c.out_type in ('141','259','260','261','327')
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and c.out_time >= #{startTime}
|
||||
</if>
|
||||
|
@ -584,15 +584,33 @@ LEFT JOIN (
|
|||
) a
|
||||
GROUP BY
|
||||
position_id
|
||||
) b ON a.dict_id = b.dict_id
|
||||
WHERE
|
||||
a.dict_id in ('141','259','260','261','262')
|
||||
GROUP BY
|
||||
) b ON a.dict_id = b.dict_id
|
||||
WHERE
|
||||
a.dict_id in ('141','259','260','261','327')
|
||||
GROUP BY
|
||||
a. NAME
|
||||
ORDER BY
|
||||
ORDER BY
|
||||
a.dict_id
|
||||
</select>
|
||||
|
||||
<select id="getGzTj2" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
REPLACE( REPLACE ( a.NAME, '工资(', '' ), ')', '' ) AS NAME,
|
||||
round( sum( ifnull( b.out_money, 0 )), 2 ) sfgz
|
||||
FROM business_dict a
|
||||
LEFT JOIN business_outlay b
|
||||
on a.dict_id = b.out_type
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and b.out_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and b.out_time <= #{endTime}
|
||||
</if>
|
||||
WHERE a.dict_id IN ( '141', '259', '260', '261', '327' )
|
||||
GROUP BY a.NAME
|
||||
ORDER BY a.order_num
|
||||
</select>
|
||||
|
||||
<select id="getTotalByHJGId" parameterType="io.renren.modules.business.entity.BusinessOutlayEntity" resultType="Double">
|
||||
SELECT round(sum(out_money),2) totalNum FROM business_outlay
|
||||
WHERE STATUS = 0 and write_user_id = #{userId}
|
||||
|
@ -619,7 +637,9 @@ ORDER BY
|
|||
|
||||
<!-- 食堂标准数据-->
|
||||
<select id="stbzList" parameterType="io.renren.modules.business.entity.BusinessOutlayEntity" resultType="map">
|
||||
select a.*,b.day,round(a.money/b.day,2) jz from
|
||||
select a.*,(ifnull(b.day,0)+ifnull(c.fix_day,0)+60) as day,ifnull(d.fix_day,0) as stday,d.id,
|
||||
round(a.money/(ifnull(b.day,0)+ifnull(c.fix_day,0)+60+ifnull(d.fix_day,0)),2) jz
|
||||
from
|
||||
(select SUBSTRING(out_time,1,7) dateA, sum(out_money) as money from business_outlay
|
||||
where status = 0 and out_type = 142 GROUP BY dateA) a
|
||||
left join
|
||||
|
@ -639,6 +659,40 @@ ORDER BY
|
|||
group by dateB
|
||||
) b
|
||||
on a.dateA = b.dateB
|
||||
left join
|
||||
(
|
||||
select
|
||||
date_format(date_day, '%Y-%m') dateC,
|
||||
round(sum(fix_day),2) as fix_day
|
||||
from business_worker_cq
|
||||
<where>
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and date_format(date_day, '%Y-%m') >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and date_format(date_day, '%Y-%m') <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
group by dateC
|
||||
) c
|
||||
on a.dateA = c.dateC
|
||||
left join
|
||||
(
|
||||
select
|
||||
date_format(date_day, '%Y-%m') dateD,
|
||||
fix_day,
|
||||
id
|
||||
from business_st
|
||||
<where>
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and date_format(date_day, '%Y-%m') >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and date_format(date_day, '%Y-%m') <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
) d
|
||||
on a.dateA = d.dateD
|
||||
<where>
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and a.dateA >= #{startTime}
|
||||
|
@ -725,4 +779,56 @@ ORDER BY
|
|||
and approval != 2
|
||||
</update>
|
||||
|
||||
<select id="yzList" parameterType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity" resultType="java.util.Map">
|
||||
select
|
||||
outin_date as ny,
|
||||
sum(hjg) as hjg,
|
||||
sum(xs) as xs,
|
||||
sum(hjq) as hjq,
|
||||
sum(lxj) as xj,
|
||||
sum(hjg) - sum(xs) - sum(hjq) - sum(lxj) as yz
|
||||
from (
|
||||
select
|
||||
DATE_FORMAT(out_time, '%Y-%m') as outin_date,
|
||||
sum(out_money) as hjg,
|
||||
0 as xs,
|
||||
0 as hjq,
|
||||
0 as lxj
|
||||
from business_outlay
|
||||
where out_type = '146'
|
||||
and write_user_id = 10
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and out_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and out_time <= #{endTime}
|
||||
</if>
|
||||
group by DATE_FORMAT(out_time, '%Y-%m')
|
||||
union all
|
||||
select
|
||||
DATE_FORMAT(outin_date, '%Y-%m') as outin_date,
|
||||
0 as hjg,
|
||||
sum(xs) as xs,
|
||||
sum(hjq) as hjq,
|
||||
sum(lxj) as lxj
|
||||
from (
|
||||
select
|
||||
outin_date,
|
||||
(case write_user_id when 13 then outin_tday_income else 0 end) as xs,
|
||||
(case write_user_id when 9 then outin_tday_income else 0 end) as hjq,
|
||||
(case write_user_id when 11 then outin_tday_income else 0 end) as lxj
|
||||
from business_outlay_income
|
||||
where out_type = '146'
|
||||
<if test="startTime != '' and startTime != null and startTime != 'undefined'">
|
||||
and outin_date >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and outin_date <= #{endTime}
|
||||
</if>
|
||||
) a
|
||||
group by DATE_FORMAT(outin_date, '%Y-%m')
|
||||
) t
|
||||
group by outin_date
|
||||
order by outin_date
|
||||
</select>
|
||||
</mapper>
|
|
@ -70,7 +70,7 @@
|
|||
out_type as outType,
|
||||
d.`name` as outTypeStr
|
||||
from business_outlay_income o LEFT JOIN business_dict d on o.out_type = d.dict_id
|
||||
where o.status = 0 and DATE_FORMAT(outin_date,'%Y') like CONCAT('%',YEAR(now()),'%')
|
||||
where o.status = 0
|
||||
<if test="writeUserId != null">
|
||||
and write_user_id = #{writeUserId}
|
||||
</if>
|
||||
|
@ -78,10 +78,14 @@
|
|||
</select>
|
||||
|
||||
<select id="zclbList" parameterType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity" resultType="java.util.Map">
|
||||
select a.*,b.authentic_name name from
|
||||
(SELECT write_user_id id,round(sum(outin_tday_income),2) totalNum FROM business_outlay_income
|
||||
select a.*,b.authentic_name name
|
||||
from
|
||||
(
|
||||
SELECT write_user_id id,
|
||||
round(sum(outin_tday_income),2) totalNum,
|
||||
(case out_type when 146 then 1 else 0 end) as out_type
|
||||
FROM business_outlay_income
|
||||
WHERE STATUS = 0
|
||||
AND ifnull(out_type,'146') = '146'
|
||||
<if test="year != '' and year != null and year != 'undefined'">
|
||||
and outin_date like CONCAT('%',#{year},'%')
|
||||
</if>
|
||||
|
@ -91,7 +95,8 @@
|
|||
<if test="endTime != '' and endTime != null and endTime != 'undefined'">
|
||||
and outin_date <= #{endTime}
|
||||
</if>
|
||||
GROUP BY write_user_id) a left join sys_user b on a.id = b.user_id
|
||||
GROUP BY write_user_id,(case out_type when 146 then 1 else 0 end)
|
||||
) a left join sys_user b on a.id = b.user_id
|
||||
</select>
|
||||
|
||||
<select id="getZrye" parameterType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity" resultType="decimal">
|
||||
|
@ -155,6 +160,7 @@
|
|||
round(a.outin_tday_balance,2) outin_tday_balance,
|
||||
a.outin_crediting_way,
|
||||
c.name as outinCreditingWayStr,
|
||||
a.out_type as outType,
|
||||
a.outin_remark,
|
||||
a.status,
|
||||
a.create_time,
|
||||
|
@ -174,10 +180,62 @@
|
|||
<if test="end != '' and end != null and end != 'undefined'">
|
||||
and a.outin_date <= #{end}
|
||||
</if>
|
||||
<if test="writeUserId != null">
|
||||
<if test="writeUserId != 0 and writeUserId != null and writeUserId != 1 ">
|
||||
and a.write_user_id = #{writeUserId}
|
||||
</if>
|
||||
order by a.outin_date desc
|
||||
</select>
|
||||
|
||||
<select id="getOutInByDate" parameterType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity" resultType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity">
|
||||
select
|
||||
id,
|
||||
outin_date,
|
||||
outin_yday_balance,
|
||||
outin_tday_income,
|
||||
outin_tday_out,
|
||||
outin_tday_balance,
|
||||
outin_crediting_way,
|
||||
outin_remark,
|
||||
status,
|
||||
create_time,
|
||||
update_time,
|
||||
write_user_id,
|
||||
approval,
|
||||
out_type
|
||||
from business_outlay_income
|
||||
where outin_date = #{outinDate}
|
||||
and write_user_id = #{writeUserId}
|
||||
and STATUS = 0
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getNextOutInByDate" parameterType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity" resultType="io.renren.modules.business.entity.BusinessOutlayIncomeEntity">
|
||||
select
|
||||
id,
|
||||
outin_date,
|
||||
outin_yday_balance,
|
||||
outin_tday_income,
|
||||
outin_tday_out,
|
||||
outin_tday_balance,
|
||||
outin_crediting_way,
|
||||
outin_remark,
|
||||
status,
|
||||
create_time,
|
||||
update_time,
|
||||
write_user_id,
|
||||
approval,
|
||||
out_type
|
||||
from business_outlay_income
|
||||
where outin_date = (
|
||||
select min(outin_date)
|
||||
from business_outlay_income
|
||||
where STATUS = 0
|
||||
and outin_date > #{outinDate}
|
||||
and write_user_id = #{writeUserId}
|
||||
)
|
||||
and write_user_id = #{writeUserId}
|
||||
and STATUS = 0
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -126,4 +126,13 @@
|
|||
select GROUP_CONCAT(plan_dd_id) dd,GROUP_CONCAT(select_persion_id) selectPerIds from business_plan
|
||||
where plan_time = #{time} and is_one_day = 127
|
||||
</select>
|
||||
|
||||
<select id="getUncommittedList" parameterType="String" resultType="io.renren.modules.business.entity.BusinessPlanEntity">
|
||||
select distinct plan_time
|
||||
from business_plan
|
||||
where type = 0
|
||||
and status = 0
|
||||
order by plan_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<resultMap type="io.renren.modules.business.entity.BusinessPlanTwoEntity" id="businessPlanTwoMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="twoEditTime" column="two_edit_time"/>
|
||||
<result property="twoStart" column="two_start"/>
|
||||
<result property="twoEnd" column="two_end"/>
|
||||
<result property="twoProjectId" column="two_project_id"/>
|
||||
<result property="numSort" column="num_sort"/>
|
||||
<result property="status" column="status"/>
|
||||
|
@ -24,16 +26,24 @@
|
|||
<result property="fzgz" column="fzgz"/>
|
||||
</resultMap>
|
||||
<select id="queryList" resultType="io.renren.modules.business.entity.BusinessPlanTwoEntity">
|
||||
select a.*,b.project_id,b.project_year,c.name jsdw,b.project,b.project_new_name,d.name sgdd,e.name sgjd,f.name fzgz from business_plan_two a
|
||||
select a.*,b.project_id,b.project_year,c.name jsdw,b.project,b.project_new_name,d.name sgdd,e.name sgjd,f.name fzgz
|
||||
from business_plan_two a
|
||||
LEFT JOIN business_project b on a.two_project_id = b.project_id
|
||||
LEFT JOIN business_dict c on c.dict_id = b.project_jsdw_id
|
||||
LEFT JOIN business_dict d on d.dict_id = b.project_sgdd_id
|
||||
LEFT JOIN business_dict e on e.dict_id = b.project_sgjd_id
|
||||
LEFT JOIN business_worker f on f.user_id = b.project_fzgz_id
|
||||
where a.status = 0
|
||||
<if test="startTime != null and startTime != '' and startTime != 'undefined' and endTime != null and endTime != '' and endTime != 'undefined'">
|
||||
and a.two_edit_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
<!-- <if test="startTime != null and startTime != '' and startTime != 'undefined' and endTime != null and endTime != '' and endTime != 'undefined'">-->
|
||||
<!-- and a.two_edit_time between #{startTime} and #{endTime}-->
|
||||
<!-- </if>-->
|
||||
and a.two_edit_time = #{twoEditTime}
|
||||
</select>
|
||||
<select id="getMaxTime" resultType="io.renren.modules.business.entity.BusinessPlanTwoEntity">
|
||||
select two_edit_time,two_start,two_end
|
||||
from business_plan_two a
|
||||
order by id desc
|
||||
limit 1
|
||||
</select>
|
||||
<!-- 根据要删除的ids 去更新数组-->
|
||||
<update id="deleteByIds" parameterType="String">
|
||||
|
|
|
@ -142,4 +142,18 @@
|
|||
update business_total set is_finished = #{isFinished} where date_format(plan_time, '%Y-%m-%d')=#{day}
|
||||
</update>
|
||||
|
||||
<select id="getUncommittedList" parameterType="String" resultType="io.renren.modules.business.entity.BusinessTotalEntity">
|
||||
select distinct plan_time,'未成稿' as gclb
|
||||
from business_plan
|
||||
where type = 1
|
||||
and status = 0
|
||||
and is_total = 0
|
||||
union all
|
||||
select distinct plan_time, '最后成稿' as gclb
|
||||
from business_total
|
||||
where status=0
|
||||
and is_finished=0
|
||||
order by plan_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -20,15 +20,15 @@
|
|||
</select>
|
||||
|
||||
<select id="querySearchList" parameterType="string" resultType="io.renren.modules.business.entity.BusinessWorkerCqEntity">
|
||||
select * from business_worker_cq where date_day between #{startTime} and #{endTime} and user_id = #{userId} ORDER BY date_day asc
|
||||
select * from business_worker_cq where date_day between #{startTime} and #{endTime} and user_id = #{userId} ORDER BY date_day desc
|
||||
</select>
|
||||
|
||||
<select id="querySearchListAll" parameterType="string" resultType="map">
|
||||
SELECT wr.user_id,wr.name,wr.`status`,bt.worker_day, cq.fix_day, cq.id cq_id, cq.remark from
|
||||
SELECT wr.relevance_id,wr.user_id,wr.name,wr.`status`,bt.worker_day, cq.fix_day, cq.id cq_id, cq.remark from
|
||||
-- 员工
|
||||
(SELECT a.* FROM business_worker a
|
||||
(SELECT a.*,b.relevance_id FROM business_worker a
|
||||
LEFT JOIN business_dict b ON a.work_id = b.dict_id
|
||||
WHERE b.relevance_id IN (151, 152)) wr
|
||||
WHERE b.relevance_id IN (150, 151, 152)) wr
|
||||
LEFT JOIN
|
||||
-- 某月计划已完结
|
||||
(SELECT persion_id,sum(bw.day) worker_day from
|
||||
|
|
Loading…
Reference in New Issue