Commit dc907b22 by yanHeng

Merge branch 'feature/exception_data' into feature/sandMing_Area_update

parents 73fa4c88 b71ed7e4
......@@ -9,6 +9,7 @@ import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.inz.common.exception.BusinessException;
import com.xyst.dinas.biz.dao.DinasTypeDao;
import com.xyst.dinas.biz.dao.SandMiningAreaDao;
import com.xyst.dinas.biz.dao.ShipInfoDao;
import com.xyst.dinas.contract.internal.dao.ContractDao;
import com.xyst.dinas.contract.service.ContractService;
......@@ -53,6 +54,9 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
private ShipInfoDao shipInfoDao;
@Autowired
private SandMiningAreaDao sandMiningAreaDao;
@Autowired
private LogService logService;
/**
......@@ -71,11 +75,13 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
UUID purchaseSandUnitId = kObject.get("purchaseSandUnit").getUuid("id");
UUID contractId = kObject.get("contract").getUuid("id");
UUID dinasTypeId = kObject.get("dinasType").getUuid("id");
UUID sandMiningAreaId = kObject.get("sandMiningArea").getUuid("id");
KObject contract = contractDao.load(contractId);
kObject.set("contract", contract);
kObject.set("project", projectFiledDao.load(projectId));
kObject.set("purchaseSandUnit", purchaseSandCompanyDao.load(purchaseSandUnitId));
kObject.set("dinasType", dinasTypeDao.load(dinasTypeId));
kObject.set("sandMiningArea", sandMiningAreaDao.load(sandMiningAreaId));
UUID uuid = shipQuantityDao.create(kObject);
//记录操作日志
......
......@@ -59,6 +59,10 @@ public class ShipQuantityController {
return ResponseObj.error(400, "运砂船不能为空");
}
if (null == kobject.get("sandMiningArea").getUuid("id")) {
return ResponseObj.error(400, "所属采区不能为空");
}
if (null == kobject.get("dealTime")) {
return ResponseObj.error(400, "销售时间不能为空");
}
......
......@@ -36,6 +36,10 @@
<attribute id='ede9a1dc-8cec-4978-96aa-602873d48f09' name='transportShipName' columnName='transport_ship_Name' title='运砂船' type='string' default='' precision='' isArray='false'>
<annotation id='42b07dc1-1859-4522-97ab-a821eda11c0f' attributeId='6cebbeb2-2f53-4b2d-beea-451ceb076044' name='length' value='50'/>
</attribute>
<attribute id='966c39b5-8bc0-4ca9-a151-373b02a4eed3' name='sandMiningArea' columnName='sand_mining_area_id' title='所属采区' type='com.xyst.dinas.biz.datamodel.SandMiningArea' default='' precision='' isArray='false'>
<annotation id='5fd9ba55-db5c-4bb6-b292-e18277e6c54e' attributeId='616b9c07-9791-435e-bfd3-989066a546eb' name='length' value='undefined'></annotation>
<annotation id='f6b6964d-bd09-4767-b380-40c4d93e8f87' attributeId='7837cb05-0429-4a74-bd4f-38a061ca5dfb' name='mappingType' value='many-to-one'></annotation>
</attribute>
<attribute id='d18c33cf-39bf-4220-bff7-5428a68a5142' name='dinasType' columnName='dinas_type_id' title='砂石类型' type='com.xyst.dinas.biz.datamodel.DinasType' default='' precision='' isArray='false'>
<annotation id='7c09730e-4da9-45c6-9cbb-b37c22b88bbe' attributeId='90ab8c99-6c83-4a68-9e0f-e6bb303566af' name='length' value='undefined'></annotation>
<annotation id='12fbe06c-0562-4d5c-9ec1-23631daaaf54' attributeId='491dbd7e-00b3-4c12-b924-17ae623bbfdf' name='mappingType' value='many-to-one'></annotation>
......
......@@ -117,6 +117,24 @@
<type>string</type>
<description></description>
</field>
<field title='所属采区唯一主键编码'>
<name>sandMiningArea.id</name>
<description>采砂区域</description>
<type>uuid</type>
<ref>
<name>com.xyst.dinas.biz.datamodel.SandMiningArea</name>
<type></type>
</ref>
</field>
<field title='所属采区名称'>
<name>sandMiningArea.sandMiningAreaName</name>
<description>所属采区名称</description>
<type>string</type>
<ref>
<name>com.xyst.dinas.biz.datamodel.SandMiningArea</name>
<type></type>
</ref>
</field>
<field title='砂石种类id'>
<name>dinasType.id</name>
<type>uuid</type>
......
......@@ -20,6 +20,7 @@
<dependency>com.xyst.dinas.project.datamodel.PurchaseSandCompany</dependency>
<dependency>javax.persistence.Column</dependency>
<dependency>javax.persistence.Table</dependency>
<dependency>com.xyst.dinas.biz.datamodel.SandMiningArea</dependency>
<dependency>com.beecode.bap.biztrait.datamodel.BasicBillRequirement</dependency>
<dependency>com.xyst.dinas.project.datamodel.ProjectFiled</dependency>
<content>
......@@ -180,6 +181,32 @@
<m:properties>
<m:property>
<m:key>name</m:key>
<m:value>sand_mining_area_id</m:value>
</m:property>
<m:property>
<m:key>referencedColumnName</m:key>
<m:value>ID</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>966c39b5-8bc0-4ca9-a151-373b02a4eed3</m:id>
<m:name>sandMiningArea</m:name>
<m:title>所属采区</m:title>
<m:type>com.xyst.dinas.biz.datamodel.SandMiningArea</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>javax.persistence.ManyToOne</m:type>
</m:annotation>
<m:annotation>
<m:type>javax.persistence.JoinColumn</m:type>
<m:properties>
<m:property>
<m:key>name</m:key>
<m:value>dinas_type_id</m:value>
</m:property>
<m:property>
......
......@@ -147,6 +147,26 @@
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>sandMiningArea.id</m:name>
<m:title>所属采区唯一主键编码</m:title>
<m:type>uuid</m:type>
<m:ref>
<m:name>com.xyst.dinas.biz.datamodel.SandMiningArea</m:name>
<m:type></m:type>
</m:ref>
<m:desc>采砂区域</m:desc>
</m:field>
<m:field>
<m:name>sandMiningArea.sandMiningAreaName</m:name>
<m:title>所属采区名称</m:title>
<m:type>string</m:type>
<m:ref>
<m:name>com.xyst.dinas.biz.datamodel.SandMiningArea</m:name>
<m:type></m:type>
</m:ref>
<m:desc>所属采区名称</m:desc>
</m:field>
<m:field>
<m:name>dinasType.id</m:name>
<m:title>砂石种类id</m:title>
<m:type>uuid</m:type>
......
......@@ -66,6 +66,11 @@
<comment>运砂船</comment>
</column>
</property>
<many-to-one name="sandMiningArea" entity-name="com.xyst.dinas.biz.datamodel.SandMiningArea" fetch="select">
<column name="sand_mining_area_id" not-null="false">
<comment>所属采区</comment>
</column>
</many-to-one>
<many-to-one name="dinasType" entity-name="com.xyst.dinas.biz.datamodel.DinasType" fetch="select">
<column name="dinas_type_id" not-null="false">
<comment>砂石类型</comment>
......
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