|
|
@@ -7,6 +7,7 @@ import com.uas.eiswms.util.BaseUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -29,170 +30,79 @@ public class BasicDataServiceImpl implements BasicDataService {
|
|
|
LoginService loginService;
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> postProductToXKN(String formDate, String token, String sign, String timestamp) {
|
|
|
- Map<String, Object> judgeMapData = new HashMap<String, Object>();
|
|
|
- judgeMapData = BaseUtil.judgeIsNull(formDate, token);
|
|
|
- if (judgeMapData != null) {
|
|
|
- return judgeMapData;
|
|
|
- }
|
|
|
+ public Map<String, Object> postProductToXKN(String formDate) {
|
|
|
Map<String, Object> postMapData = new HashMap<String, Object>();
|
|
|
- Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
- paramMap.put("formDate", formDate);
|
|
|
- paramMap.put("token", token);
|
|
|
- paramMap.put("timestamp", timestamp);
|
|
|
- String checkResult = loginService.checkSign(paramMap, sign);
|
|
|
- if ("01".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token错误");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("02".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token已失效");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("03".equals(checkResult)) {
|
|
|
+ if (StringUtils.isEmpty(formDate)){
|
|
|
+ postMapData.put("resCode", "04");
|
|
|
postMapData.put("success", false);
|
|
|
- postMapData.put("result", "sign签名不正确");
|
|
|
+ postMapData.put("result", "formDate不能为空");
|
|
|
return postMapData;
|
|
|
}
|
|
|
- if ("00".equals(checkResult)) {
|
|
|
- System.out.println("select * from Product where pr_status = '已审核' and pr_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Product where pr_status = '已审核' and pr_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Product'");
|
|
|
- List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
- postMapData.put("success", true);
|
|
|
- postMapData.put("result", dataList);
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "未知错误");
|
|
|
+ System.out.println("select * from Product where pr_status = '已审核' and pr_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Product where pr_status = '已审核' and pr_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Product'");
|
|
|
+ List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
+ postMapData.put("resCode", "00");
|
|
|
+ postMapData.put("success", true);
|
|
|
+ postMapData.put("result", dataList);
|
|
|
return postMapData;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> postCustomerToXKN(String formDate, String token, String sign, String timestamp) {
|
|
|
- Map<String, Object> judgeMapData = new HashMap<String, Object>();
|
|
|
- judgeMapData = BaseUtil.judgeIsNull(formDate, token);
|
|
|
- if (judgeMapData != null) {
|
|
|
- return judgeMapData;
|
|
|
- }
|
|
|
+ public Map<String, Object> postCustomerToXKN(String formDate) {
|
|
|
Map<String, Object> postMapData = new HashMap<String, Object>();
|
|
|
- Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
- paramMap.put("formDate", formDate);
|
|
|
- paramMap.put("token", token);
|
|
|
- paramMap.put("timestamp", timestamp);
|
|
|
- String checkResult = loginService.checkSign(paramMap, sign);
|
|
|
- if ("01".equals(checkResult)) {
|
|
|
+ if (StringUtils.isEmpty(formDate)){
|
|
|
+ postMapData.put("resCode", "04");
|
|
|
postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token错误");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("02".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token已失效");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("03".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "sign签名不正确");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("00".equals(checkResult)) {
|
|
|
- System.out.println("select * from Customer where cu_auditstatus = '已审核' and cu_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Customer where cu_auditstatus = '已审核' and cu_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Customer!Base'");
|
|
|
- List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
- postMapData.put("success", true);
|
|
|
- postMapData.put("result", dataList);
|
|
|
+ postMapData.put("result", "formDate不能为空");
|
|
|
return postMapData;
|
|
|
}
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "未知错误");
|
|
|
+ System.out.println("select * from Customer where cu_auditstatus = '已审核' and cu_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Customer where cu_auditstatus = '已审核' and cu_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Customer!Base'");
|
|
|
+ List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
+ postMapData.put("resCode", "00");
|
|
|
+ postMapData.put("success", true);
|
|
|
+ postMapData.put("result", dataList);
|
|
|
return postMapData;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> postVendorToXKN(String formDate, String token, String sign, String timestamp) {
|
|
|
- Map<String, Object> judgeMapData = new HashMap<String, Object>();
|
|
|
- judgeMapData = BaseUtil.judgeIsNull(formDate, token);
|
|
|
- if (judgeMapData != null) {
|
|
|
- return judgeMapData;
|
|
|
- }
|
|
|
+ public Map<String, Object> postVendorToXKN(String formDate) {
|
|
|
Map<String, Object> postMapData = new HashMap<String, Object>();
|
|
|
- Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
- paramMap.put("formDate", formDate);
|
|
|
- paramMap.put("token", token);
|
|
|
- paramMap.put("timestamp", timestamp);
|
|
|
- String checkResult = loginService.checkSign(paramMap, sign);
|
|
|
- if ("01".equals(checkResult)) {
|
|
|
+ if (StringUtils.isEmpty(formDate)){
|
|
|
+ postMapData.put("resCode", "04");
|
|
|
postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token错误");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("02".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token已失效");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("03".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "sign签名不正确");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("00".equals(checkResult)) {
|
|
|
- System.out.println("select * from Vendor where ve_auditstatus = '已审核' and ve_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Vendor where ve_auditstatus = '已审核' and ve_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Vendor'");
|
|
|
- List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
- postMapData.put("success", true);
|
|
|
- postMapData.put("result", dataList);
|
|
|
+ postMapData.put("result", "formDate不能为空");
|
|
|
return postMapData;
|
|
|
}
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "未知错误");
|
|
|
+ System.out.println("select * from Vendor where ve_auditstatus = '已审核' and ve_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Vendor where ve_auditstatus = '已审核' and ve_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Vendor'");
|
|
|
+ List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
+ postMapData.put("resCode", "00");
|
|
|
+ postMapData.put("success", true);
|
|
|
+ postMapData.put("result", dataList);
|
|
|
return postMapData;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> postWareHouseToXKN(String formDate, String token, String sign, String timestamp) {
|
|
|
- Map<String, Object> judgeMapData = new HashMap<String, Object>();
|
|
|
- judgeMapData = BaseUtil.judgeIsNull(formDate, token);
|
|
|
- if (judgeMapData != null) {
|
|
|
- return judgeMapData;
|
|
|
- }
|
|
|
+ public Map<String, Object> postWareHouseToXKN(String formDate) {
|
|
|
Map<String, Object> postMapData = new HashMap<String, Object>();
|
|
|
- Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
- paramMap.put("formDate", formDate);
|
|
|
- paramMap.put("token", token);
|
|
|
- paramMap.put("timestamp", timestamp);
|
|
|
- String checkResult = loginService.checkSign(paramMap, sign);
|
|
|
- if ("01".equals(checkResult)) {
|
|
|
+ if (StringUtils.isEmpty(formDate)){
|
|
|
+ postMapData.put("resCode", "04");
|
|
|
postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token错误");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("02".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "token已失效");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("03".equals(checkResult)) {
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "sign签名不正确");
|
|
|
- return postMapData;
|
|
|
- }
|
|
|
- if ("00".equals(checkResult)) {
|
|
|
- System.out.println("select * from Warehouse where wh_status = '已审核' and wh_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Warehouse where wh_status = '已审核' and wh_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
- SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Warehouse'");
|
|
|
- List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
- postMapData.put("success", true);
|
|
|
- // postMapData.put("result", dataList);
|
|
|
+ postMapData.put("result", "formDate不能为空");
|
|
|
return postMapData;
|
|
|
}
|
|
|
- postMapData.put("success", false);
|
|
|
- postMapData.put("result", "未知错误");
|
|
|
+ System.out.println("select * from Warehouse where wh_status = '已审核' and wh_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet sqlRowSet = baseDao.getJdbcTemplate().queryForRowSet("select * from Warehouse where wh_status = '已审核' and wh_updatetime_user > TO_DATE('" + formDate + "', 'YYYY-MM-DD')");
|
|
|
+ SqlRowSet formField = baseDao.getJdbcTemplate().queryForRowSet("select fd_field from form left join formdetail on fo_id=fd_foid where fo_caller='Warehouse'");
|
|
|
+ List<Map<String, Object>> dataList = BaseUtil.getDataList(sqlRowSet, formField);
|
|
|
+ postMapData.put("resCode", "00");
|
|
|
+ postMapData.put("success", true);
|
|
|
+ postMapData.put("result", dataList);
|
|
|
return postMapData;
|
|
|
}
|
|
|
|