Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/xujie/sys/modules/quote/entity/QuotationInformationEntity.java
java8
yuejiayang 1 year ago
parent
commit
5546afda1b
  1. 8
      src/main/java/com/xujie/sys/modules/quote/entity/QuotationInformationEntity.java
  2. 10
      src/main/java/com/xujie/sys/modules/quote/service/impl/QuoteServiceImpl.java
  3. 7
      src/main/resources/mapper/quote/QuoteMapper.xml

8
src/main/java/com/xujie/sys/modules/quote/entity/QuotationInformationEntity.java

@ -127,8 +127,8 @@ public class QuotationInformationEntity extends QueryPage implements Serializabl
* 创建时间
**/
@TableField(fill = FieldFill.INSERT)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createDate;
/**
* 创建人
@ -138,8 +138,8 @@ public class QuotationInformationEntity extends QueryPage implements Serializabl
* 更新时间
**/
@TableField(fill = FieldFill.UPDATE,insertStrategy = FieldStrategy.NEVER)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date updateDate;
/**
* 更新人

10
src/main/java/com/xujie/sys/modules/quote/service/impl/QuoteServiceImpl.java

@ -79,9 +79,17 @@ public class QuoteServiceImpl extends ServiceImpl<QuoteMapper, Quote> implements
checkCustomerAndProject(quote);
// 4校验人员
checkUser(quote);
// 5校验货币
checkCurrency(quote);
save(quote);
}
private void checkCurrency(Quote quote) {
// if (StringUtils.isEmpty(quote.getCurrency())){
// throw new RuntimeException("币种不能为空");
// }
}
private void checkUser(Quote quote){
RoleUser quoter = new RoleUser();
quoter.setBuId(quote.getBuId());
@ -132,6 +140,8 @@ public class QuoteServiceImpl extends ServiceImpl<QuoteMapper, Quote> implements
checkCustomerAndProject(quote);
// 校验人员
checkUser(quote);
// 校验货币
checkCurrency(quote);
quote.setUpdateDate(new Date());
updateById(quote);
}

7
src/main/resources/mapper/quote/QuoteMapper.xml

@ -46,6 +46,9 @@
<if test="params.quoteNo != null and params.quoteNo != ''">
and q.quote_no = #{params.quoteNo}
</if>
<if test="params.quoteVersionNo != null and params.quoteVersionNo != ''">
and q.quote_version_no = #{params.quoteVersionNo}
</if>
<if test="params.buNo != null and params.buNo != ''">
and q.bu_no = #{params.buNo}
</if>
@ -68,10 +71,10 @@
and p.project_desc like #{params.projectDesc}
</if>
<if test="params.purchase != null and params.purchase != ''">
and q.purchase like #{params.purchase}
and dbo.plm_get_user_display(q.site,q.purchase) like #{params.purchase}
</if>
<if test="params.quoter != null and params.quoter != ''">
and q.quoter like #{params.quoter}
and dbo.plm_get_user_display(q.site,q.quoter) like #{params.quoter}
</if>
<if test="params.customerInquiryNo != null and params.customerInquiryNo != ''">
and q.customer_inquiry_no like #{params.customerInquiryNo}

Loading…
Cancel
Save