给采购订单增加关联请购单的查询参数

This commit is contained in:
jishenghua 2024-04-27 10:48:52 +08:00
parent bb673ddc26
commit 36d7640c71
4 changed files with 21 additions and 7 deletions

View File

@ -23,6 +23,7 @@ public interface DepotHeadMapperEx {
@Param("statusArray") String[] statusArray, @Param("statusArray") String[] statusArray,
@Param("purchaseStatusArray") String[] purchaseStatusArray, @Param("purchaseStatusArray") String[] purchaseStatusArray,
@Param("number") String number, @Param("number") String number,
@Param("linkApply") String linkApply,
@Param("linkNumber") String linkNumber, @Param("linkNumber") String linkNumber,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@ -45,6 +46,7 @@ public interface DepotHeadMapperEx {
@Param("statusArray") String[] statusArray, @Param("statusArray") String[] statusArray,
@Param("purchaseStatusArray") String[] purchaseStatusArray, @Param("purchaseStatusArray") String[] purchaseStatusArray,
@Param("number") String number, @Param("number") String number,
@Param("linkApply") String linkApply,
@Param("linkNumber") String linkNumber, @Param("linkNumber") String linkNumber,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,

View File

@ -37,6 +37,7 @@ public class DepotHeadComponent implements ICommonQuery {
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus"); String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
String linkApply = StringUtil.getInfo(search, "linkApply");
String linkNumber = StringUtil.getInfo(search, "linkNumber"); String linkNumber = StringUtil.getInfo(search, "linkNumber");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
@ -46,7 +47,7 @@ public class DepotHeadComponent implements ICommonQuery {
Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId")); Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId"));
Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId")); Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId"));
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
return depotHeadService.select(type, subType, hasDebt, status, purchaseStatus, number, linkNumber, return depotHeadService.select(type, subType, hasDebt, status, purchaseStatus, number, linkApply, linkNumber,
beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark, QueryUtils.offset(map), QueryUtils.rows(map)); beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@ -59,6 +60,7 @@ public class DepotHeadComponent implements ICommonQuery {
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus"); String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
String linkApply = StringUtil.getInfo(search, "linkApply");
String linkNumber = StringUtil.getInfo(search, "linkNumber"); String linkNumber = StringUtil.getInfo(search, "linkNumber");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
@ -68,7 +70,7 @@ public class DepotHeadComponent implements ICommonQuery {
Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId")); Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId"));
Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId")); Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId"));
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
return depotHeadService.countDepotHead(type, subType, hasDebt, status, purchaseStatus, number, linkNumber, return depotHeadService.countDepotHead(type, subType, hasDebt, status, purchaseStatus, number, linkApply, linkNumber,
beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark); beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark);
} }

View File

@ -113,7 +113,7 @@ public class DepotHeadService {
return list; return list;
} }
public List<DepotHeadVo4List> select(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber, public List<DepotHeadVo4List> select(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkApply, String linkNumber,
String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark, int offset, int rows) throws Exception { String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark, int offset, int rows) throws Exception {
List<DepotHeadVo4List> resList = new ArrayList<>(); List<DepotHeadVo4List> resList = new ArrayList<>();
try{ try{
@ -132,8 +132,9 @@ public class DepotHeadService {
Map<Long,String> accountMap = accountService.getAccountMap(); Map<Long,String> accountMap = accountService.getAccountMap();
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4List> list = depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, hasDebt, statusArray, purchaseStatusArray, number, linkNumber, beginTime, endTime, List<DepotHeadVo4List> list = depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, hasDebt,
materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark, offset, rows); statusArray, purchaseStatusArray, number, linkApply, linkNumber, beginTime, endTime,
materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark, offset, rows);
if (null != list) { if (null != list) {
List<Long> idList = new ArrayList<>(); List<Long> idList = new ArrayList<>();
List<String> numberList = new ArrayList<>(); List<String> numberList = new ArrayList<>();
@ -227,7 +228,7 @@ public class DepotHeadService {
return resList; return resList;
} }
public Long countDepotHead(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber, public Long countDepotHead(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkApply, String linkNumber,
String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark) throws Exception{ String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark) throws Exception{
Long result=null; Long result=null;
try{ try{
@ -240,7 +241,8 @@ public class DepotHeadService {
creatorArray = StringUtil.isNotEmpty(purchaseStatus) ? null: creatorArray; creatorArray = StringUtil.isNotEmpty(purchaseStatus) ? null: creatorArray;
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, hasDebt, statusArray, purchaseStatusArray, number, linkNumber, beginTime, endTime, result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, hasDebt,
statusArray, purchaseStatusArray, number, linkApply, linkNumber, beginTime, endTime,
materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark); materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);

View File

@ -84,6 +84,10 @@
<bind name="bindNumber" value="'%'+number+'%'"/> <bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber} and dh.number like #{bindNumber}
</if> </if>
<if test="linkApply != null">
<bind name="bindLinkApply" value="'%'+linkApply+'%'"/>
and dh.link_apply like #{bindLinkApply}
</if>
<if test="linkNumber != null"> <if test="linkNumber != null">
<bind name="bindLinkNumber" value="'%'+linkNumber+'%'"/> <bind name="bindLinkNumber" value="'%'+linkNumber+'%'"/>
and dh.link_number like #{bindLinkNumber} and dh.link_number like #{bindLinkNumber}
@ -192,6 +196,10 @@
<bind name="bindNumber" value="'%'+number+'%'"/> <bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber} and dh.number like #{bindNumber}
</if> </if>
<if test="linkApply != null">
<bind name="bindLinkApply" value="'%'+linkApply+'%'"/>
and dh.link_apply like #{bindLinkApply}
</if>
<if test="linkNumber != null"> <if test="linkNumber != null">
<bind name="bindLinkNumber" value="'%'+linkNumber+'%'"/> <bind name="bindLinkNumber" value="'%'+linkNumber+'%'"/>
and dh.link_number like #{bindLinkNumber} and dh.link_number like #{bindLinkNumber}