md
This commit is contained in:
parent
198fdcece9
commit
3d2a86ca4c
@ -26,6 +26,7 @@ import com.xdadan.erp.emis.domain.vo.scan.ScanResult;
|
||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsTransPlanDtlService;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillService;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -241,12 +242,7 @@ public class EmisTmsScanRecordController extends EmisBaseController
|
||||
setPrivParams(emisTmsScanRecord);
|
||||
|
||||
if(!StringUtils.isEmpty(emisTmsScanRecord.getBillCode())){
|
||||
if(emisTmsScanRecord.getBillCode().lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(emisTmsScanRecord.getBillCode());
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
emisTmsScanRecord.setBillCode(sb.toString());
|
||||
}
|
||||
|
||||
emisTmsScanRecord.setBillCode(WaybillHelper.formatQueryValue(emisTmsScanRecord.getBillCode()));
|
||||
String[] billCodeSortList = emisTmsScanRecord.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisTmsScanRecord.getParams().put("billCodeSortList",Arrays.asList(billCodeSortList));
|
||||
@ -254,11 +250,7 @@ public class EmisTmsScanRecordController extends EmisBaseController
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(emisTmsScanRecord.getOrderSn())){
|
||||
if(emisTmsScanRecord.getOrderSn().lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(emisTmsScanRecord.getOrderSn());
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
emisTmsScanRecord.setOrderSn(sb.toString());
|
||||
}
|
||||
emisTmsScanRecord.setOrderSn(WaybillHelper.formatQueryValue(emisTmsScanRecord.getOrderSn()));
|
||||
String[] orderSnSortList = emisTmsScanRecord.getOrderSn().split(",");
|
||||
if(orderSnSortList.length>1){
|
||||
emisTmsScanRecord.getParams().put("orderSnSortList",Arrays.asList(orderSnSortList));
|
||||
|
||||
@ -23,6 +23,7 @@ import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -76,13 +77,8 @@ public class EmisWaybillAttachmentController extends EmisBaseController
|
||||
// 设置通用权限查询参数
|
||||
setPrivParams(emisWaybillAttachment);
|
||||
|
||||
if(!org.apache.commons.lang3.StringUtils.isEmpty(emisWaybillAttachment.getBillCode())){
|
||||
if(emisWaybillAttachment.getBillCode().lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(emisWaybillAttachment.getBillCode());
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
emisWaybillAttachment.setBillCode(sb.toString());
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(emisWaybillAttachment.getBillCode())){
|
||||
emisWaybillAttachment.setBillCode(WaybillHelper.formatQueryValue(emisWaybillAttachment.getBillCode()));
|
||||
String[] billCodeSortList = emisWaybillAttachment.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisWaybillAttachment.getParams().put("billCodeSortList",Arrays.asList(billCodeSortList));
|
||||
@ -90,6 +86,7 @@ public class EmisWaybillAttachmentController extends EmisBaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<EmisWaybillAttachment> list = emisWaybillAttachmentService.selectEmisWaybillAttachmentList(emisWaybillAttachment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ import com.xdadan.erp.emis.domain.vo.*;
|
||||
import com.xdadan.erp.emis.service.*;
|
||||
import com.xdadan.erp.emis.service.print.IXddTplPrint;
|
||||
import com.xdadan.erp.emis.service.print.tanex.TanexTplPrintImpl;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import com.xdadan.erp.system.domain.SysFileInfo;
|
||||
import com.xdadan.erp.system.service.ISysFileInfoService;
|
||||
import com.xdadan.erp.system.service.ISysUserService;
|
||||
@ -296,14 +297,8 @@ public class EmisWaybillController extends EmisBaseController
|
||||
|
||||
setPrivParams(emisWaybill);
|
||||
|
||||
|
||||
if(!StringUtils.isEmpty(emisWaybill.getBillCode())){
|
||||
if(emisWaybill.getBillCode().lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(emisWaybill.getBillCode());
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
emisWaybill.setBillCode(sb.toString());
|
||||
}
|
||||
|
||||
emisWaybill.setBillCode(WaybillHelper.formatQueryValue(emisWaybill.getBillCode()));
|
||||
String[] billCodeSortList = emisWaybill.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisWaybill.getParams().put("billCodeSortList",Arrays.asList(billCodeSortList));
|
||||
@ -311,18 +306,13 @@ public class EmisWaybillController extends EmisBaseController
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(emisWaybill.getOrderSn())){
|
||||
if(emisWaybill.getOrderSn().lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(emisWaybill.getOrderSn());
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
emisWaybill.setOrderSn(sb.toString());
|
||||
}
|
||||
emisWaybill.setOrderSn(WaybillHelper.formatQueryValue(emisWaybill.getOrderSn()));
|
||||
String[] orderSnSortList = emisWaybill.getOrderSn().split(",");
|
||||
if(orderSnSortList.length>1){
|
||||
emisWaybill.getParams().put("orderSnSortList",Arrays.asList(orderSnSortList));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<EmisWaybill> list = emisWaybillService.selectEmisWaybillList(emisWaybill);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -11,8 +11,12 @@
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -29,7 +33,6 @@ import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo;
|
||||
@ -56,6 +59,17 @@ public class EmisWaybillProblemInfoController extends EmisBaseController
|
||||
public TableDataInfo list(EmisWaybillProblemInfo emisWaybillProblemInfo)
|
||||
{
|
||||
startPage();
|
||||
// 设置通用权限查询参数
|
||||
setPrivParams(emisWaybillProblemInfo);
|
||||
|
||||
if(!StringUtils.isEmpty(emisWaybillProblemInfo.getBillCode())){
|
||||
emisWaybillProblemInfo.setBillCode(WaybillHelper.formatQueryValue(emisWaybillProblemInfo.getBillCode()));
|
||||
String[] billCodeSortList = emisWaybillProblemInfo.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisWaybillProblemInfo.getParams().put("billCodeSortList", Arrays.asList(billCodeSortList));
|
||||
}
|
||||
}
|
||||
|
||||
List<EmisWaybillProblemInfo> list = emisWaybillProblemInfoService.selectEmisWaybillProblemInfoList(emisWaybillProblemInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -19,6 +19,8 @@ import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -36,7 +38,6 @@ import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillTransfer;
|
||||
@ -66,6 +67,13 @@ public class EmisWaybillTransferController extends EmisBaseController
|
||||
public TableDataInfo list(EmisWaybillTransfer emisWaybillTransfer)
|
||||
{
|
||||
startPage();
|
||||
if(!StringUtils.isEmpty(emisWaybillTransfer.getBillCode())){
|
||||
emisWaybillTransfer.setBillCode(WaybillHelper.formatQueryValue(emisWaybillTransfer.getBillCode()));
|
||||
String[] billCodeSortList = emisWaybillTransfer.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisWaybillTransfer.getParams().put("billCodeSortList", Arrays.asList(billCodeSortList));
|
||||
}
|
||||
}
|
||||
List<EmisWaybillTransfer> list = emisWaybillTransferService.selectEmisWaybillTransferList(emisWaybillTransfer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -200,6 +200,26 @@ public class WaybillHelper {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 格式化查询字符串为逗号分隔符,换行也替换为逗号,去除尾部逗号
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static String formatQueryValue(String str) {
|
||||
if(!StringUtils.isEmpty(str)){
|
||||
str=str.replaceAll("\\n", ",");
|
||||
if(str.lastIndexOf(",")!=-1) {
|
||||
StringBuilder sb = new StringBuilder(str);
|
||||
sb.deleteCharAt(sb.lastIndexOf(","));
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
@ -42,8 +42,16 @@
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site=#{createSite}</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
||||
and create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
||||
</if>
|
||||
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user