出勤样式调整,食堂标准取数优化,办公室工资字典调整
This commit is contained in:
parent
628301b49a
commit
466c71aba1
|
@ -10,6 +10,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
@ -227,7 +228,7 @@ public class BusinessZcmxController {
|
|||
@RequiresPermissions("business:businesszcmx:list")
|
||||
public R stbzList(@RequestParam Map<String, Object> params){
|
||||
//System.out.println(params);
|
||||
List<Map<String,Object>> page = businessOutlayService.stbzList(params);
|
||||
Map<String,Object> page = businessOutlayService.stbzList(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
@ -251,7 +252,7 @@ public class BusinessZcmxController {
|
|||
businessStEntity.setDateDay(date);
|
||||
}
|
||||
if (item.get("stday") != null && !item.get("stday").toString().equals("")) {
|
||||
businessStEntity.setFixDay(Integer.parseInt(item.get("stday").toString()));
|
||||
businessStEntity.setFixDay(new BigDecimal(item.get("stday").toString()));
|
||||
}
|
||||
businessStEntityList.add(businessStEntity);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -33,5 +34,5 @@ public class BusinessStEntity implements Serializable {
|
|||
/**
|
||||
* 修正天数
|
||||
*/
|
||||
private Integer fixDay;
|
||||
private BigDecimal fixDay;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface BusinessOutlayService extends IService<BusinessOutlayEntity> {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> stbzList(Map<String, Object> params);
|
||||
Map<String, Object> stbzList(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取最新的年度日期
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -125,12 +126,35 @@ public class BusinessOutlayServiceImpl extends ServiceImpl<BusinessOutlayDao, Bu
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> stbzList(Map<String, Object> params) {
|
||||
// String startTime = params.get("year") + "-02";
|
||||
// String endTime = (Integer.parseInt((String) params.get("year")) + 1) + "-03";
|
||||
// params.put("startTime",startTime);
|
||||
// params.put("endTime",endTime);
|
||||
return baseMapper.stbzList(params);
|
||||
public Map<String, Object> stbzList(Map<String, Object> params) {
|
||||
BigDecimal pjMoney = new BigDecimal("0");
|
||||
BigDecimal pjDay = new BigDecimal("0");
|
||||
BigDecimal pjStDay = new BigDecimal("0");
|
||||
BigDecimal bzJz = new BigDecimal("0");
|
||||
List<Map<String,Object>> list = baseMapper.stbzList(params);
|
||||
for(int i=0;i<list.size();i++){
|
||||
Map<String,Object> map= (Map)list.get(i);
|
||||
String moneyStr = map.get("money").toString();
|
||||
String dayStr = map.get("day").toString();
|
||||
String stdayStr = map.get("stday").toString();
|
||||
pjMoney = pjMoney.add(new BigDecimal(moneyStr));
|
||||
pjDay = pjDay.add(new BigDecimal(dayStr));
|
||||
pjStDay = pjStDay.add(new BigDecimal(stdayStr));
|
||||
}
|
||||
|
||||
BigDecimal bzTs = new BigDecimal("0");
|
||||
bzTs = pjDay.add(pjStDay);
|
||||
if(bzTs.compareTo(new BigDecimal("0")) != 0){
|
||||
bzJz = pjMoney.divide(bzTs,2);
|
||||
}
|
||||
|
||||
Map<String, Object> mapList = new HashMap<>();
|
||||
mapList.put("list",list);
|
||||
mapList.put("pjMoney",pjMoney.setScale(2, RoundingMode.HALF_UP));
|
||||
mapList.put("pjDay",pjDay.setScale(2, RoundingMode.HALF_UP));
|
||||
mapList.put("pjStDay",pjStDay.setScale(2, RoundingMode.HALF_UP));
|
||||
mapList.put("bzJz",bzJz.setScale(2, RoundingMode.HALF_UP));
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -154,28 +154,72 @@ public class BusinessWorkerCqServiceImpl extends ServiceImpl<BusinessWorkerCqDao
|
|||
// 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) {
|
||||
statusBg = new BigDecimal(item.get("worker_day").toString());
|
||||
}
|
||||
// if("2".equals(type) && (!Objects.isNull(item.get("cq_id")) || !Objects.isNull(item.get("worker_day")) || ("150".equals(item.get("relevance_id").toString()) && "0".equals(item.get("status").toString())))){
|
||||
// // 状态+修正
|
||||
// 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) {
|
||||
// if(!"".equals(item.get("fix_day").toString().trim())){
|
||||
// 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")) && Objects.isNull(item.get("worker_day")) && !"150".equals(item.get("relevance_id").toString()) ) {
|
||||
// resultList.add(resultMap);
|
||||
// }
|
||||
|
||||
BigDecimal fixBg = BigDecimal.ZERO;
|
||||
if(item.get("fix_day")!=null) {
|
||||
if(!"".equals(item.get("fix_day").toString().trim())){
|
||||
fixBg = new BigDecimal(item.get("fix_day").toString());
|
||||
if("2".equals(type)){
|
||||
boolean xz = false;
|
||||
if(!Objects.isNull(item.get("cq_id"))){
|
||||
xz = true;
|
||||
}
|
||||
if(!Objects.isNull(item.get("worker_day"))){
|
||||
xz = true;
|
||||
}
|
||||
if("150".equals(item.get("relevance_id").toString()) && "0".equals(item.get("status").toString())){
|
||||
xz = true;
|
||||
}
|
||||
if(xz){
|
||||
// 状态+修正
|
||||
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) {
|
||||
if(!"".equals(item.get("fix_day").toString().trim())){
|
||||
fixBg = new BigDecimal(item.get("fix_day").toString());
|
||||
}
|
||||
}
|
||||
resultMap.put("outWorkDay",statusBg.add(fixBg));
|
||||
resultList.add(resultMap);
|
||||
}
|
||||
}else if("1".equals(type)){
|
||||
boolean wxz = false;
|
||||
if(Objects.isNull(item.get("cq_id")) && Objects.isNull(item.get("worker_day"))){
|
||||
wxz = true;
|
||||
}else{
|
||||
wxz = false;
|
||||
}
|
||||
if(wxz){
|
||||
if("150".equals(item.get("relevance_id").toString())){
|
||||
if("0".equals(item.get("status").toString())){
|
||||
wxz = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resultMap.put("outWorkDay",statusBg.add(fixBg));
|
||||
resultList.add(resultMap);
|
||||
if(wxz){
|
||||
resultList.add(resultMap);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
return resultList;
|
||||
}
|
||||
|
|
|
@ -603,7 +603,7 @@
|
|||
<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' )
|
||||
WHERE a.dict_id IN ( '141', '259', '260', '262', '327' )
|
||||
GROUP BY a.NAME
|
||||
ORDER BY a.order_num
|
||||
</select>
|
||||
|
@ -782,7 +782,7 @@
|
|||
sum(hjg) as hjg,
|
||||
sum(xs) as xs,
|
||||
sum(hjq) as hjq,
|
||||
sum(lxj) as xj,
|
||||
sum(lxj) as lxj,
|
||||
sum(hjg) - sum(xs) - sum(hjq) - sum(lxj) as yz
|
||||
from (
|
||||
select
|
||||
|
|
Loading…
Reference in New Issue