代码提交

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}, '%')
</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>

View File

@ -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;

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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);
}