Browse Source

费用申请

v1.0
15989082884@163.com 2 years ago
parent
commit
efbac7b78d
  1. 3
      src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java
  2. 9
      src/main/java/com/qs/serve/modules/tbs/entity/TbsCostApply.java
  3. 11
      src/main/resources/mapper/tbs/TbsCostApplyMapper.xml

3
src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java

@ -253,6 +253,9 @@ public class TbsCostApplyController {
TbsCostApply entity = CopierUtil.copy(param,new TbsCostApply());
//entity.setId(IdUtil.getSnowFlakeId());
BmsSupplier supplier = bmsSupplierService.getById(entity.getSupplierId());
if(StringUtils.hasText(supplier.getRegion2Last())){
}
boolean contract = entity.getContractFlag()!=null&&entity.getContractFlag().equals(1);
if(contract&&!supplier.getSupplierFlag().equals(1)){
return R.error("当前用户非供应商");

9
src/main/java/com/qs/serve/modules/tbs/entity/TbsCostApply.java

@ -55,6 +55,15 @@ public class TbsCostApply implements Serializable {
@TableField(condition = SqlCondition.LIKE)
private String supplierName;
@TableField(condition = SqlCondition.LIKE)
private String supplierBizRegionFirstName;
@TableField(condition = SqlCondition.LIKE)
private String supplierBizRegionSecondName;
@TableField(condition = SqlCondition.LIKE)
private String supplierBizRegionThirdName;
/** 状态:0=未发布;1=审批中;2=待执行;3=完成;4-被驳回;5-中止;6-作废;7-异动 @{link TbsCostApplyState} */
@NotNull(message = "状态不能为空")
private Integer chargeState;

11
src/main/resources/mapper/tbs/TbsCostApplyMapper.xml

@ -33,6 +33,11 @@
<result property="cancelFlag" column="cancel_flag"/>
<result property="changeExtendId" column="change_extend_id"/>
<result property="changeSourceId" column="change_source_id"/>
<result property="supplierBizRegionFirstName" column="supplier_biz_region_first_name"/>
<result property="supplierBizRegionSecondName" column="supplier_biz_region_second_name"/>
<result property="supplierBizRegionThirdName" column="supplier_biz_region_third_name"/>
</resultMap>
<sql id="tbsCostApplySql">
@ -42,6 +47,9 @@
tbs_cost_apply.`supplier_id`,
tbs_cost_apply.`supplier_code`,
tbs_cost_apply.`supplier_name`,
tbs_cost_apply.`supplier_biz_region_first_name`,
tbs_cost_apply.`supplier_biz_region_second_name`,
tbs_cost_apply.`supplier_biz_region_third_name`,
tbs_cost_apply.`charge_state`,
tbs_cost_apply.`submit_time`,
tbs_cost_apply.`pass_time`,
@ -140,6 +148,9 @@
<if test="query.supplierId != null"> and `tbs_cost_apply`.`supplier_id` = #{query.supplierId}</if>
<if test="query.supplierCode != null and query.supplierCode != ''"> and `tbs_cost_apply`.`supplier_code` like concat('%', #{query.supplierCode},'%') </if>
<if test="query.supplierName != null and query.supplierName != ''"> and `tbs_cost_apply`.`supplier_name` like concat('%', #{query.supplierName},'%') </if>
<if test="query.supplierBizRegionFirstName != null and query.supplierBizRegionFirstName != ''"> and `tbs_cost_apply`.`supplier_biz_region_first_name` like concat('%', #{query.supplierBizRegionFirstName},'%') </if>
<if test="query.supplierBizRegionSecondName != null and query.supplierBizRegionSecondName != ''"> and `tbs_cost_apply`.`supplier_biz_region_second_name` like concat('%', #{query.supplierBizRegionSecondName},'%') </if>
<if test="query.supplierBizRegionThirdName != null and query.supplierBizRegionThirdName != ''"> and `tbs_cost_apply`.`supplier_biz_region_third_name` like concat('%', #{query.supplierBizRegionThirdName},'%') </if>
<if test="query.chargeState != null"> and `tbs_cost_apply`.`charge_state` = #{query.chargeState}</if>
<if test="query.submitTime != null"> and `tbs_cost_apply`.`submit_time` = #{query.submitTime}</if>
<if test="query.passTime != null"> and `tbs_cost_apply`.`pass_time` = #{query.passTime}</if>

Loading…
Cancel
Save