Commit 603fff84 authored by yff's avatar yff

修改BUG

parent 1adcfe93
...@@ -172,4 +172,16 @@ public class KmesBoardController extends BaseController { ...@@ -172,4 +172,16 @@ public class KmesBoardController extends BaseController {
} }
@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 { ...@@ -27,4 +27,6 @@ public interface GpfkcxDao extends BaseDao {
public Gpfkjg queryWeekGpfk(Date date,String woid); public Gpfkjg queryWeekGpfk(Date date,String woid);
public Gpfkjg queryMonthGpfk(Date date); public Gpfkjg queryMonthGpfk(Date date);
public Gpfkjg queryZGpfk(Date date);
} }
...@@ -1847,6 +1847,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1847,6 +1847,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
SqlMap sqlMap = new SqlMap(); 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(" 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 bzgx on bzgx_id = gpfkjg_bzgxid ");
sqlMap.append(" left join users on users_id = GPFKJG_FKRID ");
sqlMap.append(" where 1 = 1"); sqlMap.append(" where 1 = 1");
//sqlMap.append(" and (bzgx_gxlx ='ZP' or bzgx_gxlx ='JG') "); //sqlMap.append(" and (bzgx_gxlx ='ZP' or bzgx_gxlx ='JG') ");
if (StringUtils.isNotEmpty(condition.getBxid())){ if (StringUtils.isNotEmpty(condition.getBxid())){
...@@ -1858,7 +1859,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1858,7 +1859,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.setParamValue("pBZGXID",condition.getBzgxid()); sqlMap.setParamValue("pBZGXID",condition.getBzgxid());
} }
if (StringUtils.isNotEmpty(condition.getFkrid())){ 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()); sqlMap.setParamValue("pFKRID",condition.getFkrid());
} }
if (condition.getYwrq() != null) { if (condition.getYwrq() != null) {
......
...@@ -187,5 +187,19 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao { ...@@ -187,5 +187,19 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId()); sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.queryEntity(Gpfkjg.class); 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 { ...@@ -40,4 +40,6 @@ public interface KmesBoardService extends BaseEditService {
public Map<String,Object> queryCurrentMadeZtsl(); public Map<String,Object> queryCurrentMadeZtsl();
public KqtjVO queryOA(); public KqtjVO queryOA();
public PcslVO queryZcl();
} }
...@@ -139,11 +139,9 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -139,11 +139,9 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
pcslVO.setJhsl(0.0); pcslVO.setJhsl(0.0);
} }
Gpfkjg gpfkjg = gpfkcxDao.queryMonthGpfk(new Date()); Gpfkjg gpfkjg = gpfkcxDao.queryMonthGpfk(new Date());
double wgsl =0.0;
if(gpfkjg != null){ if(gpfkjg != null){
pcslVO.setWgsl(gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl()); pcslVO.setWgsl(gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl());
} }
pcslVO.setWgsl(wgsl);
return pcslVO; return pcslVO;
} }
...@@ -344,4 +342,15 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -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