代码提交

This commit is contained in:
liang.chao 2026-02-05 18:14:58 +08:00
parent 3c046f5ee6
commit b64a0948e1
8 changed files with 72 additions and 40 deletions

View File

@ -1457,4 +1457,25 @@
and tpd.`NAME` like concat('%', #{maName}, '%') and tpd.`NAME` like concat('%', #{maName}, '%')
</if> </if>
</select> </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> </mapper>

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.bonus.index.beans.*;
import org.json.JSONObject; import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -14,13 +15,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.bonus.core.DateTimeHelper; 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.index.service.IndexHomeService;
import com.bonus.sys.AjaxRes; import com.bonus.sys.AjaxRes;
import com.bonus.sys.BaseController; import com.bonus.sys.BaseController;
@ -233,7 +227,7 @@ public class IndexHomeController extends BaseController<IndexHomeBean> {
/** /**
* 查询工程领料退料维修检验机具报废修试后入库新购入库库存盘点数量等数据 * 查询工程领料退料维修检验机具报废修试后入库新购入库库存盘点数量等数据
* *
* @param o * @param o
* @return * @return
*/ */

View File

@ -9,6 +9,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.bonus.index.beans.*;
import com.bonus.ma.beans.pickDetailsBean; import com.bonus.ma.beans.pickDetailsBean;
import com.bonus.sys.*; import com.bonus.sys.*;
import com.bonus.sys.beans.UserBean; 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 org.springframework.web.bind.annotation.ResponseBody;
import com.bonus.exp.POIOutputHelper; 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; import com.bonus.index.service.IndexHomeDetailsService;
@Controller @Controller
@ -245,6 +237,32 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
} }
return ar; 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) @RequestMapping(value = "exportStorageWarn", method = RequestMethod.GET)
public void export(HttpServletResponse response, IndexStorageWarnBean o) { public void export(HttpServletResponse response, IndexStorageWarnBean o) {
@ -255,7 +273,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
logger.error(e.toString(), e); logger.error(e.toString(), e);
} }
} }
private void expOutExcel(HttpServletResponse response, List<IndexStorageWarnBean> list, String filename) private void expOutExcel(HttpServletResponse response, List<IndexStorageWarnBean> list, String filename)
throws Exception { throws Exception {
if (list != null) { if (list != null) {
@ -280,7 +298,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
out.close(); out.close();
} }
} }
private Map<String, Object> outMaLeaseBeanToMap(int i, IndexStorageWarnBean o) { private Map<String, Object> outMaLeaseBeanToMap(int i, IndexStorageWarnBean o) {
Map<String, Object> maps = new LinkedHashMap<String, Object>(); Map<String, Object> maps = new LinkedHashMap<String, Object>();
maps.put("id", i + 1); maps.put("id", i + 1);
@ -291,7 +309,7 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
maps.put("maUnit", o.getMaUnit()); maps.put("maUnit", o.getMaUnit());
return maps; return maps;
} }
private List<String> reportHeader() { private List<String> reportHeader() {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
list.add("序号"); list.add("序号");

View File

@ -46,6 +46,8 @@ public interface IndexHomeDetailsDao extends BaseDao<IndexHomeDetailsBean> {
List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o); List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o);
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o); List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
List<IndexStorageWarnBean> getNewlyStored(IndexStorageWarnBean o);
List<IndexStorageWarnBean> getInventoryStored(IndexStorageWarnBean o);
List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o); List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o);

View File

@ -2,15 +2,7 @@ package com.bonus.index.service;
import java.util.List; import java.util.List;
import com.bonus.index.beans.IndexCheckWarnBean; import com.bonus.index.beans.*;
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.sys.BaseService; import com.bonus.sys.BaseService;
public interface IndexHomeDetailsService extends BaseService<IndexHomeDetailsBean> { public interface IndexHomeDetailsService extends BaseService<IndexHomeDetailsBean> {
@ -36,6 +28,8 @@ public interface IndexHomeDetailsService extends BaseService<IndexHomeDetailsBea
List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o); List<IndexHomeTaskBean> getMaInTask(IndexHomeTaskBean o);
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o); List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
List<IndexStorageWarnBean> getNewlyStored(IndexStorageWarnBean o);
List<IndexStorageWarnBean> getInventoryStored(IndexStorageWarnBean o);
List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o); List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o);

View File

@ -128,6 +128,14 @@ public class IndexHomeDetailsServiceImp extends BaseServiceImp<IndexHomeDetailsB
public List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o) { public List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o) {
return dao.getStorageWarn(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 @Override
public List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o) { public List<IndexCheckWarnBean> getCheckWarn(IndexCheckWarnBean o) {
@ -218,7 +226,7 @@ public class IndexHomeDetailsServiceImp extends BaseServiceImp<IndexHomeDetailsB
return dao.getProjectCompany(o); return dao.getProjectCompany(o);
} }
@Override @Override
public List<IndexProjectBean> getProjectSub(IndexProjectBean o) { public List<IndexProjectBean> getProjectSub(IndexProjectBean o) {

View File

@ -37,7 +37,7 @@ public interface IndexHomeService extends BaseService<IndexHomeBean> {
/** /**
* 查询工程领料退料维修检验机具报废修试后入库新购入库库存盘点数量 * 查询工程领料退料维修检验机具报废修试后入库新购入库库存盘点数量
* *
* @param o * @param o
* @return * @return
*/ */

View File

@ -8,20 +8,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import com.bonus.index.beans.*;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.bonus.core.DateTimeHelper; 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.index.dao.IndexHomeDao;
import com.bonus.sys.BaseServiceImp; import com.bonus.sys.BaseServiceImp;
import com.bonus.sys.UserShiroHelper; import com.bonus.sys.UserShiroHelper;
@ -166,4 +158,7 @@ public class IndexHomeServiceImp extends BaseServiceImp<IndexHomeBean> implement
return pageInfo; return pageInfo;
} }
List<IndexStorageWarnBean> getStorageWarn(IndexStorageWarnBean o);
} }