Commit a951ebd7 by shiwenbo

Merge branch 'develop' of gitlab.beecode.cn:kunlun/xyst_dinas/xyst_dinas_backend into develop

parents 1bc7e74a faf8a0c9
...@@ -20,7 +20,7 @@ public interface DinasTypeConstant { ...@@ -20,7 +20,7 @@ public interface DinasTypeConstant {
/** /**
* 关联子表的实体名 * 关联子表的实体名
*/ */
String STATION_DINAS_TYPE_DETAIL_ENTITY = "com.xyst.dinas.biz.datamodel.Station$DinasTypeDetail"; String STATION_DINAS_TYPE_DETAIL_ENTITY = "com.xyst.dinas.biz.datamodel.StationAssociatedDinasTypeDetail";
/** 砂石种类名称*/ /** 砂石种类名称*/
String DINASTYPE_NAME = "dinasTypeName"; String DINASTYPE_NAME = "dinasTypeName";
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<m:id>97b70076-09ca-4fb5-b2d0-cd13a4218f19</m:id> <m:id>97b70076-09ca-4fb5-b2d0-cd13a4218f19</m:id>
<m:name>dinasTypeDetails</m:name> <m:name>dinasTypeDetails</m:name>
<m:title>售卖的砂石</m:title> <m:title>售卖的砂石</m:title>
<m:type>com.xyst.dinas.biz.datamodel.RetailInfo$DinasTypeDetail[]</m:type> <m:type>com.xyst.dinas.biz.datamodel.RetailInfoAssociatedDinasTypeDetail[]</m:type>
<m:description/> <m:description/>
<m:default/> <m:default/>
</m:attribute> </m:attribute>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification> <specification>1.0</specification>
<id>f146f611-b102-4865-81c8-c4375b6771dc</id> <id>f146f611-b102-4865-81c8-c4375b6771dc</id>
<name>com.xyst.dinas.biz.datamodel.RetailInfo$DinasTypeDetail</name> <name>com.xyst.dinas.biz.datamodel.RetailInfoAssociatedDinasTypeDetail</name>
<title>散户购买的砂石种类</title> <title>散户购买的砂石种类</title>
<define>bcp.type.Class</define> <define>bcp.type.Class</define>
<define-version>1.0</define-version> <define-version>1.0</define-version>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification> <specification>1.0</specification>
<id>2e4c91d3-9cdf-4af7-90b6-689473b6d142</id> <id>2e4c91d3-9cdf-4af7-90b6-689473b6d142</id>
<name>com.xyst.dinas.biz.datamodel.Station$DinasTypeDetail</name> <name>com.xyst.dinas.biz.datamodel.StationAssociatedDinasTypeDetail</name>
<title>砂石和场站的关联表</title> <title>砂石和场站的关联表</title>
<define>bcp.type.Class</define> <define>bcp.type.Class</define>
<define-version>1.0</define-version> <define-version>1.0</define-version>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</property> </property>
</class> </class>
<class entity-name="com.xyst.dinas.biz.datamodel.Station$DinasTypeDetail" table="xyst_dinas_biz_station_dinas_type_detail" > <class entity-name="com.xyst.dinas.biz.datamodel.StationAssociatedDinasTypeDetail" table="xyst_dinas_biz_station_dinas_type_detail" >
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
<bag name="dinasTypeDetails" cascade="none" inverse="true" lazy="extra"> <bag name="dinasTypeDetails" cascade="none" inverse="true" lazy="extra">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.biz.datamodel.RetailInfo$DinasTypeDetail"/> <one-to-many entity-name="com.xyst.dinas.biz.datamodel.RetailInfoAssociatedDinasTypeDetail"/>
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.biz.datamodel.RetailInfo$DinasTypeDetail" table="xyst_dinas_biz_retail_dinas_type_detail" > <class entity-name="com.xyst.dinas.biz.datamodel.RetailInfoAssociatedDinasTypeDetail" table="xyst_dinas_biz_retail_dinas_type_detail" >
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -143,10 +143,10 @@ ...@@ -143,10 +143,10 @@
</property> </property>
<bag name="contractDetails" lazy="true" fetch="select" inverse="true"> <bag name="contractDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.contract.datamodel.Contract$contractDetail" /> <one-to-many entity-name="com.xyst.dinas.contract.datamodel.ContractAssociatedcontractDetail" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.contract.datamodel.Contract$contractDetail" table="xyst_dinas_contract_detail"> <class entity-name="com.xyst.dinas.contract.datamodel.ContractAssociatedcontractDetail" table="xyst_dinas_contract_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="uuid2" /> <generator class="uuid2" />
......
...@@ -10,6 +10,6 @@ public interface PriceAdjustmentConstant { ...@@ -10,6 +10,6 @@ public interface PriceAdjustmentConstant {
/** /**
* 子项目的实体名 * 子项目的实体名
*/ */
String DETAIL_ENTITY = "com.xyst.dinas.price.datamodel.PriceAdjustment$DinasTypeDetails"; String DETAIL_ENTITY = "com.xyst.dinas.price.datamodel.PriceAdjustmentAssociatedDinasTypeDetails";
} }
...@@ -12,6 +12,7 @@ import java.util.UUID; ...@@ -12,6 +12,7 @@ import java.util.UUID;
*/ */
public class PriceAdjustmentSearchEntity<T> extends Page<T> { public class PriceAdjustmentSearchEntity<T> extends Page<T> {
private Integer applyStatus; private Integer applyStatus;
private Integer adjustmentStatus;
private List<UUID> stationIds; private List<UUID> stationIds;
private List<UUID> regionalCompanyIds; private List<UUID> regionalCompanyIds;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
...@@ -79,4 +80,12 @@ public class PriceAdjustmentSearchEntity<T> extends Page<T> { ...@@ -79,4 +80,12 @@ public class PriceAdjustmentSearchEntity<T> extends Page<T> {
public void setApplyEndDate(Date applyEndDate) { public void setApplyEndDate(Date applyEndDate) {
this.applyEndDate = applyEndDate; this.applyEndDate = applyEndDate;
} }
public Integer getAdjustmentStatus() {
return adjustmentStatus;
}
public void setAdjustmentStatus(Integer adjustmentStatus) {
this.adjustmentStatus = adjustmentStatus;
}
} }
...@@ -14,12 +14,9 @@ import com.xyst.dinas.price.constant.PriceAdjustmentConstant; ...@@ -14,12 +14,9 @@ import com.xyst.dinas.price.constant.PriceAdjustmentConstant;
import com.xyst.dinas.price.dao.PriceAdjustmentDao; import com.xyst.dinas.price.dao.PriceAdjustmentDao;
import com.xyst.dinas.price.entity.*; import com.xyst.dinas.price.entity.*;
import com.xyst.dinas.price.enumeration.PriceAdjustmentAdjustmentStatusEnum; import com.xyst.dinas.price.enumeration.PriceAdjustmentAdjustmentStatusEnum;
import org.apache.commons.lang3.time.DateUtils;
import org.hibernate.criterion.*; import org.hibernate.criterion.*;
import org.hibernate.query.Query; import org.hibernate.query.Query;
import org.hibernate.transform.Transformers; import org.hibernate.transform.Transformers;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.Type;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate; import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -72,6 +69,10 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -72,6 +69,10 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
detachedCriteria.add(Restrictions.in("applyStatus", priceAdjustmentSearchEntity.getApplyStatus())); detachedCriteria.add(Restrictions.in("applyStatus", priceAdjustmentSearchEntity.getApplyStatus()));
} }
if (null != priceAdjustmentSearchEntity.getAdjustmentStatus()) {
detachedCriteria.add(Restrictions.in("adjustmentStatus", priceAdjustmentSearchEntity.getAdjustmentStatus()));
}
detachedCriteria.addOrder(Order.desc(BaseConstants.CREATE_TIME)); detachedCriteria.addOrder(Order.desc(BaseConstants.CREATE_TIME));
int offset = priceAdjustmentSearchEntity.getPageSize() * (priceAdjustmentSearchEntity.getPageNo() - 1); int offset = priceAdjustmentSearchEntity.getPageSize() * (priceAdjustmentSearchEntity.getPageNo() - 1);
priceAdjustmentSearchEntity.setTotal(template.findByCriteria(detachedCriteria).size()); priceAdjustmentSearchEntity.setTotal(template.findByCriteria(detachedCriteria).size());
...@@ -165,6 +166,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -165,6 +166,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
detachedCriteria.add(Restrictions.eq("master." + BaseConstants.DEL, false)) detachedCriteria.add(Restrictions.eq("master." + BaseConstants.DEL, false))
.add(Restrictions.in("master.applyStatus", BizProcessState.DONE_WITH_AGREE.getValue())) .add(Restrictions.in("master.applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
.add(Restrictions.ne("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue())) .add(Restrictions.ne("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue()))
.add(Restrictions.ne("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.NOT_STARTED.getValue()))
// .add(Restrictions.eq("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.PROCESSING.getValue())) // .add(Restrictions.eq("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.PROCESSING.getValue()))
.createAlias("master", "master") .createAlias("master", "master")
.createAlias("master.station", "station") .createAlias("master.station", "station")
...@@ -206,11 +208,12 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -206,11 +208,12 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
public void updateToStart(Date date) { public void updateToStart(Date date) {
//获取本天最后提交且审批通过的记录,修改为生效中 //获取本天最后提交且审批通过的记录,修改为生效中
DetachedCriteria detachedCriteria = getDetachedCriteria(date); DetachedCriteria detachedCriteria = getDetachedCriteria(date);
List<KObject> byCriteria = (List<KObject>) template.findByCriteria(detachedCriteria, 0, 1); List<KObject> byCriteria = (List<KObject>) template.findByCriteria(detachedCriteria, -1, -1);
if (!CollectionUtils.isEmpty(byCriteria)) { if (!CollectionUtils.isEmpty(byCriteria)) {
KObject kObject = byCriteria.get(0); for (KObject kObject : byCriteria) {
kObject.set("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.PROCESSING.getValue()); kObject.set("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.PROCESSING.getValue());
template.update(kObject); template.update(kObject);
}
} }
} }
...@@ -218,19 +221,38 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -218,19 +221,38 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
@Override @Override
public void updateNotOverToEnd(Date date) { public void updateNotOverToEnd(Date date) {
//本天场站下砂石类型为X的记录不做失效处理 //本天场站下砂石类型为X的记录不做失效处理
//获取今天最新场站提交的记录 List<UUID> noOverPriceDetail = getNoOverPriceDetail(date);
// List<UUID> as = getStationGroupInfo(date); if(CollectionUtils.isEmpty(noOverPriceDetail)){
List<UUID> noOverPrice = getNoOverPrice(date); return;
}
List<UUID> masterId= getMasterIdByDetailId(noOverPriceDetail);
template.execute(session -> { template.execute(session -> {
Query query = session.createQuery("update " + DETAIL_ENTITY + " as a SET a.adjustmentEndDate =:adjustmentEndDate WHERE a.id IN (:ids)"); Query query = session.createQuery("update " + DETAIL_ENTITY + " as a SET a.adjustmentEndDate =:adjustmentEndDate WHERE a.id IN (:ids)");
query.setParameter("adjustmentEndDate", date); query.setParameter("adjustmentEndDate", date);
query.setParameter("ids", noOverPrice); query.setParameter("ids", noOverPriceDetail);
return query.executeUpdate();
});
template.execute(session -> {
Query query = session.createQuery("update " + ENTITY + " as a SET a.adjustmentEndDate =:adjustmentEndDate,a.adjustmentStatus=:adjustmentStatus WHERE a.id IN (:ids) ");
query.setParameter("adjustmentEndDate", date);
query.setParameter("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.OVER.getValue());
query.setParameter("ids", masterId);
return query.executeUpdate(); return query.executeUpdate();
}); });
} }
private List<UUID> getMasterIdByDetailId(List<UUID> noOverPriceDetail) {
KClass bean = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.DETAIL_ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
detachedCriteria.add(Restrictions.in("id", noOverPriceDetail));
detachedCriteria.setProjection(Projections.projectionList().add(Projections.property("master.id")));
return (List<UUID> )template.findByCriteria(detachedCriteria);
}
@Override @Override
public void updateToReject(Date date) { public void updateToReject(Date date) {
//将今天开始生效但是审批没通过的做驳回处理 //将今天开始生效但是审批没通过的做驳回处理
...@@ -269,6 +291,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -269,6 +291,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
KClass adjustment = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.ENTITY, KClass.class); KClass adjustment = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.ENTITY, KClass.class);
DetachedCriteria adjustmentDetachedCriteria = DetachedCriteria.forEntityName(adjustment.getName()); DetachedCriteria adjustmentDetachedCriteria = DetachedCriteria.forEntityName(adjustment.getName());
adjustmentDetachedCriteria.add(Restrictions.in("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue())); adjustmentDetachedCriteria.add(Restrictions.in("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()));
adjustmentDetachedCriteria.add(Restrictions.ne("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue()));
adjustmentDetachedCriteria.add(Restrictions.in("station.id", stationId)); adjustmentDetachedCriteria.add(Restrictions.in("station.id", stationId));
adjustmentDetachedCriteria.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(adjustmentDate))); adjustmentDetachedCriteria.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(adjustmentDate)));
adjustmentDetachedCriteria.add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(adjustmentDate))); adjustmentDetachedCriteria.add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(adjustmentDate)));
...@@ -278,24 +301,6 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -278,24 +301,6 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
return (List<KObject>) template.findByCriteria(adjustmentDetachedCriteria); return (List<KObject>) template.findByCriteria(adjustmentDetachedCriteria);
} }
private List<UUID> getStationGroupInfo(Date date) {
KClass bean = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.DETAIL_ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
detachedCriteria.createAlias("master", "master");
detachedCriteria.createAlias("master.station", "station");
detachedCriteria.createAlias("dinasType", "dinasType");
detachedCriteria.add(Restrictions.eq("master." + BaseConstants.DEL, false))
.add(Restrictions.in("master.applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
.add(Restrictions.isNull("adjustmentEndDate"))
.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date)))
.add(Restrictions.lt("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(date)));
detachedCriteria.setProjection(Projections.projectionList()
.add(Projections.alias(Projections.groupProperty("station.id"), "stationId"))
.add(Projections.sqlProjection("group_concat(hex({alias}.dinas_type_id)) as dinasTypeIds ", new String[]{"dinasTypeIds"}, new Type[]{StandardBasicTypes.NSTRING}))
);
detachedCriteria.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
return (List<UUID>) template.findByCriteria(detachedCriteria);
}
/** /**
...@@ -304,14 +309,18 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -304,14 +309,18 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
* @param date * @param date
* @return * @return
*/ */
private List<UUID> getNoOverPrice(Date date) { private List<UUID> getNoOverPriceDetail(Date date) {
List<UUID> toStartStation = getToStartStation(date); List<UUID> toStartStation = getToStartStation(date);
if(CollectionUtils.isEmpty(toStartStation)){
return null;
}
KClass bean = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.DETAIL_ENTITY, KClass.class); KClass bean = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.DETAIL_ENTITY, KClass.class);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName()); DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
detachedCriteria.createAlias("master", "master"); detachedCriteria.createAlias("master", "master");
detachedCriteria.createAlias("master.station", "station"); detachedCriteria.createAlias("master.station", "station");
detachedCriteria.add(Restrictions.eq("master." + BaseConstants.DEL, false)) detachedCriteria.add(Restrictions.eq("master." + BaseConstants.DEL, false))
.add(Restrictions.in("master.applyStatus", BizProcessState.DONE_WITH_AGREE.getValue())) .add(Restrictions.in("master.applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
.add(Restrictions.ne("master.adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue()))
.add(Restrictions.isNull("adjustmentEndDate")) .add(Restrictions.isNull("adjustmentEndDate"))
.add(Restrictions.lt("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date))) .add(Restrictions.lt("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date)))
.add(Restrictions.in("station.id",toStartStation )) .add(Restrictions.in("station.id",toStartStation ))
...@@ -326,57 +335,20 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju ...@@ -326,57 +335,20 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
* @return * @return
*/ */
private List<UUID> getToStartStation(Date date){ private List<UUID> getToStartStation(Date date){
KClass bean = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.ENTITY, KClass.class); DetachedCriteria detachedCriteria = getDetachedCriteria(date);
DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(bean.getName());
//审批通过 未删除 未生效
detachedCriteria.add(Restrictions.eq( BaseConstants.DEL, false))
.add(Restrictions.in("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
.add(Restrictions.in("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date)))
.add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(date)))
.add(Restrictions.lt("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.NOT_STARTED.getValue()));
detachedCriteria.setProjection(Projections.projectionList().add(Projections.property("id"))); detachedCriteria.setProjection(Projections.projectionList().add(Projections.property("id")));
return (List<UUID>)template.findByCriteria(detachedCriteria); return (List<UUID>)template.findByCriteria(detachedCriteria);
} }
/**
* 获取今天重复审批的数据,除了最后一条提交的(不是审批) 其它的记录返回,并将该记录做失效的操作
*
* @param date
* @return
*/
private List<UUID> getLastPrice(Date date) {
DetachedCriteria adjustmentDetachedCriteria = getDetachedCriteria(date);
List<KObject> byCriteria = (List<KObject>) template.findByCriteria(adjustmentDetachedCriteria);
int i = 0;
List<UUID> objects = new ArrayList<>();
for (KObject byCriterion : byCriteria) {
if (0 == i++) {
continue;
}
KObject dinasTypeDetail = byCriterion.get("dinasTypeDetail");
if (dinasTypeDetail == null) {
continue;
}
KObject[] kObjects = dinasTypeDetail.toArray();
for (KObject kObject : kObjects) {
objects.add(kObject.getUuid("id"));
}
byCriterion.set("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue());
template.update(byCriterion);
}
return objects;
}
private DetachedCriteria getDetachedCriteria(Date date) { private DetachedCriteria getDetachedCriteria(Date date) {
KClass adjustment = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.ENTITY, KClass.class); KClass adjustment = Amino.getStaticMetadataContext().getBean(PriceAdjustmentConstant.ENTITY, KClass.class);
DetachedCriteria adjustmentDetachedCriteria = DetachedCriteria.forEntityName(adjustment.getName()); DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(adjustment.getName());
adjustmentDetachedCriteria.add(Restrictions.eq("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue())); detachedCriteria.add(Restrictions.eq("applyStatus", BizProcessState.DONE_WITH_AGREE.getValue()))
adjustmentDetachedCriteria.add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date))); .add(Restrictions.ge("adjustmentDate", DateTimeUtils.getStartDateTimeOfDay(date)))
adjustmentDetachedCriteria.add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(date))); .add(Restrictions.le("adjustmentDate", DateTimeUtils.getEndDateTimeOfDay(date)))
adjustmentDetachedCriteria.addOrder(Order.desc("createTime")); .add(Restrictions.eq("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.NOT_STARTED.getValue()));
return adjustmentDetachedCriteria; return detachedCriteria;
} }
......
...@@ -8,6 +8,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentEchartReturnEntity; ...@@ -8,6 +8,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentEchartReturnEntity;
import com.xyst.dinas.price.entity.PriceAdjustmentEchartSearchEntity; import com.xyst.dinas.price.entity.PriceAdjustmentEchartSearchEntity;
import com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity; import com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity;
import com.xyst.dinas.price.entity.StationDinasTypePriceDetail; import com.xyst.dinas.price.entity.StationDinasTypePriceDetail;
import com.xyst.dinas.price.enumeration.PriceAdjustmentAdjustmentStatusEnum;
import com.xyst.dinas.price.service.PriceAdjustmentService; import com.xyst.dinas.price.service.PriceAdjustmentService;
import com.xyst.dinas.price.service.RegionalCompanyPriceAuthorityService; import com.xyst.dinas.price.service.RegionalCompanyPriceAuthorityService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -139,8 +140,9 @@ public class PriceAdjustmentServiceImpl implements PriceAdjustmentService { ...@@ -139,8 +140,9 @@ public class PriceAdjustmentServiceImpl implements PriceAdjustmentService {
return; return;
} }
for (KObject kObject : kObjects) { for (KObject kObject : kObjects) {
kObject.set("applyStatus", BizProcessState.DONE_WITH_REJECT.getValue()); // kObject.set("applyStatus", BizProcessState.DONE_WITH_REJECT.getValue());
kObject.set("failureReason", "本条数据所属生效日已有新记录审批通过,本条系统自动驳回"); kObject.set("adjustmentStatus", PriceAdjustmentAdjustmentStatusEnum.ABOLITION.getValue());
// kObject.set("failureReason", "本条数据所属生效日已有新记录审批通过,本条系统自动废弃");
priceAdjustmentDao.modify(kObject); priceAdjustmentDao.modify(kObject);
} }
......
...@@ -16,6 +16,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity; ...@@ -16,6 +16,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity;
import com.xyst.dinas.price.service.PriceAdjustmentService; import com.xyst.dinas.price.service.PriceAdjustmentService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -215,13 +216,29 @@ public class PriceAdjustmentController { ...@@ -215,13 +216,29 @@ public class PriceAdjustmentController {
*/ */
@GetMapping("getSameMessage") @GetMapping("getSameMessage")
public ResponseObj getSameAdjustmentDateAndLtCreateDateInfo(Date adjustmentDate, Date createTime, UUID stationId){ public ResponseObj getSameAdjustmentDateAndLtCreateDateInfo(@DateTimeFormat(pattern = "yyyy-MM-dd")@RequestParam("adjustmentDate") Date adjustmentDate, @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @RequestParam("createTime") Date createTime, @DateTimeFormat(pattern = "yyyy-MM-dd")@RequestParam("stationId") UUID stationId){
List<KObject> sameAdjustmentDateAndLtCreateDateInfo = priceAdjustmentService.getSameAdjustmentDateAndLtCreateDateInfo(adjustmentDate, createTime, stationId); List<KObject> sameAdjustmentDateAndLtCreateDateInfo = priceAdjustmentService.getSameAdjustmentDateAndLtCreateDateInfo(adjustmentDate, createTime, stationId);
if(CollectionUtils.isEmpty(sameAdjustmentDateAndLtCreateDateInfo)){ if(CollectionUtils.isEmpty(sameAdjustmentDateAndLtCreateDateInfo)){
String formart1DateString = DateTimeUtils.getFormart1DateString(adjustmentDate); String formart1DateString = DateTimeUtils.getFormart1DateString(adjustmentDate);
String message = "检查到该场站生效日期为["+formart1DateString+"]下有"+sameAdjustmentDateAndLtCreateDateInfo.size()+"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为驳回"; String message = "检查到该场站生效日期为["+formart1DateString+"]下有"+sameAdjustmentDateAndLtCreateDateInfo.size()+"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效";
return ResponseObj.success(message, sameAdjustmentDateAndLtCreateDateInfo); return ResponseObj.error(message, sameAdjustmentDateAndLtCreateDateInfo);
}
return ResponseObj.success();
}
/**
* 数据相同时候的提示
* @return
*/
@GetMapping("getSameMessageById")
public ResponseObj getSameById(@RequestParam("id") UUID id){
KObject byId = priceAdjustmentService.getById(id);
List<KObject> sameAdjustmentDateAndLtCreateDateInfo = priceAdjustmentService.getSameAdjustmentDateAndLtCreateDateInfo(byId.getDate("adjustmentDate"),byId.getDate("createTime") , byId.get("station").getUuid("Id"));
if(CollectionUtils.isEmpty(sameAdjustmentDateAndLtCreateDateInfo)){
String formart1DateString = DateTimeUtils.getFormart1DateString(byId.getDate("adjustmentDate"));
String message = "检查到该场站生效日期为["+formart1DateString+"]下有"+sameAdjustmentDateAndLtCreateDateInfo.size()+"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效";
return ResponseObj.error(message, sameAdjustmentDateAndLtCreateDateInfo);
} }
return ResponseObj.success(); return ResponseObj.success();
} }
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<m:id>862d0182-3296-4481-a1d9-6b0c6fe91aa4</m:id> <m:id>862d0182-3296-4481-a1d9-6b0c6fe91aa4</m:id>
<m:name>dinasTypeDetails</m:name> <m:name>dinasTypeDetails</m:name>
<m:title>包含砂石种类和砂石价格子表</m:title> <m:title>包含砂石种类和砂石价格子表</m:title>
<m:type>com.xyst.dinas.price.datamodel.PriceAdjustment$DinasTypeDetails[]</m:type> <m:type>com.xyst.dinas.price.datamodel.PriceAdjustmentAssociatedDinasTypeDetails[]</m:type>
<m:description></m:description> <m:description></m:description>
<m:default></m:default> <m:default></m:default>
</m:attribute> </m:attribute>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification> <specification>1.0</specification>
<id>cf735008-b2cc-40e3-b2db-843d19b873d1</id> <id>cf735008-b2cc-40e3-b2db-843d19b873d1</id>
<name>com.xyst.dinas.price.datamodel.PriceAdjustment$DinasTypeDetails</name> <name>com.xyst.dinas.price.datamodel.PriceAdjustmentAssociatedDinasTypeDetails</name>
<title>调价申请子表</title> <title>调价申请子表</title>
<description>调价申请采砂类型和砂石价格子表</description> <description>调价申请采砂类型和砂石价格子表</description>
<define>bcp.type.Class</define> <define>bcp.type.Class</define>
......
...@@ -106,10 +106,10 @@ ...@@ -106,10 +106,10 @@
</property> </property>
<bag name="dinasTypeDetails" lazy="true" fetch="select" inverse="true"> <bag name="dinasTypeDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.price.datamodel.PriceAdjustment$DinasTypeDetails" /> <one-to-many entity-name="com.xyst.dinas.price.datamodel.PriceAdjustmentAssociatedDinasTypeDetails" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.price.datamodel.PriceAdjustment$DinasTypeDetails" table="xyst_dinas_price_adjustment_dinas_type_detail" > <class entity-name="com.xyst.dinas.price.datamodel.PriceAdjustmentAssociatedDinasTypeDetails" table="xyst_dinas_price_adjustment_dinas_type_detail" >
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer" /> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer" />
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -10,6 +10,6 @@ public interface ProductionPlanReportConstant { ...@@ -10,6 +10,6 @@ public interface ProductionPlanReportConstant {
/** /**
* 子项目的实体名 * 子项目的实体名
*/ */
String DETAIL_ENTITY = "com.xyst.dinas.production.datamodel.ProductionPlanReport$DinasTypeDetails"; String DETAIL_ENTITY = "com.xyst.dinas.production.datamodel.ProductionPlanReportAssociatedDinasTypeDetails";
} }
...@@ -9,6 +9,6 @@ public interface SandMiningConstant { ...@@ -9,6 +9,6 @@ public interface SandMiningConstant {
/** /**
* 实体名 * 实体名
*/ */
String STATION_DETAIL_ENTITY = "com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail"; String STATION_DETAIL_ENTITY = "com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail";
} }
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<m:id>862d0182-3296-4481-a1d9-6b0c6fe91aa4</m:id> <m:id>862d0182-3296-4481-a1d9-6b0c6fe91aa4</m:id>
<m:name>dinasTypeDetails</m:name> <m:name>dinasTypeDetails</m:name>
<m:title>包含砂石种类和砂石量子表</m:title> <m:title>包含砂石种类和砂石量子表</m:title>
<m:type>com.xyst.dinas.production.datamodel.ProductionPlanReport$DinasTypeDetails[]</m:type> <m:type>com.xyst.dinas.production.datamodel.ProductionPlanReportAssociatedDinasTypeDetails[]</m:type>
<m:description></m:description> <m:description></m:description>
<m:default></m:default> <m:default></m:default>
</m:attribute> </m:attribute>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification> <specification>1.0</specification>
<id>224beb45-2976-49d7-b408-6fd3c208494e</id> <id>224beb45-2976-49d7-b408-6fd3c208494e</id>
<name>com.xyst.dinas.production.datamodel.ProductionPlanReport$DinasTypeDetails</name> <name>com.xyst.dinas.production.datamodel.ProductionPlanReportAssociatedDinasTypeDetails</name>
<title>生产计划子表</title> <title>生产计划子表</title>
<description>生产计划采砂类型和砂石量子表</description> <description>生产计划采砂类型和砂石量子表</description>
<define>bcp.type.Class</define> <define>bcp.type.Class</define>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<dependency>com.xyst.dinas.biz.datamodel.Station</dependency> <dependency>com.xyst.dinas.biz.datamodel.Station</dependency>
<dependency>com.xyst.dinas.biz.datamodel.ShipInfo</dependency> <dependency>com.xyst.dinas.biz.datamodel.ShipInfo</dependency>
<dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency> <dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency>
<dependency>com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail</dependency> <dependency>com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail</dependency>
<content> <content>
<m:class> <m:class>
<m:parents> <m:parents>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<m:id>923fc243-b92b-45d5-8876-a8cad89b5ac5</m:id> <m:id>923fc243-b92b-45d5-8876-a8cad89b5ac5</m:id>
<m:name>stationDetails</m:name> <m:name>stationDetails</m:name>
<m:title>包含场站子表</m:title> <m:title>包含场站子表</m:title>
<m:type>com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail[]</m:type> <m:type>com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail[]</m:type>
<m:description></m:description> <m:description></m:description>
<m:default></m:default> <m:default></m:default>
</m:attribute> </m:attribute>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-type">
<specification>1.0</specification> <specification>1.0</specification>
<id>5eb36512-4772-4397-a40e-1d257f005278</id> <id>5eb36512-4772-4397-a40e-1d257f005278</id>
<name>com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail</name> <name>com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail</name>
<title>采砂许可证场站表</title> <title>采砂许可证场站表</title>
<define>bcp.type.Class</define> <define>bcp.type.Class</define>
<define-version>1.0</define-version> <define-version>1.0</define-version>
......
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
</property> </property>
<bag name="dinasTypeDetails" lazy="true" fetch="select" inverse="true"> <bag name="dinasTypeDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.production.datamodel.ProductionPlanReport$DinasTypeDetails" /> <one-to-many entity-name="com.xyst.dinas.production.datamodel.ProductionPlanReportAssociatedDinasTypeDetails" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.production.datamodel.ProductionPlanReport$DinasTypeDetails" table="xyst_dinas_production_plan_report_dinas_type_detail" > <class entity-name="com.xyst.dinas.production.datamodel.ProductionPlanReportAssociatedDinasTypeDetails" table="xyst_dinas_production_plan_report_dinas_type_detail" >
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer" /> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer" />
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<bag name="stationDetails" lazy="true" fetch="select" inverse="true"> <bag name="stationDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail" /> <one-to-many entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail" />
</bag> </bag>
<property name="sandMiningRange" type="nstring" not-null="false"> <property name="sandMiningRange" type="nstring" not-null="false">
<column name="sand_mining_range" length="3000" > <column name="sand_mining_range" length="3000" >
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</property> </property>
</class> </class>
<class entity-name="com.xyst.dinas.production.datamodel.SandMining$SandMiningStationDetail" table="xyst_dinas_production_sand_mining_station_detail"> <class entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail" table="xyst_dinas_production_sand_mining_station_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -7,7 +7,7 @@ public interface ProjectFiledConstant { ...@@ -7,7 +7,7 @@ public interface ProjectFiledConstant {
*/ */
String PROJECTFILED_NTITY = "com.xyst.dinas.project.datamodel.ProjectFiled"; String PROJECTFILED_NTITY = "com.xyst.dinas.project.datamodel.ProjectFiled";
String PROJECTFILED_DINASTYPE_ENTITY = "com.xyst.dinas.project.datamodel.ProjectFiled$ProjectFiledDinasDetail"; String PROJECTFILED_DINASTYPE_ENTITY = "com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail";
/** 项目名称*/ /** 项目名称*/
String PROJECT_NAME = "projectName"; String PROJECT_NAME = "projectName";
......
...@@ -71,14 +71,14 @@ ...@@ -71,14 +71,14 @@
</property> </property>
<bag name="ProjectFiledDinasDetails" lazy="true" fetch="select" inverse="true"> <bag name="ProjectFiledDinasDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiled$ProjectFiledDinasDetail" /> <one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail" />
</bag> </bag>
<bag name="ProjectSubContractorDetails" lazy="true" fetch="select" inverse="true"> <bag name="ProjectSubContractorDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiled$ProjectSubContractorDetail" /> <one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectSubContractorDetail" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.project.datamodel.ProjectFiled$ProjectFiledDinasDetail" table="xyst_dinas_project_filed_dinas_detail"> <class entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail" table="xyst_dinas_project_filed_dinas_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<column name="master_id" not-null="false"/> <column name="master_id" not-null="false"/>
</many-to-one> </many-to-one>
</class> </class>
<class entity-name="com.xyst.dinas.project.datamodel.ProjectFiled$ProjectSubContractorDetail" table="xyst_dinas_project_sub_contractor_detail"> <class entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectSubContractorDetail" table="xyst_dinas_project_sub_contractor_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -5,7 +5,7 @@ public class SalesPlanConstant { ...@@ -5,7 +5,7 @@ public class SalesPlanConstant {
/** 销售计划主表-实体*/ /** 销售计划主表-实体*/
public static final String ENTITY = "com.xyst.dinas.sales.datamodel.SalesPlan"; public static final String ENTITY = "com.xyst.dinas.sales.datamodel.SalesPlan";
/** 销售计划子表-实体*/ /** 销售计划子表-实体*/
public static final String ENTITY_DETAIL = "com.xyst.dinas.sales.datamodel.SalesPlan$SalesPlanDetail"; public static final String ENTITY_DETAIL = "com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail";
/** 销售计划子表-名称*/ /** 销售计划子表-名称*/
public static final String SalesPlanDetails = "SalesPlanDetails"; public static final String SalesPlanDetails = "SalesPlanDetails";
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
"title" : "详情", "title" : "详情",
"action" : "openDetail", "action" : "openDetail",
"param" : { "param" : {
"detailModelName" : "com.xyst.dinas.sales.datamodel.NeedPlan$NeedPlanDetail", "detailModelName" : "com.xyst.dinas.sales.datamodel.NeedPlanAssociatedNeedPlanDetail",
"columnList":[ "columnList":[
{ {
"key":"dinasType.dinasTypeName", "key":"dinasType.dinasTypeName",
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
"title" : "详情", "title" : "详情",
"action" : "openDetail", "action" : "openDetail",
"param" : { "param" : {
"detailModelName" : "com.xyst.dinas.sales.datamodel.SalesPlan$SalesPlanDetail", "detailModelName" : "com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail",
"columnList":[ "columnList":[
{ {
"key":"dinasType.dinasTypeName", "key":"dinasType.dinasTypeName",
......
...@@ -77,10 +77,10 @@ ...@@ -77,10 +77,10 @@
</property> </property>
<bag name="NeedPlanDetails" lazy="true" fetch="select" inverse="true"> <bag name="NeedPlanDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.sales.datamodel.NeedPlan$NeedPlanDetail" /> <one-to-many entity-name="com.xyst.dinas.sales.datamodel.NeedPlanAssociatedNeedPlanDetail" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.sales.datamodel.NeedPlan$NeedPlanDetail" table="xyst_dinas_sales_need_plan_detail"> <class entity-name="com.xyst.dinas.sales.datamodel.NeedPlanAssociatedNeedPlanDetail" table="xyst_dinas_sales_need_plan_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="assigned" /> <generator class="assigned" />
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
<bag name="SalesPlanDetails" lazy="true" fetch="select" inverse="true"> <bag name="SalesPlanDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.sales.datamodel.SalesPlan$SalesPlanDetail" /> <one-to-many entity-name="com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.sales.datamodel.SalesPlan$SalesPlanDetail" table="xyst_dinas_sale_plan_detail"> <class entity-name="com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail" table="xyst_dinas_sale_plan_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="uuid2" /> <generator class="uuid2" />
......
...@@ -74,10 +74,10 @@ ...@@ -74,10 +74,10 @@
<bag name="SalesPlanTempDetails" lazy="true" fetch="select" inverse="true"> <bag name="SalesPlanTempDetails" lazy="true" fetch="select" inverse="true">
<key column="master_id" not-null="true" /> <key column="master_id" not-null="true" />
<one-to-many entity-name="com.xyst.dinas.sales.datamodel.SalesPlanTemp$SalesPlanTempDetail" /> <one-to-many entity-name="com.xyst.dinas.sales.datamodel.SalesPlanTempAssociatedSalesPlanTempDetail" />
</bag> </bag>
</class> </class>
<class entity-name="com.xyst.dinas.sales.datamodel.SalesPlanTemp$SalesPlanTempDetail" table="xyst_dinas_sale_plan_temp_detail"> <class entity-name="com.xyst.dinas.sales.datamodel.SalesPlanTempAssociatedSalesPlanTempDetail" table="xyst_dinas_sale_plan_temp_detail">
<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/> <tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
<id name="id" type="uuid-binary" column="id" length="16"> <id name="id" type="uuid-binary" column="id" length="16">
<generator class="uuid2" /> <generator class="uuid2" />
......
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