代码提交
This commit is contained in:
parent
3c046f5ee6
commit
b64a0948e1
|
|
@ -1457,4 +1457,25 @@
|
|||
and tpd.`NAME` like concat('%', #{maName}, '%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getNewlyStored">
|
||||
select mt2.NAME as maType,
|
||||
mt.NAME as maName,
|
||||
wir.CODE as maCode,
|
||||
mt.UNIT as maUnit,
|
||||
wir.NUM as storageNum
|
||||
from wf_info_record wir
|
||||
left join mm_type mt on wir.MODEL_ID = mt.ID
|
||||
left join mm_type mt2 on mt.PARENT_ID = mt2.ID
|
||||
where wir.TYPE = #{type}
|
||||
</select>
|
||||
<select id="getInventoryStored">
|
||||
select mt2.NAME as maType,
|
||||
mt.NAME as maName,
|
||||
mt.UNIT as maUnit,
|
||||
wir.INVENTORY_NUM as storageNum
|
||||
from wf_inventory_record wir
|
||||
left join mm_type mt on wir.MODEL_ID = mt.ID
|
||||
left join mm_type mt2 on mt.PARENT_ID = mt2.ID
|
||||
where wir.INVENTORY_TYPE = "盘盈"
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.bonus.index.beans.*;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -14,13 +15,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.bonus.core.DateTimeHelper;
|
||||
import com.bonus.index.beans.IndexDetailVo;
|
||||
import com.bonus.index.beans.IndexHomeBean;
|
||||
import com.bonus.index.beans.IndexHomeResourseBean;
|
||||
import com.bonus.index.beans.IndexProAndNum;
|
||||
import com.bonus.index.beans.PartFiveBean;
|
||||
import com.bonus.index.beans.PartSixBean;
|
||||
import com.bonus.index.beans.PartThreeBean;
|
||||
import com.bonus.index.service.IndexHomeService;
|
||||
import com.bonus.sys.AjaxRes;
|
||||
import com.bonus.sys.BaseController;
|
||||
|
|
@ -233,7 +227,7 @@ public class IndexHomeController extends BaseController<IndexHomeBean> {
|
|||
|
||||
/**
|
||||
* 查询工程领料、退料、维修检验、机具报废、修试后入库、新购入库、库存盘点数量等数据
|
||||
*
|
||||
*
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import java.util.Map;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.index.beans.*;
|
||||
import com.bonus.ma.beans.pickDetailsBean;
|
||||
import com.bonus.sys.*;
|
||||
import com.bonus.sys.beans.UserBean;
|
||||
|
|
@ -22,15 +23,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.bonus.exp.POIOutputHelper;
|
||||
import com.bonus.index.beans.IndexCheckWarnBean;
|
||||
import com.bonus.index.beans.IndexHomeCalendarBean;
|
||||
import com.bonus.index.beans.IndexHomeDetailsBean;
|
||||
import com.bonus.index.beans.IndexHomeTaskBean;
|
||||
import com.bonus.index.beans.IndexInuseWarnBean;
|
||||
import com.bonus.index.beans.IndexProjectBean;
|
||||
import com.bonus.index.beans.IndexStorageWarnBean;
|
||||
import com.bonus.index.beans.IndexTodoWarnBean;
|
||||
import com.bonus.index.beans.IndexTotalWarnBean;
|
||||
import com.bonus.index.service.IndexHomeDetailsService;
|
||||
|
||||
@Controller
|
||||
|
|
@ -245,6 +237,32 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
@RequestMapping(value = "getNewlyStored", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes getNewlyStored(IndexHomeBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
List<IndexStorageWarnBean> list = service.getNewlyStored(o);
|
||||
ar.setSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
@RequestMapping(value = "getInventoryStored", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes getInventoryStored(IndexHomeBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
List<IndexStorageWarnBean> list = service.getInventoryStored(o);
|
||||
ar.setSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
// 库存不足-导出
|
||||
@RequestMapping(value = "exportStorageWarn", method = RequestMethod.GET)
|
||||
public void export(HttpServletResponse response, IndexStorageWarnBean o) {
|
||||
|
|
@ -255,7 +273,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
|
|||
logger.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void expOutExcel(HttpServletResponse response, List<IndexStorageWarnBean> list, String filename)
|
||||
throws Exception {
|
||||
if (list != null) {
|
||||
|
|
@ -280,7 +298,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
|
|||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Map<String, Object> outMaLeaseBeanToMap(int i, IndexStorageWarnBean o) {
|
||||
Map<String, Object> maps = new LinkedHashMap<String, Object>();
|
||||
maps.put("id", i + 1);
|
||||
|
|
@ -291,7 +309,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
|
|||
maps.put("maUnit", o.getMaUnit());
|
||||
return maps;
|
||||
}
|
||||
|
||||
|
||||
private List<String> reportHeader() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("序号");
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public interface IndexHomeDetailsDao extends BaseDao<IndexHomeDetailsBean> {
|
|||
List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o);
|
||||
|
||||
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
|
||||
List<IndexStorageWarnBean> getNewlyStored(IndexStorageWarnBean o);
|
||||
List<IndexStorageWarnBean> getInventoryStored(IndexStorageWarnBean o);
|
||||
|
||||
List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,7 @@ package com.bonus.index.service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.index.beans.IndexCheckWarnBean;
|
||||
import com.bonus.index.beans.IndexHomeCalendarBean;
|
||||
import com.bonus.index.beans.IndexHomeDetailsBean;
|
||||
import com.bonus.index.beans.IndexHomeTaskBean;
|
||||
import com.bonus.index.beans.IndexInuseWarnBean;
|
||||
import com.bonus.index.beans.IndexProjectBean;
|
||||
import com.bonus.index.beans.IndexStorageWarnBean;
|
||||
import com.bonus.index.beans.IndexTodoWarnBean;
|
||||
import com.bonus.index.beans.IndexTotalWarnBean;
|
||||
import com.bonus.index.beans.*;
|
||||
import com.bonus.sys.BaseService;
|
||||
|
||||
public interface IndexHomeDetailsService extends BaseService<IndexHomeDetailsBean> {
|
||||
|
|
@ -36,6 +28,8 @@ public interface IndexHomeDetailsService extends BaseService<IndexHomeDetailsBea
|
|||
List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o);
|
||||
|
||||
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
|
||||
List<IndexStorageWarnBean> getNewlyStored(IndexStorageWarnBean o);
|
||||
List<IndexStorageWarnBean> getInventoryStored(IndexStorageWarnBean o);
|
||||
|
||||
List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o);
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,14 @@ public class IndexHomeDetailsServiceImp extends BaseServiceImp<IndexHomeDetailsB
|
|||
public List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o) {
|
||||
return dao.getStorageWarn(o);
|
||||
}
|
||||
@Override
|
||||
public List<IndexStorageWarnBean> getNewlyStored(IndexStorageWarnBean o) {
|
||||
return dao.getNewlyStored(o);
|
||||
}
|
||||
@Override
|
||||
public List<IndexStorageWarnBean> getInventoryStored(IndexStorageWarnBean o) {
|
||||
return dao.getInventoryStored(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o) {
|
||||
|
|
@ -218,7 +226,7 @@ public class IndexHomeDetailsServiceImp extends BaseServiceImp<IndexHomeDetailsB
|
|||
|
||||
return dao.getProjectCompany(o);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<IndexProjectBean> getProjectSub(IndexProjectBean o) {
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public interface IndexHomeService extends BaseService<IndexHomeBean> {
|
|||
|
||||
/**
|
||||
* 查询工程领料、退料、维修检验、机具报废、修试后入库、新购入库、库存盘点数量
|
||||
*
|
||||
*
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,20 +8,12 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.bonus.index.beans.*;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.bonus.core.DateTimeHelper;
|
||||
import com.bonus.index.beans.IndexDetailVo;
|
||||
import com.bonus.index.beans.IndexHomeBean;
|
||||
import com.bonus.index.beans.IndexHomeResourseBean;
|
||||
import com.bonus.index.beans.IndexProAndNum;
|
||||
import com.bonus.index.beans.PartFiveBean;
|
||||
import com.bonus.index.beans.PartOneBean;
|
||||
import com.bonus.index.beans.PartSixBean;
|
||||
import com.bonus.index.beans.PartThreeBean;
|
||||
import com.bonus.index.beans.PartTwoBean;
|
||||
import com.bonus.index.dao.IndexHomeDao;
|
||||
import com.bonus.sys.BaseServiceImp;
|
||||
import com.bonus.sys.UserShiroHelper;
|
||||
|
|
@ -166,4 +158,7 @@ public class IndexHomeServiceImp extends BaseServiceImp<IndexHomeBean> implement
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue