md
This commit is contained in:
parent
ba7b3bf5d7
commit
55c59a1599
@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fastreport:fastreport:1.0.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fastreport/fastreport/1.0.0/fastreport-1.0.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fastreport/fastreport/1.0.0/fastreport-1.0.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fastreport/fastreport/1.0.0/fastreport-1.0.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -250,6 +250,5 @@
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.pdfbox:fontbox:2.0.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fastreport:fastreport:1.0.0" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@ -88,6 +88,8 @@ public class EmisTmsScanRecordController extends EmisBaseController
|
||||
setPrivParams(emisTmsScanRecord);
|
||||
|
||||
emisTmsScanRecord.getParams().put("thisSiteCode",getLoginUser().getUser().getOwnerSiteCode());
|
||||
|
||||
|
||||
List<ScanStatDataInfo> list = emisTmsScanRecordService.queryScanStatList(emisTmsScanRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -209,6 +209,5 @@
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.pdfbox:fontbox:2.0.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fastreport:fastreport:1.0.0" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@ -453,7 +453,23 @@ public class EmisBaseService {
|
||||
waybill.setProblemDelayDays(emisProblemType.getDelayDay());
|
||||
|
||||
// 重新计算预估时间
|
||||
EmisWaybill oldEmisWaybill=getWaybillByBillCode(billCode);
|
||||
Date oldEstDate=oldEmisWaybill.getEstimateDate();
|
||||
Date currentTime=new Date();
|
||||
Date startDate=oldEmisWaybill.getSendDate();
|
||||
|
||||
// 如果当前时间已经超过当前预估时间需要使用当前时间
|
||||
if(currentTime.getTime()>oldEstDate.getTime()){
|
||||
startDate=currentTime;
|
||||
}
|
||||
|
||||
// 开单当天不算时效
|
||||
Date newEstDate = getEstimateDate(
|
||||
startDate,oldEmisWaybill.getProductType(),
|
||||
oldEmisWaybill.getSendCountry(),
|
||||
oldEmisWaybill.getReceiveCountry(),emisProblemType.getDelayDay());
|
||||
|
||||
waybill.setEstimateDate(newEstDate);
|
||||
waybill.preUpdate();
|
||||
emisWaybillMapper.updateProblemStatus(waybill);
|
||||
|
||||
@ -1220,9 +1236,12 @@ public class EmisBaseService {
|
||||
* @param sendCountry
|
||||
* @return
|
||||
*/
|
||||
public Date getEstimateDate(Date sendDate,String prodCode,String receiveCountry,String sendCountry) {
|
||||
public Date getEstimateDate(Date sendDate,String prodCode,String receiveCountry,String sendCountry,Integer otherAddDay) {
|
||||
Date estDate = null;
|
||||
|
||||
if(otherAddDay==null){
|
||||
otherAddDay=0;
|
||||
}
|
||||
// 发件时间+1天,从下一天的0点开始算
|
||||
sendDate = DateUtils.addDays(sendDate,1);
|
||||
|
||||
@ -1240,7 +1259,7 @@ public class EmisBaseService {
|
||||
EmisTransProduct emisTransProduct = getTransProductByCode(prodCode);
|
||||
|
||||
// 预估到达时间 startData+最大时效
|
||||
Date endDate = DateUtils.addDays(startDate, emisTransProduct.getMaxAging()-1);
|
||||
Date endDate = DateUtils.addDays(startDate, emisTransProduct.getMaxAging()+otherAddDay-1);
|
||||
|
||||
// 计算周末
|
||||
int weekDays = computeWeekDays(startDate,endDate,true);
|
||||
@ -1253,7 +1272,7 @@ public class EmisBaseService {
|
||||
endDate);
|
||||
|
||||
// 1+1+
|
||||
int totalDays=(emisTransProduct.getMaxAging()-1)+weekDays+notCaclDays;
|
||||
int totalDays=(emisTransProduct.getMaxAging()+otherAddDay-1)+weekDays+notCaclDays;
|
||||
log.info("计算预估到达时间:[maxAging="+emisTransProduct.getMaxAging()+",weekDays="+weekDays+",notCaclDays="+notCaclDays);
|
||||
// 预估达到时间
|
||||
return DateUtils.addDays(startDate, totalDays);
|
||||
|
||||
@ -512,7 +512,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
Date estDate = getEstimateDate(
|
||||
emisWaybillSave.getSendDate(),emisWaybillSave.getProductType(),
|
||||
emisWaybillSave.getSendCountry(),
|
||||
emisWaybillSave.getReceiveCountry());
|
||||
emisWaybillSave.getReceiveCountry(),0);
|
||||
|
||||
// 预计到达时间
|
||||
log.info("预估到达时间==>"+ DateUtils.dateTime(estDate));
|
||||
|
||||
@ -112,16 +112,27 @@
|
||||
and scan_type=#{params.thisSiteScanType}
|
||||
</if>
|
||||
|
||||
<if test="params.thisSiteCode != null and params.thisSiteCode !=''">
|
||||
and scan_site_code=#{params.thisSiteCode}
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
scan_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
GROUP BY scan_site_code asc
|
||||
|
||||
</select>
|
||||
|
||||
<!-- <if test="params.thisSiteCode != null and params.thisSiteCode !=''">-->
|
||||
<!-- and scan_site_code=#{params.thisSiteCode}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="params.thisSiteScanType != null and params.thisSiteScanType !=''">-->
|
||||
<!-- and bill_code in(-->
|
||||
<!-- select bill_code from emis_tms_scan_record where scan_site_code=#{params.thisSiteCode} and scan_type=#{params.thisSiteScanType}-->
|
||||
@ -144,9 +155,17 @@
|
||||
<if test="params.endScanDate != null and params.endScanDate != ''">
|
||||
and scan_date <![CDATA[ <= ]]> #{params.endScanDate}
|
||||
</if>
|
||||
<if test="params.thisSiteScanType != null and params.thisSiteScanType !=''">
|
||||
and bill_code in(
|
||||
select bill_code from emis_tms_scan_record where scan_site_code=#{params.thisSiteCode} and scan_type=#{params.thisSiteScanType}
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
scan_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
@ -1090,7 +1090,8 @@
|
||||
bl_is_question = '1',
|
||||
problem_type = #{problemType},
|
||||
problem_cause = #{problemCause},
|
||||
problem_delay_days = #{problemDelayDays}
|
||||
problem_delay_days = #{problemDelayDays},
|
||||
estimate_date = #{estimateDate}
|
||||
<if test="updateBy != null and updateBy != ''">,update_by = #{updateBy}</if>
|
||||
<if test="updateSite != null and updateSite != ''">,update_site = #{updateSite}</if>
|
||||
</trim>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user