Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
2418261e92
@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
@ -54,8 +55,17 @@ public class EmisCommissionQuoteController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCommissionQuote:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisCommissionQuote emisCommissionQuote)
|
||||
{
|
||||
public TableDataInfo list(EmisCommissionQuote emisCommissionQuote) {
|
||||
if ("2".equals(emisCommissionQuote.getBlOpen())) {
|
||||
// blOpen=2: 启用且已过期,修改为查询启用状态且结束日期早于当前日期
|
||||
emisCommissionQuote.setBlOpen("1");
|
||||
emisCommissionQuote.getParams().put("endDateBeforeNow", true);
|
||||
} else if ("3".equals(emisCommissionQuote.getBlOpen())) {
|
||||
// blOpen=3: 启用且未过期,修改为查询启用状态且结束日期晚于等于当前日期
|
||||
emisCommissionQuote.setBlOpen("1");
|
||||
emisCommissionQuote.getParams().put("endDateAfterNow", true);
|
||||
}
|
||||
|
||||
startPage();
|
||||
List<EmisCommissionQuote> list = emisCommissionQuoteService.selectEmisCommissionQuoteList(emisCommissionQuote);
|
||||
return getDataTable(list);
|
||||
|
||||
@ -772,6 +772,30 @@ public class EmisCommonController extends EmisBaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理输入的历史虚拟单
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/handleInputVirtualWaybill")
|
||||
public AjaxResult handleInputVirtualWaybill(@RequestBody List<EmisWaybill> emisWaybills){
|
||||
String lockKey="handleInputVirtualWaybill";
|
||||
log.info("handleHistoryVirtualWaybill start");
|
||||
|
||||
// 加锁查询
|
||||
redissonService.lock(lockKey,300);
|
||||
try{
|
||||
emisWaybillService.handleInputVirtualWaybill(emisWaybills);
|
||||
}catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("handleInputVirtualWaybill exception:"+ex.getMessage());
|
||||
}
|
||||
log.info("handleInputVirtualWaybill end");
|
||||
|
||||
redissonService.unlock(lockKey);
|
||||
return AjaxResult.success("发送成功");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动出账触发
|
||||
* @return
|
||||
|
||||
@ -26,9 +26,18 @@ public class EmisSalesCommissionRatioController extends BaseController {
|
||||
/**
|
||||
* 查询销售计提比例配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesCommissionRatio:list')")
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesCommissionRatio:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisSalesCommissionRatio query) {
|
||||
if ("2".equals(query.getStatus())) {
|
||||
// status=2: 启用且已过期,修改为查询启用状态且结束日期早于当前日期
|
||||
query.setStatus("1");
|
||||
query.getParams().put("endDateBeforeNow", true);
|
||||
} else if ("3".equals(query.getStatus())) {
|
||||
// status=3: 启用且未过期,修改为查询启用状态且结束日期晚于等于当前日期
|
||||
query.setStatus("1");
|
||||
query.getParams().put("endDateAfterNow", true);
|
||||
}
|
||||
startPage();
|
||||
List<EmisSalesCommissionRatio> list = emisSalesCommissionRatioService.selectEmisSalesCommissionRatioList(query);
|
||||
return getDataTable(list);
|
||||
|
||||
@ -0,0 +1,128 @@
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
import com.xdadan.erp.emis.domain.EmisSalesMonthlyReview;
|
||||
import com.xdadan.erp.emis.domain.EmisTransPlanRule;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.service.IEmisSalesMonthlyReviewService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售月评登记Controller
|
||||
*
|
||||
* @author heyu
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/salesMonthlyReview")
|
||||
public class EmisSalesMonthlyReviewController extends BaseController {
|
||||
@Autowired
|
||||
private IEmisSalesMonthlyReviewService emisSalesMonthlyReviewService;
|
||||
|
||||
/**
|
||||
* 查询销售月评登记列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisSalesMonthlyReview review) {
|
||||
startPage();
|
||||
List<EmisSalesMonthlyReview> list = emisSalesMonthlyReviewService.selectEmisSalesMonthlyReviewList(review);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取销售月评登记详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(emisSalesMonthlyReviewService.selectEmisSalesMonthlyReviewById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售月评登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:add')")
|
||||
@Log(title = "销售月评登记", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
return toAjax(emisSalesMonthlyReviewService.insertEmisSalesMonthlyReview(review));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售月评登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:edit')")
|
||||
@Log(title = "销售月评登记", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
return toAjax(emisSalesMonthlyReviewService.updateEmisSalesMonthlyReview(review));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销售月评登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:remove')")
|
||||
@Log(title = "销售月评登记", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(emisSalesMonthlyReviewService.deleteEmisSalesMonthlyReviewByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销售月评登记列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:export')")
|
||||
@Log(title = "销售月评登记", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EmisSalesMonthlyReview review) {
|
||||
List<EmisSalesMonthlyReview> list = emisSalesMonthlyReviewService.selectEmisSalesMonthlyReviewList(review);
|
||||
ExcelUtil<EmisSalesMonthlyReview> util = new ExcelUtil<>(EmisSalesMonthlyReview.class);
|
||||
util.exportExcel(response, list, "销售月评登记数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* Excel草稿方式新增
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:salesMonthlyReview:draftSubmitReview')")
|
||||
@PostMapping(value = "/draftSubmitReview")
|
||||
public AjaxResult draftSubmitReview(@RequestBody EmisSalesMonthlyReview review) {
|
||||
JSONObject jObjOut = new JSONObject();
|
||||
String result = "success";
|
||||
String msg = "提交成功";
|
||||
try {
|
||||
emisSalesMonthlyReviewService.draftSubmitReview(review);
|
||||
jObjOut.put("reviewDetail", review);
|
||||
} catch (EmisBizError ex) {
|
||||
ex.printStackTrace();
|
||||
result = "fail";
|
||||
msg = ex.getErrorCode() + ":" + ex.getMessage();
|
||||
} catch (DuplicateKeyException e) {
|
||||
e.printStackTrace();
|
||||
result = "fail";
|
||||
msg = "数据重复";
|
||||
} catch (Exception ex) {
|
||||
result = "fail";
|
||||
ex.printStackTrace();
|
||||
msg = "系统异常:" + ex.getMessage();
|
||||
if (ex instanceof EmisBizError) {
|
||||
msg = ((EmisBizError) ex).getErrorCode() + ":" + ex.getMessage();
|
||||
}
|
||||
}
|
||||
jObjOut.put("result", result);
|
||||
jObjOut.put("msg", msg);
|
||||
return AjaxResult.success("成功", jObjOut);
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ public class EmisCommissionQuote extends BaseEntity
|
||||
private String postType;
|
||||
/* 快递类型:emis_biz_shipping_method */
|
||||
private String transType;
|
||||
/* 启用状态 1-启用 0-停用 */
|
||||
/* 启用状态 1-启用 0-停用 2-启用已过期 3-启用未过期 */
|
||||
private String blOpen;
|
||||
/* 员工编号 */
|
||||
private String empCode;
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 销售计提比例配置实体类
|
||||
@ -24,6 +26,12 @@ public class EmisSalesCommissionRatio extends BaseEntity {
|
||||
private String salesSupport;
|
||||
/** 销售支持占比 */
|
||||
private BigDecimal salesSupportRatio;
|
||||
/** 启用状态 1-启用 0-未启用 **/
|
||||
/** 启用状态 1-启用 0-未启用 2-启用已过期 3-启用未过期 **/
|
||||
private String status;
|
||||
/* 开始日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startDate;
|
||||
/* 结束日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endDate;
|
||||
}
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 销售月评登记对象 emis_sales_monthly_review
|
||||
*
|
||||
* @author linfso
|
||||
*/
|
||||
@Data
|
||||
public class EmisSalesMonthlyReview extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
/** 员工姓名 */
|
||||
private String employeeName;
|
||||
/** 所属部门 */
|
||||
private String department;
|
||||
/** 岗位 */
|
||||
private String position;
|
||||
/** 入职日期 yyyy-MM-dd */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date entryDate;
|
||||
/** 考评月份 yyyy-MM */
|
||||
private String reviewMonth;
|
||||
/** 考核分数 */
|
||||
private BigDecimal score;
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisSalesMonthlyReview;
|
||||
import com.xdadan.erp.emis.domain.EmisSalesmenRel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售月评登记Mapper接口
|
||||
*
|
||||
* @author heyu
|
||||
*/
|
||||
public interface EmisSalesMonthlyReviewMapper extends BaseMapper<EmisSalesMonthlyReview> {
|
||||
/**
|
||||
* 查询销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 销售月评登记
|
||||
*/
|
||||
EmisSalesMonthlyReview selectEmisSalesMonthlyReviewById(Long id);
|
||||
|
||||
/**
|
||||
* 查询销售月评登记列表
|
||||
*
|
||||
* @param review 查询条件
|
||||
* @return 销售月评登记集合
|
||||
*/
|
||||
List<EmisSalesMonthlyReview> selectEmisSalesMonthlyReviewList(EmisSalesMonthlyReview review);
|
||||
|
||||
/**
|
||||
* 新增销售月评登记
|
||||
*
|
||||
* @param review 销售月评登记
|
||||
* @return 结果
|
||||
*/
|
||||
int insertEmisSalesMonthlyReview(EmisSalesMonthlyReview review);
|
||||
|
||||
/**
|
||||
* 修改销售月评登记
|
||||
*
|
||||
* @param review 销售月评登记
|
||||
* @return 结果
|
||||
*/
|
||||
int updateEmisSalesMonthlyReview(EmisSalesMonthlyReview review);
|
||||
|
||||
/**
|
||||
* 删除销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEmisSalesMonthlyReviewById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除销售月评登记
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEmisSalesMonthlyReviewByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 唯一性校验
|
||||
*
|
||||
* @param review
|
||||
* @return
|
||||
*/
|
||||
EmisSalesMonthlyReview checkUnique(EmisSalesMonthlyReview review);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisSalesMonthlyReview;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售月评登记Service接口
|
||||
*
|
||||
* @author linfso
|
||||
*/
|
||||
public interface IEmisSalesMonthlyReviewService {
|
||||
/**
|
||||
* 查询销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 销售月评登记
|
||||
*/
|
||||
EmisSalesMonthlyReview selectEmisSalesMonthlyReviewById(Long id) ;
|
||||
|
||||
/**
|
||||
* 查询销售月评登记列表
|
||||
*
|
||||
* @param review 查询条件
|
||||
* @return 销售月评登记集合
|
||||
*/
|
||||
List<EmisSalesMonthlyReview> selectEmisSalesMonthlyReviewList(EmisSalesMonthlyReview review);
|
||||
|
||||
/**
|
||||
* 新增销售月评登记
|
||||
*
|
||||
* @param review 销售月评登记
|
||||
* @return 结果
|
||||
*/
|
||||
int insertEmisSalesMonthlyReview(EmisSalesMonthlyReview review) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 修改销售月评登记
|
||||
*
|
||||
* @param review 销售月评登记
|
||||
* @return 结果
|
||||
*/
|
||||
int updateEmisSalesMonthlyReview(EmisSalesMonthlyReview review) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 删除销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEmisSalesMonthlyReviewById(Long id) ;
|
||||
|
||||
/**
|
||||
* 批量删除销售月评登记
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEmisSalesMonthlyReviewByIds(Long[] ids) ;
|
||||
|
||||
/**
|
||||
* 唯一性校验
|
||||
*
|
||||
* @param review
|
||||
* @return
|
||||
*/
|
||||
EmisSalesMonthlyReview checkUnique(EmisSalesMonthlyReview review);
|
||||
|
||||
/**
|
||||
* 草稿新增
|
||||
*
|
||||
* @param review
|
||||
* @return
|
||||
*/
|
||||
int draftSubmitReview(EmisSalesMonthlyReview review) throws EmisBizError;
|
||||
}
|
||||
@ -306,4 +306,10 @@ public interface IEmisWaybillService extends IDataAuditService
|
||||
*
|
||||
*/
|
||||
void handleHistoryVirtualWaybill();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param emisWaybills
|
||||
*/
|
||||
void handleInputVirtualWaybill(List<EmisWaybill> emisWaybills);
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ public class EmisSalesCommissionRatioServiceImpl implements IEmisSalesCommission
|
||||
*/
|
||||
@Override
|
||||
public EmisSalesCommissionRatio selectEmisSalesCommissionRatioById(Long id) {
|
||||
return emisSalesCommissionRatioMapper.selectById(id);
|
||||
return emisSalesCommissionRatioMapper.selectEmisSalesCommissionRatioById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,171 @@
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisSalesMonthlyReview;
|
||||
import com.xdadan.erp.emis.mapper.EmisSalesMonthlyReviewMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisSalesMonthlyReviewService;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 销售月评登记Service实现
|
||||
* 负责销售月评登记的增删改查、唯一性校验等业务逻辑
|
||||
*
|
||||
* @author heyu
|
||||
*/
|
||||
@Service
|
||||
public class EmisSalesMonthlyReviewServiceImpl implements IEmisSalesMonthlyReviewService {
|
||||
@Autowired
|
||||
private EmisSalesMonthlyReviewMapper emisSalesMonthlyReviewMapper;
|
||||
|
||||
private static final List<String> VALID_DEPARTMENTS = java.util.Arrays.asList("销售一组", "销售二组", "销售三组", "销售四组",
|
||||
"销售五组", "宁波站点", "上海站点", "柯桥站点", "杭州站点");
|
||||
private static final List<String> VALID_POSITIONS = java.util.Arrays.asList("收派员", "销售顾问", "销售主管", "销售支持", "销售经理");
|
||||
|
||||
private void validateDraftReview(EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
if (review == null) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "参数不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(review.getEmployeeName())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "员工姓名不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(review.getDepartment())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "所属部门不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(review.getPosition())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "岗位不能为空");
|
||||
}
|
||||
if (review.getScore() == null) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "考核分数不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(review.getReviewMonth())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "考评月份不能为空");
|
||||
}
|
||||
if (review.getEntryDate() == null) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "入职日期不能为空");
|
||||
}
|
||||
if (!VALID_DEPARTMENTS.contains(review.getDepartment())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "所属部门不在允许范围内");
|
||||
}
|
||||
if (!VALID_POSITIONS.contains(review.getPosition())) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "岗位不在允许范围内");
|
||||
}
|
||||
// 校验考评月份格式 yyyy-MM
|
||||
if (!review.getReviewMonth().matches("\\d{4}-\\d{2}")) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "考评月份格式错误,应为yyyy-MM");
|
||||
}
|
||||
// 入职日期格式校验 yyyy-MM-dd
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
sdf.format(review.getEntryDate());
|
||||
} catch (Exception e) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "入职日期格式错误,应为yyyy-MM-dd");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键ID查询销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 销售月评登记对象
|
||||
*/
|
||||
@Override
|
||||
public EmisSalesMonthlyReview selectEmisSalesMonthlyReviewById(Long id) {
|
||||
return emisSalesMonthlyReviewMapper.selectEmisSalesMonthlyReviewById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询销售月评登记列表
|
||||
*
|
||||
* @param review 查询条件
|
||||
* @return 销售月评登记集合
|
||||
*/
|
||||
@Override
|
||||
public List<EmisSalesMonthlyReview> selectEmisSalesMonthlyReviewList(EmisSalesMonthlyReview review) {
|
||||
return emisSalesMonthlyReviewMapper.selectEmisSalesMonthlyReviewList(review);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售月评登记,包含唯一性校验
|
||||
*
|
||||
* @param review 销售月评登记对象
|
||||
* @return 插入结果
|
||||
* @throws EmisBizError 唯一性冲突或插入异常
|
||||
*/
|
||||
@Override
|
||||
public int insertEmisSalesMonthlyReview(EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
EmisSalesMonthlyReview unique = emisSalesMonthlyReviewMapper.checkUnique(review);
|
||||
if (unique != null) {
|
||||
throw new EmisBizError(EmisBizErrorType.EXISTS, "该员工本月该岗位该部门已登记");
|
||||
}
|
||||
return emisSalesMonthlyReviewMapper.insertEmisSalesMonthlyReview(review);
|
||||
}
|
||||
|
||||
/**
|
||||
* 草稿新增
|
||||
*
|
||||
* @param review 销售月评登记对象
|
||||
* @return 插入结果
|
||||
* @throws EmisBizError 唯一性冲突或插入异常
|
||||
*/
|
||||
@Override
|
||||
public int draftSubmitReview(EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
validateDraftReview(review);
|
||||
return insertEmisSalesMonthlyReview(review);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售月评登记,包含唯一性校验
|
||||
*
|
||||
* @param review 销售月评登记对象
|
||||
* @return 修改结果
|
||||
* @throws EmisBizError 唯一性冲突或修改异常
|
||||
*/
|
||||
@Override
|
||||
public int updateEmisSalesMonthlyReview(EmisSalesMonthlyReview review) throws EmisBizError {
|
||||
EmisSalesMonthlyReview unique = emisSalesMonthlyReviewMapper.checkUnique(review);
|
||||
if (unique != null && !unique.getId().equals(review.getId())) {
|
||||
throw new EmisBizError(EmisBizErrorType.EXISTS, "该员工本月该岗位该部门已登记");
|
||||
}
|
||||
return emisSalesMonthlyReviewMapper.updateEmisSalesMonthlyReview(review);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键ID软删除销售月评登记
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisSalesMonthlyReviewById(Long id) {
|
||||
return emisSalesMonthlyReviewMapper.deleteEmisSalesMonthlyReviewById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量软删除销售月评登记
|
||||
*
|
||||
* @param ids 主键ID数组
|
||||
* @return 删除结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisSalesMonthlyReviewByIds(Long[] ids) {
|
||||
return emisSalesMonthlyReviewMapper.deleteEmisSalesMonthlyReviewByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 唯一性校验
|
||||
*
|
||||
* @param review
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EmisSalesMonthlyReview checkUnique(EmisSalesMonthlyReview review) {
|
||||
return emisSalesMonthlyReviewMapper.checkUnique(review);
|
||||
}
|
||||
}
|
||||
@ -987,6 +987,14 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
if (CollectionUtil.isEmpty(salesmenUsers)) {
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "销售联系人不支持回款");
|
||||
}
|
||||
// SysUser payeeUser = getEmisStaffByEmpName(emisWaybillSave.getPayee());
|
||||
// if (Objects.isNull(payeeUser)) {
|
||||
// throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "回款联系人不支持回款");
|
||||
// }
|
||||
// SysUser salesUser = getEmisStaffByEmpName(emisWaybillSave.getSalesmen());
|
||||
// if (Objects.isNull(salesUser)) {
|
||||
// throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "销售联系人不支持回款");
|
||||
// }
|
||||
|
||||
// 包装类型
|
||||
String packTypeStr = emisWaybillSave.getPackType();
|
||||
@ -6036,6 +6044,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleInputVirtualWaybill(List<EmisWaybill> emisWaybills) {
|
||||
for (EmisWaybill emisWaybill : emisWaybills) {
|
||||
EmisWaybill oldWaybill = emisWaybillMapper
|
||||
.selectMasterWaybillByBillCode(emisWaybill.getBillCode());
|
||||
emisWaybill.setId(oldWaybill.getId());
|
||||
updateWaybill(emisWaybill);
|
||||
}
|
||||
}
|
||||
|
||||
// 新增内部类用于返回统计结果
|
||||
private static class ProblemHandleResult {
|
||||
int successCount;
|
||||
|
||||
@ -60,7 +60,16 @@
|
||||
<if test="calcWeightType != null and calcWeightType != ''"> and calc_weight_type=#{calcWeightType}</if>
|
||||
<if test="postType != null and postType != ''"> and post_type=#{postType}</if>
|
||||
<if test="transType != null and transType != ''"> and ( FIND_IN_SET(#{transType},trans_type) )</if>
|
||||
<if test="blOpen != null and blOpen != ''"> and bl_open=#{blOpen}</if>
|
||||
<if test="blOpen != null and blOpen != ''">
|
||||
and bl_open = #{blOpen}
|
||||
</if>
|
||||
<!-- 处理blOpen=2/3的特殊逻辑 -->
|
||||
<if test="params.endDateBeforeNow != null and params.endDateBeforeNow == true">
|
||||
and end_date < NOW()
|
||||
</if>
|
||||
<if test="params.endDateAfterNow != null and params.endDateAfterNow == true">
|
||||
and end_date >= NOW()
|
||||
</if>
|
||||
<if test="empCode != null and empCode != ''"> and ( FIND_IN_SET(#{empCode},emp_code) or emp_code='-1')</if>
|
||||
<if test="empName != null and empName != ''"> and ( FIND_IN_SET(#{empName},emp_name) or emp_name='全部') </if>
|
||||
|
||||
@ -78,6 +87,8 @@
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectValidQuoteList" parameterType="EmisCommissionQuote" resultMap="EmisCommissionQuoteResult">
|
||||
<include refid="selectEmisCommissionQuoteVo"/>
|
||||
<where>
|
||||
|
||||
@ -11,21 +11,33 @@
|
||||
<result property="salesSupport" column="sales_support" />
|
||||
<result property="salesSupportRatio" column="sales_support_ratio" />
|
||||
<result property="status" column="status" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="endDate" column="end_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisSalesCommissionRatioVo">
|
||||
select id, sales_executive, sales_executive_ratio, salesmen, salesmen_ratio, sales_support, sales_support_ratio, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_sales_commission_ratio
|
||||
select id, sales_executive, sales_executive_ratio, salesmen, salesmen_ratio, sales_support, sales_support_ratio, status, start_date, end_date, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_sales_commission_ratio
|
||||
</sql>
|
||||
|
||||
<!-- 查询列表 -->
|
||||
<select id="selectEmisSalesCommissionRatioList" parameterType="com.xdadan.erp.emis.domain.EmisSalesCommissionRatio" resultMap="EmisSalesCommissionRatioResult">
|
||||
<include refid="selectEmisSalesCommissionRatioVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="salesExecutive != null and salesExecutive != ''">AND sales_executive like concat('%', #{salesExecutive}, '%')</if>
|
||||
<if test="salesmen != null and salesmen != ''">AND salesmen like concat('%', #{salesmen}, '%')</if>
|
||||
<if test="salesSupport != null and salesSupport != ''">AND sales_support like concat('%', #{salesSupport}, '%')</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
<if test="delFlag != null and delFlag != ''">AND del_flag = #{delFlag}</if>
|
||||
<if test="startDate != null">AND start_date = #{startDate}</if>
|
||||
<if test="endDate != null">AND end_date = #{endDate}</if>
|
||||
<!-- 处理status=2/3的特殊逻辑 -->
|
||||
<if test="params.endDateBeforeNow != null and params.endDateBeforeNow == true">
|
||||
and end_date < NOW()
|
||||
</if>
|
||||
<if test="params.endDateAfterNow != null and params.endDateAfterNow == true">
|
||||
and end_date >= NOW()
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
@ -33,7 +45,7 @@
|
||||
<!-- 主键查询 -->
|
||||
<select id="selectEmisSalesCommissionRatioById" parameterType="long" resultMap="EmisSalesCommissionRatioResult">
|
||||
<include refid="selectEmisSalesCommissionRatioVo"/>
|
||||
where id = #{id}
|
||||
where del_flag='0' and id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 新增 -->
|
||||
@ -47,6 +59,8 @@
|
||||
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
|
||||
<if test="salesSupportRatio != null">sales_support_ratio,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="endDate != null">end_date,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@ -64,6 +78,8 @@
|
||||
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
|
||||
<if test="salesSupportRatio != null">#{salesSupportRatio},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="endDate != null">#{endDate},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
@ -86,6 +102,8 @@
|
||||
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
|
||||
<if test="salesSupportRatio != null">sales_support_ratio = #{salesSupportRatio},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="endDate != null">end_date = #{endDate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
@ -112,16 +130,19 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 验重:salesExecutive、salesmen、salesSupport、status都相同视为重复 -->
|
||||
<!-- 验重:salesExecutive、salesmen、salesSupport、status、startDate、endDate都相同视为重复 -->
|
||||
<select id="checkUnique" parameterType="com.xdadan.erp.emis.domain.EmisSalesCommissionRatio" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM emis_sales_commission_ratio
|
||||
WHERE sales_executive = #{salesExecutive}
|
||||
AND salesmen = #{salesmen}
|
||||
AND sales_support = #{salesSupport}
|
||||
AND status = #{status}
|
||||
AND del_flag = '0'
|
||||
<if test="id != null">AND id != #{id}</if>
|
||||
AND salesmen = #{salesmen}
|
||||
AND sales_support = #{salesSupport}
|
||||
AND status = #{status}
|
||||
AND (
|
||||
start_date <= #{endDate} and end_date >= #{startDate}
|
||||
)
|
||||
AND del_flag = '0'
|
||||
<if test="id != null">AND id != #{id}</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisSalesMonthlyReviewMapper">
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="EmisSalesMonthlyReviewResult" type="com.xdadan.erp.emis.domain.EmisSalesMonthlyReview" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="employeeName" column="employee_name" />
|
||||
<result property="department" column="department" />
|
||||
<result property="position" column="position" />
|
||||
<result property="entryDate" column="entry_date" />
|
||||
<result property="reviewMonth" column="review_month" />
|
||||
<result property="score" column="score" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询销售月评登记 -->
|
||||
<select id="selectEmisSalesMonthlyReviewById" resultMap="EmisSalesMonthlyReviewResult">
|
||||
SELECT * FROM emis_sales_monthly_review WHERE id = #{id} AND del_flag = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询销售月评登记列表 -->
|
||||
<select id="selectEmisSalesMonthlyReviewList" resultMap="EmisSalesMonthlyReviewResult">
|
||||
SELECT * FROM emis_sales_monthly_review
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="employeeName != null and employeeName != ''">
|
||||
AND employee_name LIKE CONCAT('%', #{employeeName}, '%')
|
||||
</if>
|
||||
<if test="department != null and department != ''">
|
||||
AND department LIKE CONCAT('%', #{department}, '%')
|
||||
</if>
|
||||
<if test="position != null and position != ''">
|
||||
AND position LIKE CONCAT('%', #{position}, '%')
|
||||
</if>
|
||||
<if test="reviewMonth != null and reviewMonth != ''">
|
||||
AND review_month = #{reviewMonth}
|
||||
</if>
|
||||
<if test="params.beginScore != null and params.beginScore != ''">
|
||||
AND score >= #{params.beginScore}
|
||||
</if>
|
||||
<if test="params.endScore != null and params.endScore != ''">
|
||||
AND score <= #{params.endScore}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY review_month,create_time DESC, employee_name ASC
|
||||
</select>
|
||||
|
||||
<!-- 新增销售月评登记 -->
|
||||
<insert id="insertEmisSalesMonthlyReview" parameterType="com.xdadan.erp.emis.domain.EmisSalesMonthlyReview" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO emis_sales_monthly_review
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="employeeName != null and employeeName != ''">employee_name,</if>
|
||||
<if test="department != null and department != ''">department,</if>
|
||||
<if test="position != null and position != ''">position,</if>
|
||||
<if test="entryDate != null">entry_date,</if>
|
||||
<if test="reviewMonth != null and reviewMonth != ''">review_month,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="employeeName != null and employeeName != ''">#{employeeName},</if>
|
||||
<if test="department != null and department != ''">#{department},</if>
|
||||
<if test="position != null and position != ''">#{position},</if>
|
||||
<if test="entryDate != null">#{entryDate},</if>
|
||||
<if test="reviewMonth != null and reviewMonth != ''">#{reviewMonth},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 修改销售月评登记 -->
|
||||
<update id="updateEmisSalesMonthlyReview" parameterType="com.xdadan.erp.emis.domain.EmisSalesMonthlyReview">
|
||||
UPDATE emis_sales_monthly_review
|
||||
<set>
|
||||
<if test="employeeName != null">employee_name = #{employeeName},</if>
|
||||
<if test="department != null">department = #{department},</if>
|
||||
<if test="position != null">position = #{position},</if>
|
||||
<if test="entryDate != null">entry_date = #{entryDate},</if>
|
||||
<if test="reviewMonth != null">review_month = #{reviewMonth},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateSite != null">update_site = #{updateSite},</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND del_flag = 0
|
||||
</update>
|
||||
|
||||
<!-- 软删除销售月评登记 -->
|
||||
<update id="deleteEmisSalesMonthlyReviewById" parameterType="Long">
|
||||
UPDATE emis_sales_monthly_review SET del_flag = 1 WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 批量软删除销售月评登记 -->
|
||||
<update id="deleteEmisSalesMonthlyReviewByIds" parameterType="Long[]">
|
||||
UPDATE emis_sales_monthly_review SET del_flag = 1 WHERE id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 唯一性校验 -->
|
||||
<select id="checkUnique" resultMap="EmisSalesMonthlyReviewResult">
|
||||
SELECT * FROM emis_sales_monthly_review
|
||||
WHERE employee_name = #{employeeName}
|
||||
AND position = #{position}
|
||||
AND department = #{department}
|
||||
AND review_month = #{reviewMonth}
|
||||
AND del_flag = 0
|
||||
<if test="id != null">AND id != #{id}</if>
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and w.send_date <![CDATA[ <= ]]> #{params.endSendDate}
|
||||
</if>
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and w.send_site_code=#{params.privSiteCode}
|
||||
and (w.start_site_code=#{params.privSiteCode} or w.send_site_code=#{params.privSiteCode})
|
||||
</if>
|
||||
</where>
|
||||
order by w.bill_code desc
|
||||
@ -267,8 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND k.trans_manager like concat('%', #{transManager}, '%')
|
||||
</if>
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (m.start_site_code=#{params.privSiteCode} or m.next_site_code=#{params.privSiteCode} or
|
||||
r.manager=#{params.privEmpName} or k.trans_manager=#{params.privEmpName})
|
||||
and (w.start_site_code=#{params.privSiteCode} or w.send_site_code=#{params.privSiteCode})
|
||||
</if>
|
||||
<if test="lineCode != null and lineCode != ''">
|
||||
AND m.line_code = #{lineCode}
|
||||
|
||||
@ -40,7 +40,12 @@
|
||||
<if test="prodNameEn != null and prodNameEn != ''"> and prod_name_en like concat('%', #{prodNameEn}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="country != null and country != ''"> and country=#{country}</if>
|
||||
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code=#{transLineCode}</if>
|
||||
<if test="transLineCode != null and transLineCode != ''">
|
||||
and trans_line_code in
|
||||
<foreach collection="transLineCode.split(',')" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="transLine != null and transLine != ''"> and trans_line like concat('%', #{transLine}, '%')</if>
|
||||
<if test="carryType != null and carryType != ''"> and carry_type=#{carryType}</if>
|
||||
<if test="transType != null and transType != ''"> and trans_type= #{transType}</if>
|
||||
|
||||
@ -265,6 +265,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.sendSiteCode != null and params.sendSiteCode != ''">
|
||||
and ewb.send_site_code=#{params.sendSiteCode}
|
||||
</if>
|
||||
|
||||
<if test="params.sendCountry != null and params.sendCountry != ''">
|
||||
and ewb.send_country=#{params.sendCountry}
|
||||
</if>
|
||||
|
||||
<if test="params.receiveCountry != null and params.receiveCountry != ''">
|
||||
and ewb.receive_country=#{params.receiveCountry}
|
||||
</if>
|
||||
|
||||
<if test="params.transLineType != null and params.transLineType != ''">
|
||||
and ewb.trans_line_type=#{params.transLineType}
|
||||
</if>
|
||||
|
||||
<if test="params.productType != null and params.productType != ''">
|
||||
and ewb.product_type=#{params.productType}
|
||||
</if>
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1075,6 +1075,13 @@
|
||||
and a.order_date <![CDATA[ <= ]]> #{params.endOrderDate}
|
||||
</if>
|
||||
|
||||
<if test="params.beginPickStartDate != null and params.beginPickStartDate != ''">
|
||||
and a.pick_start_date <![CDATA[ >= ]]> #{params.beginPickStartDate}
|
||||
</if>
|
||||
<if test="params.endPickStartDate != null and params.endPickStartDate != ''">
|
||||
and a.pick_start_date <![CDATA[ <= ]]> #{params.endPickStartDate}
|
||||
</if>
|
||||
|
||||
<if test="payee != null and payee != ''">
|
||||
and a.payee=#{payee}
|
||||
</if>
|
||||
@ -3858,8 +3865,11 @@
|
||||
<select id="selectHistoryVirtualWaybill" resultMap="EmisWaybillResult">
|
||||
select a.id, a.bill_code,a.master_bill_code,a.problem_type, a.remark,a.fee_remark
|
||||
from emis_waybill a
|
||||
where a.del_flag = '0' and
|
||||
a.problem_type in (173,170)
|
||||
where a.del_flag = '0'
|
||||
and exists (
|
||||
select 1 from emis_waybill_problem_info c where a.bill_code = c.bill_code and c.problem_type in (173,170)
|
||||
and c.del_flag = '0'
|
||||
)
|
||||
and (master_bill_code is null or master_bill_code='' or master_bill_code=' ')
|
||||
order by a.create_time desc
|
||||
limit #{offset}, #{pageSize}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user