|
@@ -120,6 +120,35 @@ public class STKServiceImpl implements STKService {
|
|
|
return Result.success(map);
|
|
return Result.success(map);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Result getCustomerList(ProductPageDTO productPageDTO) {
|
|
|
|
|
+ int pageNum = 1;
|
|
|
|
|
+ int pageSize = 20;
|
|
|
|
|
+ if (productPageDTO !=null){
|
|
|
|
|
+ pageNum = Integer.valueOf(productPageDTO.getPageNum());
|
|
|
|
|
+ pageSize = Integer.valueOf(productPageDTO.getPageSize());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return Result.error("参数错误!");
|
|
|
|
|
+ }
|
|
|
|
|
+ int start = ((pageNum - 1) * pageSize + 1);
|
|
|
|
|
+ int end = pageNum * pageSize;
|
|
|
|
|
+
|
|
|
|
|
+ List<CustomerDTO> customerDTOS = baseDao.query("select * from (select rownum rn,AA.* from (select cu_code,cu_name,cu_agency,cu_shortname,cu_auditstatus,cu_status,cu_kind,cu_sellercode,cu_sellername,cu_currency,cu_taxrate,cu_payments,cu_arname,cu_shcustname,cu_add1,cu_recordman,cu_recorddate,cu_cop,cu_remark,cu_id,cu_enablecredit,cu_credit,cu_uu,cu_contact2,cu_tel2 from customer where cu_auditstatuscode in ('AUDITED','DISABLE') order by cu_id desc) AA ) where rn>="+start+" and rn<="+end , CustomerDTO.class);
|
|
|
|
|
+
|
|
|
|
|
+ if (customerDTOS.size() == 0 ){
|
|
|
|
|
+ return Result.error("员工资料无数据!");
|
|
|
|
|
+ }
|
|
|
|
|
+ int count = baseDao.getCount("select count(1) from customer where cu_auditstatuscode in ('AUDITED','DISABLE')");
|
|
|
|
|
+
|
|
|
|
|
+ List<CustomerResp> customerResps = CustomerConvertor.toCustomerRespListByCustomerDTOS(customerDTOS);
|
|
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("pageNum", pageNum);
|
|
|
|
|
+ map.put("pageSize", pageSize);
|
|
|
|
|
+ map.put("size", count);
|
|
|
|
|
+ map.put("list", customerResps);
|
|
|
|
|
+ return Result.success(map);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public Result getProduct(HttpServletRequest request, ProductReq req) {
|
|
public Result getProduct(HttpServletRequest request, ProductReq req) {
|
|
|
String code = req.getCode();
|
|
String code = req.getCode();
|