Commit 24872bd3 by yinyong

数据中心--管理成本物流费用更新

parent 795cecca
......@@ -5,6 +5,7 @@ import com.bailuntec.domain.LogisticsInfo;
import com.bailuntec.domain.constant.CommonConstant;
import com.bailuntec.domain.entity.DcBaseFinanceLogistics;
import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseFinanceLogisticsExample;
import com.bailuntec.mapper.DcBaseFinanceLogisticsMapper;
import com.bailuntec.support.PointJob;
import com.bailuntec.utils.OkHttpUtil;
......@@ -58,7 +59,15 @@ public class LogisticsJob extends PointJob {
for(DcBaseFinanceLogistics dcBaseFinanceLogistics : logisticsList) {
try {
DcBaseFinanceLogisticsMapper dcBaseFinanceLogisticsMapper = SessionUtil.getSession().getMapper(DcBaseFinanceLogisticsMapper.class);
dcBaseFinanceLogisticsMapper.upsertSelective(dcBaseFinanceLogistics);
dcBaseFinanceLogistics.setGmtModified(LocalDateTime.now());
int result = dcBaseFinanceLogisticsMapper.updateByExampleSelective(dcBaseFinanceLogistics, DcBaseFinanceLogisticsExample.newAndCreateCriteria()
.andNoEqualTo(dcBaseFinanceLogistics.getNo())
.andCostId1EqualTo(dcBaseFinanceLogistics.getCostId1())
.andCostIdEqualTo(dcBaseFinanceLogistics.getCostId())
.example());
if(result == 0) {
dcBaseFinanceLogisticsMapper.insertSelective(dcBaseFinanceLogistics);
}
} catch (Exception e) {
throw new RuntimeException("MyBatis 操作失败!");
}finally {
......
......@@ -163,6 +163,24 @@ public class DcBaseFinanceLogistics {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_finance_logistics.cost_id1
*
* @mbg.generated
*/
private Integer costId1;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_finance_logistics.cost_id
*
* @mbg.generated
*/
private Integer costId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_finance_logistics.gmt_create
*
* @mbg.generated
......@@ -207,6 +225,8 @@ public class DcBaseFinanceLogistics {
sb.append(", amount=").append(amount);
sb.append(", currency=").append(currency);
sb.append(", amountRmb=").append(amountRmb);
sb.append(", costId1=").append(costId1);
sb.append(", costId=").append(costId);
sb.append(", gmtCreate=").append(gmtCreate);
sb.append(", gmtModified=").append(gmtModified);
sb.append("]");
......@@ -248,6 +268,8 @@ public class DcBaseFinanceLogistics {
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
&& (this.getAmountRmb() == null ? other.getAmountRmb() == null : this.getAmountRmb().equals(other.getAmountRmb()))
&& (this.getCostId1() == null ? other.getCostId1() == null : this.getCostId1().equals(other.getCostId1()))
&& (this.getCostId() == null ? other.getCostId() == null : this.getCostId().equals(other.getCostId()))
&& (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
&& (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
}
......@@ -279,6 +301,8 @@ public class DcBaseFinanceLogistics {
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getAmountRmb() == null) ? 0 : getAmountRmb().hashCode());
result = prime * result + ((getCostId1() == null) ? 0 : getCostId1().hashCode());
result = prime * result + ((getCostId() == null) ? 0 : getCostId().hashCode());
result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
return result;
......
......@@ -1511,6 +1511,126 @@ public class DcBaseFinanceLogisticsExample {
return (Criteria) this;
}
public Criteria andCostId1IsNull() {
addCriterion("cost_id1 is null");
return (Criteria) this;
}
public Criteria andCostId1IsNotNull() {
addCriterion("cost_id1 is not null");
return (Criteria) this;
}
public Criteria andCostId1EqualTo(Integer value) {
addCriterion("cost_id1 =", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1NotEqualTo(Integer value) {
addCriterion("cost_id1 <>", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1GreaterThan(Integer value) {
addCriterion("cost_id1 >", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1GreaterThanOrEqualTo(Integer value) {
addCriterion("cost_id1 >=", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1LessThan(Integer value) {
addCriterion("cost_id1 <", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1LessThanOrEqualTo(Integer value) {
addCriterion("cost_id1 <=", value, "costId1");
return (Criteria) this;
}
public Criteria andCostId1In(List<Integer> values) {
addCriterion("cost_id1 in", values, "costId1");
return (Criteria) this;
}
public Criteria andCostId1NotIn(List<Integer> values) {
addCriterion("cost_id1 not in", values, "costId1");
return (Criteria) this;
}
public Criteria andCostId1Between(Integer value1, Integer value2) {
addCriterion("cost_id1 between", value1, value2, "costId1");
return (Criteria) this;
}
public Criteria andCostId1NotBetween(Integer value1, Integer value2) {
addCriterion("cost_id1 not between", value1, value2, "costId1");
return (Criteria) this;
}
public Criteria andCostIdIsNull() {
addCriterion("cost_id is null");
return (Criteria) this;
}
public Criteria andCostIdIsNotNull() {
addCriterion("cost_id is not null");
return (Criteria) this;
}
public Criteria andCostIdEqualTo(Integer value) {
addCriterion("cost_id =", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdNotEqualTo(Integer value) {
addCriterion("cost_id <>", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdGreaterThan(Integer value) {
addCriterion("cost_id >", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdGreaterThanOrEqualTo(Integer value) {
addCriterion("cost_id >=", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdLessThan(Integer value) {
addCriterion("cost_id <", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdLessThanOrEqualTo(Integer value) {
addCriterion("cost_id <=", value, "costId");
return (Criteria) this;
}
public Criteria andCostIdIn(List<Integer> values) {
addCriterion("cost_id in", values, "costId");
return (Criteria) this;
}
public Criteria andCostIdNotIn(List<Integer> values) {
addCriterion("cost_id not in", values, "costId");
return (Criteria) this;
}
public Criteria andCostIdBetween(Integer value1, Integer value2) {
addCriterion("cost_id between", value1, value2, "costId");
return (Criteria) this;
}
public Criteria andCostIdNotBetween(Integer value1, Integer value2) {
addCriterion("cost_id not between", value1, value2, "costId");
return (Criteria) this;
}
public Criteria andGmtCreateIsNull() {
addCriterion("gmt_create is null");
return (Criteria) this;
......
......@@ -23,6 +23,8 @@
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="amount_rmb" jdbcType="DECIMAL" property="amountRmb" />
<result column="cost_id1" jdbcType="INTEGER" property="costId1" />
<result column="cost_id" jdbcType="INTEGER" property="costId" />
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
</resultMap>
......@@ -99,7 +101,7 @@
-->
id, no, receive_unit, receive_bank, receive_card, receive_card_user, reason, pay_time,
manage_cost_type, department_name, company_value, company_name, fee_super_type, fee_sub_type,
amount, currency, amount_rmb, gmt_create, gmt_modified
amount, currency, amount_rmb, cost_id1, cost_id, gmt_create, gmt_modified
</sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceLogisticsExample" resultMap="BaseResultMap">
<!--
......@@ -165,15 +167,17 @@
reason, pay_time, manage_cost_type,
department_name, company_value, company_name,
fee_super_type, fee_sub_type, amount,
currency, amount_rmb, gmt_create,
gmt_modified)
currency, amount_rmb, cost_id1,
cost_id, gmt_create, gmt_modified
)
values (#{id,jdbcType=INTEGER}, #{no,jdbcType=VARCHAR}, #{receiveUnit,jdbcType=VARCHAR},
#{receiveBank,jdbcType=VARCHAR}, #{receiveCard,jdbcType=VARCHAR}, #{receiveCardUser,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{manageCostType,jdbcType=INTEGER},
#{departmentName,jdbcType=VARCHAR}, #{companyValue,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
#{feeSuperType,jdbcType=VARCHAR}, #{feeSubType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
#{currency,jdbcType=VARCHAR}, #{amountRmb,jdbcType=DECIMAL}, #{gmtCreate,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP})
#{currency,jdbcType=VARCHAR}, #{amountRmb,jdbcType=DECIMAL}, #{costId1,jdbcType=INTEGER},
#{costId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceLogistics">
<!--
......@@ -233,6 +237,12 @@
<if test="amountRmb != null">
amount_rmb,
</if>
<if test="costId1 != null">
cost_id1,
</if>
<if test="costId != null">
cost_id,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
......@@ -292,6 +302,12 @@
<if test="amountRmb != null">
#{amountRmb,jdbcType=DECIMAL},
</if>
<if test="costId1 != null">
#{costId1,jdbcType=INTEGER},
</if>
<if test="costId != null">
#{costId,jdbcType=INTEGER},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
......@@ -368,6 +384,12 @@
<if test="record.amountRmb != null">
amount_rmb = #{record.amountRmb,jdbcType=DECIMAL},
</if>
<if test="record.costId1 != null">
cost_id1 = #{record.costId1,jdbcType=INTEGER},
</if>
<if test="record.costId != null">
cost_id = #{record.costId,jdbcType=INTEGER},
</if>
<if test="record.gmtCreate != null">
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
</if>
......@@ -402,6 +424,8 @@
amount = #{record.amount,jdbcType=DECIMAL},
currency = #{record.currency,jdbcType=VARCHAR},
amount_rmb = #{record.amountRmb,jdbcType=DECIMAL},
cost_id1 = #{record.costId1,jdbcType=INTEGER},
cost_id = #{record.costId,jdbcType=INTEGER},
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP}
<if test="_parameter != null">
......@@ -463,6 +487,12 @@
<if test="amountRmb != null">
amount_rmb = #{amountRmb,jdbcType=DECIMAL},
</if>
<if test="costId1 != null">
cost_id1 = #{costId1,jdbcType=INTEGER},
</if>
<if test="costId != null">
cost_id = #{costId,jdbcType=INTEGER},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
......@@ -494,6 +524,8 @@
amount = #{amount,jdbcType=DECIMAL},
currency = #{currency,jdbcType=VARCHAR},
amount_rmb = #{amountRmb,jdbcType=DECIMAL},
cost_id1 = #{costId1,jdbcType=INTEGER},
cost_id = #{costId,jdbcType=INTEGER},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
......@@ -557,6 +589,12 @@
<if test="amountRmb != null">
amount_rmb,
</if>
<if test="costId1 != null">
cost_id1,
</if>
<if test="costId != null">
cost_id,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
......@@ -617,6 +655,12 @@
<if test="amountRmb != null">
#{amountRmb,jdbcType=DECIMAL},
</if>
<if test="costId1 != null">
#{costId1,jdbcType=INTEGER},
</if>
<if test="costId != null">
#{costId,jdbcType=INTEGER},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
......@@ -677,6 +721,12 @@
<if test="amountRmb != null">
amount_rmb = #{amountRmb,jdbcType=DECIMAL},
</if>
<if test="costId1 != null">
cost_id1 = #{costId1,jdbcType=INTEGER},
</if>
<if test="costId != null">
cost_id = #{costId,jdbcType=INTEGER},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
......@@ -694,15 +744,17 @@
insert into dc_base_finance_logistics
(id, no, receive_unit, receive_bank, receive_card, receive_card_user, reason, pay_time,
manage_cost_type, department_name, company_value, company_name, fee_super_type,
fee_sub_type, amount, currency, amount_rmb, gmt_create, gmt_modified)
fee_sub_type, amount, currency, amount_rmb, cost_id1, cost_id, gmt_create, gmt_modified
)
values
(#{id,jdbcType=INTEGER}, #{no,jdbcType=VARCHAR}, #{receiveUnit,jdbcType=VARCHAR},
#{receiveBank,jdbcType=VARCHAR}, #{receiveCard,jdbcType=VARCHAR}, #{receiveCardUser,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{manageCostType,jdbcType=INTEGER},
#{departmentName,jdbcType=VARCHAR}, #{companyValue,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
#{feeSuperType,jdbcType=VARCHAR}, #{feeSubType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
#{currency,jdbcType=VARCHAR}, #{amountRmb,jdbcType=DECIMAL}, #{gmtCreate,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP})
#{currency,jdbcType=VARCHAR}, #{amountRmb,jdbcType=DECIMAL}, #{costId1,jdbcType=INTEGER},
#{costId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
)
on duplicate key update
id = #{id,jdbcType=INTEGER},
no = #{no,jdbcType=VARCHAR},
......@@ -721,6 +773,8 @@
amount = #{amount,jdbcType=DECIMAL},
currency = #{currency,jdbcType=VARCHAR},
amount_rmb = #{amountRmb,jdbcType=DECIMAL},
cost_id1 = #{costId1,jdbcType=INTEGER},
cost_id = #{costId,jdbcType=INTEGER},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
</insert>
......
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