Commit bb2330a0 by 高晓磊

审批时添加审批人和审批时间

parent 3f6e5543
......@@ -295,9 +295,9 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
adjustmentDetachedCriteria.add(Restrictions.in("station.id", stationId));
adjustmentDetachedCriteria.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(adjustmentDate)));
adjustmentDetachedCriteria.add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(adjustmentDate)));
adjustmentDetachedCriteria.add(Restrictions.le("createTime", createTime));
adjustmentDetachedCriteria.add(Restrictions.le(BaseConstants.CREATE_TIME, createTime));
adjustmentDetachedCriteria.add(Restrictions.le(BaseConstants.DEL, false));
adjustmentDetachedCriteria.addOrder(Order.desc("createTime"));
adjustmentDetachedCriteria.addOrder(Order.desc(BaseConstants.CREATE_TIME));
return (List<KObject>) template.findByCriteria(adjustmentDetachedCriteria);
}
......
package com.xyst.dinas.price.internal.service;
import com.beecode.bap.attachment.common.Page;
import com.beecode.bap.workflow.core.BizProcessState;
import com.beecode.bcp.core.context.AminoContextHolder;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.common.BaseConstants;
import com.xyst.dinas.price.dao.PriceAdjustmentDao;
......@@ -16,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.sql.Array;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -134,6 +133,9 @@ public class PriceAdjustmentServiceImpl implements PriceAdjustmentService {
@Override
public void update(KObject kobject) {
kobject.set("approvalTime",new Date());
KObject staff = AminoContextHolder.getContext().getStaff();
kobject.set("approver",staff);
priceAdjustmentDao.modify(kobject);
//审批通过后获取 同一天生效时间 && 创建时间小于该条记录 && 已审批 的记录,将其改为失效
List<KObject> kObjects = priceAdjustmentDao.getSameAdjustmentDateAndLtCreateDate(kobject);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment