Merge remote-tracking branch 'origin/develop' into develop

master
yixian 6 years ago
commit f41db13db2

@ -3477,7 +3477,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
List<JSONObject> transactions = clearingDistributedSurchargeMapper.findTransactions(client.getIntValue("client_id"));
transactions.forEach(e -> {
if ("Credit".equals(e.getString("type"))) {
if ("Credit".equals(e.getString("type")) && !"settle revoke".equals(e.getString("remark"))) {
JSONObject manager = managerMapper.findDetail(e.getString("operation"));
e.put("operator_displayname", manager.getString("display_name"));
}

@ -11,6 +11,8 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -19,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
@ -53,7 +56,7 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
surchargeTrans.sort(Comparator.comparing(trans -> trans.getDate("create_time")));
JSONObject detail = new JSONObject();
detail.put("client_id", clientId);
detail.put("settle_month", dateTo.toString("yyyy-MM"));
detail.put("settle_month", dateTo.plusMonths(-1).toString("yyyy-MM"));
BigDecimal creditAmount = surchargeTrans.stream()
.filter(trans -> "Credit".equals(trans.getString("type")))
.map(trans -> trans.getBigDecimal("amount"))

Loading…
Cancel
Save