Browse Source

完善过账代码

guq 7 years ago
parent
commit
b140770702

+ 3 - 1
eis-wms/src/main/java/com/uas/eiswms/dao/BaseDao.java

@@ -402,7 +402,9 @@ public class BaseDao {
 		if (rs.next()) {
 			String Code = rs.getObject("ds_inorout").toString();
 			if (Code.equals("IN") || Code.equals("-OUT")) {
-				execute("update prodiodetail set pd_replydate=pd_prodmadedate + (select nvl(pr_validdays,0) from product where  pd_prodcode=pr_code) where pd_piid=? and pd_prodmadedate is not null",
+				execute("update prodiodetail set pd_replydate=pd_prodmadedate + (select nvl(pr_validdays,0) from product where  pd_prodcode=pr_code) where pd_piid=? and pd_prodmadedate is not null and pd_replydate is  null",
+						id);
+				execute("update prodiodetail set pd_prodmadedate=pd_replydate - (select nvl(pr_validdays,0) from product where  pd_prodcode=pr_code) where pd_piid=? and pd_prodmadedate is  null and pd_replydate is not null",
 						id);
 			}
 		}

File diff suppressed because it is too large
+ 2 - 0
eis-wms/src/main/java/com/uas/eiswms/service/impl/ProdIOServiceImpl.java


+ 3 - 2
eis-wms/src/main/java/com/uas/eiswms/util/DateUtil.java

@@ -282,9 +282,10 @@ public class DateUtil {
 		return 0;
 	}
 
-	public static boolean compareToday(Object d1) {
+	//根据类型判断
+	public static boolean compareToday(Object d1, String type) {
 		try {
-			if (d1 == null) {
+			if (d1 == null && type.equals("less")) {
 				return false;
 			}
 			Date dt1 = YMD.parse(d1.toString());

Some files were not shown because too many files changed in this diff