|
|
@@ -187,6 +187,38 @@ public class STKServiceImpl implements STKService {
|
|
|
return Result.success(map);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result createVisitRecord(VisitRecordDTO customerVisitDTO) {
|
|
|
+ if(customerVisitDTO == null) {
|
|
|
+ return Result.error("参数错误!");
|
|
|
+ }
|
|
|
+ if(customerVisitDTO.getType() == null || "".equals(customerVisitDTO.getType())) {
|
|
|
+ return Result.error("拜访类型不能为空!");
|
|
|
+ }
|
|
|
+ String caller;
|
|
|
+ if ("客户拜访".equals(customerVisitDTO.getType())){
|
|
|
+ caller="OfficeClerk";
|
|
|
+ }else if ("原厂拜访".equals(customerVisitDTO.getType())){
|
|
|
+ caller="VisitRecord!Vender";
|
|
|
+ }
|
|
|
+ String code = baseDao.sGetMaxNumber("VisitRecord", 2);
|
|
|
+ int id = baseDao.getSeqId("VisitRecord_SEQ");
|
|
|
+ String Sql ="insert into CustomerVisit(vr_id,vr_code,vr_recorder,vr_recordercode,vr_recorddate,vr_status,vr_statuscode," +
|
|
|
+ "vr_visittime,vr_visitend,vr_nexttime,vr_visitplace,vr_khsj_user," +
|
|
|
+ "vr_nichecode,vr_nichename,vr_cuuu,vr_cuname,vr_cucontact,vr_zhwu_user,vr_tel,vr_jtfs_user,vr_title,vr_class,vr_nichestep,vr_detail,vr_attach)" +
|
|
|
+ "values("+id+",'"+code+"','"+customerVisitDTO.getRecordercode()+"',to_date('"+customerVisitDTO.getRecorddate()+"','yyyy-mm-dd hh24:mi:ss'),'已审核','AUDITED'," +
|
|
|
+ "to_date('"+customerVisitDTO.getVisittime()+"','yyyy-mm-dd hh24:mi:ss'),to_date('"+customerVisitDTO.getVisitend()+"','yyyy-mm-dd hh24:mi:ss'),to_date('"+customerVisitDTO.getNexttime()+"','yyyy-mm-dd hh24:mi:ss')," +
|
|
|
+ "'"+customerVisitDTO.getVisitplace()+"','"+customerVisitDTO.getKhsj_user()+"'," +
|
|
|
+ "'"+customerVisitDTO.getNichecode()+"','"+customerVisitDTO.getNichename()+"','"+customerVisitDTO.getCuuu()+"','"+customerVisitDTO.getCuname()+"','"+customerVisitDTO.getCucontact()+"'," +
|
|
|
+ "'"+customerVisitDTO.getZhwu_user()+"','"+customerVisitDTO.getTel()+"','"+customerVisitDTO.getJtfs_user()+"','"+customerVisitDTO.getTitle()+"','"+customerVisitDTO.getType()+"'," +
|
|
|
+ "'"+customerVisitDTO.getNichestep()+"','"+customerVisitDTO.getDetail()+"','"+customerVisitDTO.getAttach()+"')";
|
|
|
+ baseDao.execute(Sql);
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("id", id);
|
|
|
+ map.put("code", code);
|
|
|
+ return Result.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 组装订单主从表数据
|
|
|
*/
|