// import BaseService from "../baseService";
|
// import { BaseConsignor } from "../../entity/basicInfo/consignor/baseConsignor";
|
// import { Not } from "typeorm";
|
// import { BaseConsignorContract } from "../../entity/basicInfo/consignor/baseConsignorContract";
|
|
// /**
|
// * 货主信息
|
// */
|
// export default class ConsignorContractService extends BaseService {
|
// //#region 添加保存前事件
|
// /**
|
// * 添加保存前事件
|
// */
|
// public async onAddSaveBefore(t: BaseConsignorContract) {
|
// // let userInfo = await this.userInfo;
|
// this.info.result = true;
|
|
// t.contractDays = t.contractEndTime - t.contractStartTime;
|
|
// // //判断条码是否重复
|
// // let where = {
|
// // consignorName: t.consignorName,
|
// // userProduct_Id: userInfo.userProduct_Id,
|
// // consignor_Id: Not(0)
|
// // };
|
// // if (t.consignor_Id > 0) {
|
// // where.consignor_Id = Not(t.consignor_Id);
|
// // }
|
|
// // let count = await this.dbRead.count(BaseConsignor, where);
|
// // if (count) {
|
// // this.info.msg = "当前货主名字,【" + t.consignorName + "】已存在不允许重复添加,无法添加!";
|
// // this.info.result = false;
|
// // }
|
// // if (!t.consignor_Id) {
|
// // t.password = this.ctx.helper.md5EncodingSalt("000000");
|
// // }
|
|
// return this.info;
|
// }
|
// //#endregion
|
// }
|