Commit 603fff84 authored by yff's avatar yff

修改BUG

parent 1adcfe93
......@@ -171,5 +171,17 @@ public class KmesBoardController extends BaseController {
return ThreadContext.getReturnData();
}
@RequestMapping(value = "/queryZscl", method = RequestMethod.POST)
@ResponseBody
public Object queryZcl(@RequestBody JSONObject param) {
try {
return buildReturnData(kmesBoardService.queryZcl());
} catch (Exception e) {
ThreadContext.getReturnData().setSuccess(false);
ThreadContext.getReturnData().setMessage(e.getMessage());
}
return ThreadContext.getReturnData();
}
}
......@@ -27,4 +27,6 @@ public interface GpfkcxDao extends BaseDao {
public Gpfkjg queryWeekGpfk(Date date,String woid);
public Gpfkjg queryMonthGpfk(Date date);
public Gpfkjg queryZGpfk(Date date);
}
......@@ -1847,6 +1847,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
SqlMap sqlMap = new SqlMap();
sqlMap.append(" select sum(gpfkjg_fksl) as GPFK_FKSL, sum(GPFKJG_BHGSL) as GPFK_BHGSL, sum(GPFKJG_HGSL) as GPFK_HGSL from gpfkjg ");
sqlMap.append(" left join bzgx on bzgx_id = gpfkjg_bzgxid ");
sqlMap.append(" left join users on users_id = GPFKJG_FKRID ");
sqlMap.append(" where 1 = 1");
//sqlMap.append(" and (bzgx_gxlx ='ZP' or bzgx_gxlx ='JG') ");
if (StringUtils.isNotEmpty(condition.getBxid())){
......@@ -1858,7 +1859,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.setParamValue("pBZGXID",condition.getBzgxid());
}
if (StringUtils.isNotEmpty(condition.getFkrid())){
sqlMap.append(" and GPFKJG_FKRID = :pFKRID ");
sqlMap.append(" and (GPFKJG_FKRID = :pFKRID or users_userid = :pFKRID)");
sqlMap.setParamValue("pFKRID",condition.getFkrid());
}
if (condition.getYwrq() != null) {
......
......@@ -187,5 +187,19 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.queryEntity(Gpfkjg.class);
}
@Override
public Gpfkjg queryZGpfk(Date date) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(GPFKJG_FKSL) as GPFKJG_FKSL ");
sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where 1=1 and GPFKJG_FKSJ < :pEnd and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");
sqlMap.setParamValue("pEnd", DateUtils.endOfMonth(date));
sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.queryEntity(Gpfkjg.class);
}
}
......@@ -40,4 +40,6 @@ public interface KmesBoardService extends BaseEditService {
public Map<String,Object> queryCurrentMadeZtsl();
public KqtjVO queryOA();
public PcslVO queryZcl();
}
......@@ -139,11 +139,9 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
pcslVO.setJhsl(0.0);
}
Gpfkjg gpfkjg = gpfkcxDao.queryMonthGpfk(new Date());
double wgsl =0.0;
if(gpfkjg != null){
pcslVO.setWgsl(gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl());
}
pcslVO.setWgsl(wgsl);
return pcslVO;
}
......@@ -344,4 +342,15 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
}
@Override
public PcslVO queryZcl() {
PcslVO pcslVO = new PcslVO();
Gpfkjg gpfkjg = gpfkcxDao.queryZGpfk(new Date());
if(gpfkjg != null){
pcslVO.setWgsl(gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl());
}
return pcslVO;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment