Commit 91497447 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

Dev oracle sherlock

See merge request root/atms!127
parents a391b98a f11ade1e
......@@ -18,6 +18,7 @@ import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.Common.RemoteValidationRetDto;
import pwc.taxtech.atms.dto.formula.FormulaConfigDto;
import pwc.taxtech.atms.service.KeyValueConfigService;
import pwc.taxtech.atms.service.TemplateFormulaService;
@RestController
@RequestMapping("/api/v1/keyValueConfig")
......@@ -27,6 +28,9 @@ public class KeyValueConfigController {
@Autowired
private KeyValueConfigService keyValueConfigService;
@Autowired
private TemplateFormulaService templateFormulaService;
@ApiOperation(value = "get keyValueConfig")
@RequestMapping(value = "", method = RequestMethod.GET)
public @ResponseBody
......@@ -83,7 +87,7 @@ public class KeyValueConfigController {
@RequestMapping(method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
int delelte(@RequestParam String keyValueId) throws BadHttpRequest {
int delelte(@RequestParam("keyValueID") String keyValueId) throws BadHttpRequest {
if (StringUtils.isBlank(keyValueId)) {
throw new BadHttpRequest(new Exception("keyValueId is null"));
}
......@@ -101,10 +105,19 @@ public class KeyValueConfigController {
RemoteValidationRetDto isDuplicated(@RequestParam String value) {
boolean isDuplicated = keyValueConfigService.isKeyValueDuplicated(value);
RemoteValidationRetDto result = new RemoteValidationRetDto();
result.setValid(!isDuplicated);
result.setIsValid(!isDuplicated);
result.setValue(value);
return result;
}
@RequestMapping(value="isFormulaValid", method=RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
RemoteValidationRetDto isFormulaValid(@RequestParam String value){
OperationResultDto validateResult = templateFormulaService.validate(value);
RemoteValidationRetDto result = new RemoteValidationRetDto();
result.setIsValid(validateResult.getResult());
result.setValue(value);
return result;
}
}
package pwc.taxtech.atms.dto.Common;
public class RemoteValidationRetDto {
private boolean isValid;
private String value;
public boolean isValid() {
return isValid;
}
import lombok.Getter;
import lombok.Setter;
public void setValid(boolean valid) {
isValid = valid;
}
@Getter
@Setter
public class RemoteValidationRetDto {
public String getValue() {
return value;
}
private Boolean isValid;
private String value;
public void setValue(String value) {
this.value = value;
}
}
......@@ -3,7 +3,7 @@ package pwc.taxtech.atms.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
public class IndustryDto {
@JsonProperty("ID")
// @JsonProperty("ID")
private String id;
private String name;
private Boolean isActive;
......
......@@ -6,7 +6,7 @@ import java.util.List;
import java.util.Map;
public class KeyValueConfigDisplayDto {
@JsonProperty("ID")
// @JsonProperty("ID")
private String id;
private String keyCode;
private String name;
......
......@@ -150,7 +150,7 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
keyValueConfig.setUpdator(addKeyValueConfigDto.getUserName());
keyValueConfig.setKeyValueType(2);
keyValueConfigMapper.insert(keyValueConfig);
keyValueConfigMapper.insertSelective(keyValueConfig);
operationLogService.addDataAddLog(keyValueConfig, OperationModule.KeyValueConfig, addKeyValueConfigDto.getUserName()
, Message.Log.AddKeyValueConfiguration, "", keyValueConfig.getName(), logType);
}
......
......@@ -43,13 +43,11 @@ public class TemplateFormulaServiceImpl extends AbstractService implements Templ
//var compileCode = sourceCode.Compile();
rtn.Result = compileCode != null;*/
result.setResult(true);
return result;
} catch (Exception e) {
result.setResult(false);
result.setResultMsg(e.getMessage());
}
return null;
return result;
}
}
......@@ -14,7 +14,7 @@
<result column="IS_CONSTANT" jdbcType="DECIMAL" property="isConstant" />
<result column="CALCULATE_STATUS" jdbcType="DECIMAL" property="calculateStatus" />
<result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
<result column="SERVICE_TYPE_IDS" jdbcType="VARCHAR" property="serviceTypeIDs" />
<result column="SERVICE_TYPE_IDS" jdbcType="VARCHAR" property="serviceTypeIds" />
<result column="INDUSTRY_IDS" jdbcType="VARCHAR" property="industryIds" />
<result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
<result column="CREATOR" jdbcType="VARCHAR" property="creator" />
......@@ -157,7 +157,7 @@
DATA_SOURCE)
values (#{id,jdbcType=VARCHAR}, #{keyCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{keyValueType,jdbcType=DECIMAL}, #{formula,jdbcType=VARCHAR}, #{isConstant,jdbcType=DECIMAL},
#{calculateStatus,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL}, #{serviceTypeIDs,jdbcType=VARCHAR},
#{calculateStatus,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL}, #{serviceTypeIds,jdbcType=VARCHAR},
#{industryIds,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updator,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{dataSource,jdbcType=VARCHAR})
......@@ -193,7 +193,7 @@
<if test="resultType != null">
RESULT_TYPE,
</if>
<if test="serviceTypeIDs != null">
<if test="serviceTypeIds != null">
SERVICE_TYPE_IDS,
</if>
<if test="industryIds != null">
......@@ -243,8 +243,8 @@
<if test="resultType != null">
#{resultType,jdbcType=DECIMAL},
</if>
<if test="serviceTypeIDs != null">
#{serviceTypeIDs,jdbcType=VARCHAR},
<if test="serviceTypeIds != null">
#{serviceTypeIds,jdbcType=VARCHAR},
</if>
<if test="industryIds != null">
#{industryIds,jdbcType=VARCHAR},
......@@ -310,8 +310,8 @@
<if test="record.resultType != null">
RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL},
</if>
<if test="record.serviceTypeIDs != null">
SERVICE_TYPE_IDS = #{record.serviceTypeIDs,jdbcType=VARCHAR},
<if test="record.serviceTypeIds != null">
SERVICE_TYPE_IDS = #{record.serviceTypeIds,jdbcType=VARCHAR},
</if>
<if test="record.industryIds != null">
INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR},
......@@ -353,7 +353,7 @@
IS_CONSTANT = #{record.isConstant,jdbcType=DECIMAL},
CALCULATE_STATUS = #{record.calculateStatus,jdbcType=DECIMAL},
RESULT_TYPE = #{record.resultType,jdbcType=DECIMAL},
SERVICE_TYPE_IDS = #{record.serviceTypeIDs,jdbcType=VARCHAR},
SERVICE_TYPE_IDS = #{record.serviceTypeIds,jdbcType=VARCHAR},
INDUSTRY_IDS = #{record.industryIds,jdbcType=VARCHAR},
DESCRIPTION = #{record.description,jdbcType=VARCHAR},
CREATOR = #{record.creator,jdbcType=VARCHAR},
......@@ -393,8 +393,8 @@
<if test="resultType != null">
RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
</if>
<if test="serviceTypeIDs != null">
SERVICE_TYPE_IDS = #{serviceTypeIDs,jdbcType=VARCHAR},
<if test="serviceTypeIds != null">
SERVICE_TYPE_IDS = #{serviceTypeIds,jdbcType=VARCHAR},
</if>
<if test="industryIds != null">
INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR},
......@@ -433,7 +433,7 @@
IS_CONSTANT = #{isConstant,jdbcType=DECIMAL},
CALCULATE_STATUS = #{calculateStatus,jdbcType=DECIMAL},
RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
SERVICE_TYPE_IDS = #{serviceTypeIDs,jdbcType=VARCHAR},
SERVICE_TYPE_IDS = #{serviceTypeIds,jdbcType=VARCHAR},
INDUSTRY_IDS = #{industryIds,jdbcType=VARCHAR},
DESCRIPTION = #{description,jdbcType=VARCHAR},
CREATOR = #{creator,jdbcType=VARCHAR},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment