Commit 067fe5da authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/liuna'

parents e0988292 7188f079
......@@ -45,6 +45,9 @@ public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>,
@Query("select count(*) from QualityRule qualityRule where qualityRule.qualityRuleId=:qualityRuleId")
Long getNumOfQualityRuleByQualityRuleId(@Param("qualityRuleId")String qualityRuleId);
//根据质量规则批量修改
@Modifying
@Query("update from QualityRule qr set qr.ruleValidFlag =:ruleValidFlag where qr.qualityRuleId in (:qualityRuleId)")
void updateRuleValidFlagByQualityRuleId(@Param("ruleValidFlag") String ruleValidFlag,@Param("qualityRuleId")List<Long> qualityRuleId);
}
......@@ -168,18 +168,25 @@ public class QualityRuleResultController {
List<QualityRule> qualityRuleList = new ArrayList<QualityRule>();
List<AccuracyRule> accuracyRuleList = new ArrayList<AccuracyRule>();
QualityRule qualityRule = null;
if(qualityRuleId.contains(",")){
String [] qualityRules = qualityRuleId.split(",");
for (String s : qualityRules) {
qualityRuleList.add(qualityRuleDao.findByQualityRuleId(Long.parseLong(s)));
accuracyRuleList = accuracyRuleDao.findByQualityRuleId(Long.parseLong(s));
qualityRule = qualityRuleDao.findByQualityRuleId(Long.parseLong(s));
qualityRule.setRuleValidFlag("0");
}
}else{
qualityRuleList.add(qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId)));
qualityRule = qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId));
qualityRule.setRuleValidFlag("0");
}
qualityRuleDao.delete(qualityRuleList);
accuracyRuleDao.delete(accuracyRuleList);
qualityRuleDao.save(qualityRule);
// qualityRuleDao.delete(qualityRuleList);
// accuracyRuleDao.delete(accuracyRuleList);
cmszOperationLogService.createLog("删除","更新质量规则","quality_rule_warehouse_info_t. QUALITY_RULE_ID="+qualityRuleId);
return PageURLController.RuleResult;
......
......@@ -118,6 +118,9 @@ SimpleDateFormat.prototype.applyPattern=function(pattern){
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
var sdf=new SimpleDateFormat();
sdf.applyPattern("yyyy-MM-dd");
//
var ruleReportId;
function ruleReportDetailTable(){
......@@ -326,7 +329,7 @@ table_pagging.prototype = {
if(k==15){
if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext));
tdContext = sdf.format(new Date(tdContext));
}
}
......
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